cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira>
Subject Re: Moved ParanoidCocoonServlet to its own block
Date Sun, 14 Dec 2003 08:09:25 GMT
Sylvain Wallez wrote:

> Stefano Mazzocchi wrote:
>> On 11 Dec 2003, at 13:53, Sylvain Wallez wrote:
>>> Last one for today ;-)
>>> I moved the ParanoidCocoonServlet and associated classes to a new 
>>> "paranoid" block?
>>> Why this? Because ParanoidCocoonServlet is actually a generic 
>>> servlet wrapper that can shield _any_ servlet in a 
>>> ParanoidClassLoader. Moving it to its own block leads to having a 
>>> "cocoon-paranoid-block.jar" that can be deployed separately from 
>>> "cocoon.jar".
>>> This allows several things:
>>> - use the ParanoidCocoonServlet with another servlet. Yes, remember 
>>> Cocoon isn't the only servlet ;-)
>>> - leave only paranoid.jar in WEB-INF/lib and have all other libs 
>>> located somewhere else by using the "paranoid-classpath" init 
>>> parameter.
>>> I use this second feature to load "build/eclipse/classes" in Jetty. 
>>> This allows faster roundtrips since it removes the need to "build 
>>> webapp" at each code change.
>> Uh, can you elaborate more on this? I'm very interested in knowing 
>> how you develop on eclipse.
> Run "build webapp".
> In web.xml, use ParanoidCocoonServlet and add the following parameter:
>    <init-param>
>      <param-name>paranoid-classpath</param-name>
>      <param-value>dev-classpath.txt</param-value>
>    </init-param>
> The "dev-classpath.txt" file is looked up relative to the working 
> directory, which is the main cocoon directory when using 
> cocoon.[bat|sh]. It contains:
>    class-dir: build/eclipse/classes
>    lib-dir: build/webapp/WEB-INF/lib
> Run "build eclipse-project", and open and build the project with Eclipse.
> Next you have to delete the cocoon.roles that's in 
> build/eclipse/classes as it doesn't contain all the roles defined by 
> blocks. Doing this ensures the full cocoon.roles located in 
> WEB-INF/lib/cocoon.jar will be used.
> Launch "cocoon servlet-debug", and voilĂ , you're using the latest 
> modifications done in Eclipse.
> Using "servlet-debug" allows to connect the Eclipse debugger to the 
> running Jetty if needed. It also allows to do code hotswap on the 
> running server (I had some problems hotswapping code produced by the 
> JDK's javac).

How do you get the howswap to work? How does it show that code has been 
swapped? I've done everything you've suggested, and I can run Jetty and 
debug, but I have to restart Jetty whenever I recompile classes.

Regards, Upayavira

View raw message