On Fri, 26 Nov 2004 13:58:20 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote:
> Assuming that there is a significant interest in Jericho, which from
> the work on chain as well as other notes and discussions on the list,
> I think I can assume there is,
Um, interest in using Chain in 1.3 is not even close to the same thing
as interest in Jericho. ;-) While some people may be interested in
both, it's certainly not safe to assume that the former implies the
latter.
Jericho is a proposal for the Struts 2.0 revolution, as envisioned by
Ted almost a year ago. As such, it is an alternative to Shale. Neither
of these proposals have backwards compatibility as a primary concern;
rather, that would be a "nice to have".
We are currently discussing the use of Commons Chain in the Struts 1.x
family, starting with 1.3. The idea is that we would replace the
current request processor with the one from struts-chain, providing a
much better means for people to customise the request processing flow.
> would there also be an interest in
> making the significant class factories in Jericho hot deploy
> factories? I would like to open a discussion on this to see if anyone
> even thinks that would be a good idea. I think it would be a great
> idea, letting us build a small Struts kernel.
>
> If interfaces are in WEB-INF/classes/org/apache./struts/, then the hot
> deploy factory could be, for example, in
> WEB-INF/classes/deploy/org/apache/struts/.
>
> A hot (deploy) factory would look something like the following. Other
> options, of course, exist. But this is really simple.
>
> package com.crackwillow.hot;
>
> import java.io.File;
> import java.net.URL;
> import java.net.URLClassLoader;
>
> import com.crackwillow.constant.SiteConstant;
> import com.crackwillow.hot.Point;
>
> public class PointHotFactory {
>
> static ClassLoader pointClassLoader;
> static Class pointClass;
>
> public static synchronized Point createPoint(Point existingPoint)
> throws Exception {
>
> // Startup implementation
> if (pointClass == null) { loadPointImpl(); }
>
> // Factory
> Point newPoint = (Point) pointClass.newInstance();
>
> // Copy state when going to a new implementation.
> if (existingPoint != null) {
> transferState(existingPoint,newPoint);
> }
>
> return newPoint;
> }
>
> public static synchronized void loadPointImpl()
> throws Exception {
> pointClass = new URLClassLoader(new URL[]{new
> URL(SiteConstant.DEPLOY)}).loadClass("com.crackwillow.hot.PointImpl");
> }
>
> private static synchronized void transferState(Point existingPoint,
> Point newPoint) {
> newPoint.move(existingPoint.getX(), existingPoint.getY());
> }
> }
>
> Which brings up the last part of the Subject. Does anyone have a
> class that runs shell and batch scripts that compile classes? I've
> not done that and don't have a clue. Talk to me! LOL ;-)
I'm afraid I don't really understand what you are asking for. Are you
just asking for how you can compile Java code from Java code? If
that's it, then I believe the Java compiler has a standard API that
you can call, although I don't know off the top of my head where that
is documented. Someone else might know.
--
Martin Cooper
> Jack
>
> --
>
> "You can't wake a person who is pretending to be asleep."
>
> ~Native Proverb~
>
> "Each man is good in His sight. It is not necessary for eagles to be crows."
>
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]