cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kavalar <kava...@bokowsky.de>
Subject Re: Reloading Cocoon2 / Custom Generator
Date Sat, 20 Oct 2001 01:11:06 GMT
I have a jar with all the classes my generator employs in it. Is there 
no way to get cocoon to reload every class that has changed from disk in 
this jar?

Karl Oie wrote:

>all classes are loaded by a classloader, by creating your own classloader
>you can nullify it after use and the class will have to load from disk
>again, included is a example of a custom classloader, here is an example of
>how to use it:
>
>
>
>SimpleClassLoader sc = new SimpleClassLoader( "/opt/java/classes" );
>try {
>	somecoolclass cool =
>(somecoolclass)(sc.loadClass( "somecoolclass.class" )).newInstance();
>	cooo.doCoolThings();
>	}
>catch (Exception e) {
>	System.out.println( "aarrgggghhhh, classloader failed = " +
>e.getMessage() );
>	e.printStackTrace();
>	}
>sc = null;
>
>
>
>so you will have to wrap the functionality you want to be dynamicaly
>reloaded in the somecoolclass.class and create a generator wrapper that uses
>the classloader to load your class and then kill the classloader at the end
>of each execution run.
>
>
>mvh karl oie
>
>
>
>-----Original Message-----
>From: Martin Kavalar [mailto:kavalar@bokowsky.de]
>Sent: 19. oktober 2001 16:50
>To: Cocoon Mailing List
>Subject: Reloading Cocoon2 / Custom Generator
>
>
>Hello,
>i was wondering if it is possible to reload cocoon or a custom build
>generator after its been recompiled without restarting tomcat. If yes,
>i'd like to know how, and if not, then id like to know if theres another
>way to speed up the compiling / testing process somehow because always
>waiting about 30 seconds (restarting tomcat, reloading cocoon..) after
>changing the java code slows down my dev. cycle quite a bit.
>Tanks a lot, if you can help, you make my life easiert ;)
>martin
>
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
>To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
>For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
>To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
>For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>




---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message