Thanks, Martin, Some notes:
On Fri, 26 Nov 2004 15:05:22 -0800, Martin Cooper <[EMAIL PROTECTED]> wrote: > > 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. > I understand, I think, the way different people think about this, Martin. Thank you for outlining your thought on it, which is representative of many, I think. > > > > 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()); > > } > > } You did not say anything after this, so I assume you were not interested in this part. > > > > 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. > I assume that the way is Runtime.exec() and I got the answer. Thanks. I would still be interested, however, if the Java compiler has a standard API that can be called. I did not know that. 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]