Dynamic class reloading

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Dynamic class reloading

Jérôme DELVIGNE
Hi,
 
We integrate the web portal CISCO SESM (3.3.1) that embed Jetty server (4.2.23) and we must implement a process to reloading JSP classes at runtime.
 
We think about two solutions :
 
Solution 1 :
The JSP pages are modified and precompiled on the fly using Jasper, on a backup server and they are putting (*.jsp and *.class) on the production sever at run-time.
 
We have a question about this solution :
How the Jetty server can take in account the modified classes without re-compile the jsp pages on the production site?
Is exist a configuration parameter to enable reloading classes derived from jsp at run-time?
 
Solution 2:
The JSP pages are modified and compiled with JSPC and JAVAC, on a backup server and they are putting (*.jsp and *.class) on the production sever at run-time.
We derived the anonymous servlet Invoker to extend it with dynamic class loading through new classloader instanciation each time is it required.
 
We have a question about this solution :
Is a such function already implemented into Jetty server ?
 
We have read jetty FAQ : "Can Jetty reload servlets?"
"Jetty no longer supports automatic reloading of Servlets." is it true for Jetty 4.2.23 ?
 
 
Regards,
 
 
Jerome.
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

Reply | Threaded
Open this post in threaded view
|

Re: Dynamic class reloading

Greg Wilkins-5

Jerome,

I think you are working in the right direction.

To add dynamic class loading to Jetty, you need to replace the classloader
with a dynamic classloader.

Extending the invoker servlet is probably a good way to go - but make sure
you don't open security problems and allow arbitrary servlets to be executed.

regards



Jérôme DELVIGNE wrote:

> Hi,
>  
> We integrate the web portal CISCO SESM (3.3.1) that embed Jetty server
> (4.2.23) and we must implement a process to reloading JSP classes at
> runtime.
>  
> We think about two solutions :
>  
> _Solution 1_ :
> The JSP pages are modified and precompiled on the fly using Jasper, on a
> backup server and they are putting (*.jsp and *.class) on the production
> sever at run-time.
>  
> We have a question about this solution :
> How the Jetty server can take in account the modified classes without
> re-compile the jsp pages on the production site?
> Is exist a configuration parameter to enable reloading classes derived
> from jsp at run-time?
>  
> _Solution 2:_
> The JSP pages are modified and compiled with JSPC and JAVAC, on a backup
> server and they are putting (*.jsp and *.class) on the production sever
> at run-time.
> We derived the anonymous servlet Invoker to extend it with dynamic class
> loading through new classloader instanciation each time is it required.
>  
> We have a question about this solution :
> Is a such function already implemented into Jetty server ?
>  
> We have read jetty FAQ : "Can Jetty reload servlets?"
> "Jetty no longer supports automatic reloading of Servlets." is it true
> for Jetty 4.2.23 ?
>  
>  
> Regards,
>  
>  
> Jerome.
> This message contains information that may be privileged or confidential
> and is the property of the Capgemini Group. It is intended only for the
> person to whom it is addressed. If you are not the intended recipient,
> you are not authorized to read, print, retain, copy, disseminate,
> distribute, or use this message or any part thereof. If you receive this
> message in error, please notify the sender immediately and delete all
> copies of this message.
>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

RE: Dynamic class reloading

Stephen J. McConnell
In reply to this post by Jérôme DELVIGNE
 
I've been thinking about this issue of dynamic reloading and my conclusion is that you probably want to handle this with a new http context.  In effect - I'm assuming that a new context (effectivly referencing a new classloader) could be asserted with a higher pririty that the current context, and assuming that context instances is itself priority loaded (which assumes custom comparable context handlers) then the incomming http request will be delegated to a new (and distinct) classloader stack without disrupting the state of existing context handlers.
 
Cheers, Steve.
 
 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Jérôme DELVIGNE
Sent: Thursday, 16 February 2006 3:02 AM
To: [hidden email]
Subject: [Jetty-support] Dynamic class reloading

Hi,
 
We integrate the web portal CISCO SESM (3.3.1) that embed Jetty server (4.2.23) and we must implement a process to reloading JSP classes at runtime.
 
We think about two solutions :
 
Solution 1 :
The JSP pages are modified and precompiled on the fly using Jasper, on a backup server and they are putting (*.jsp and *.class) on the production sever at run-time.
 
We have a question about this solution :
How the Jetty server can take in account the modified classes without re-compile the jsp pages on the production site?
Is exist a configuration parameter to enable reloading classes derived from jsp at run-time?
 
Solution 2:
The JSP pages are modified and compiled with JSPC and JAVAC, on a backup server and they are putting (*.jsp and *.class) on the production sever at run-time.
We derived the anonymous servlet Invoker to extend it with dynamic class loading through new classloader instanciation each time is it required.
 
We have a question about this solution :
Is a such function already implemented into Jetty server ?
 
We have read jetty FAQ : "Can Jetty reload servlets?"
"Jetty no longer supports automatic reloading of Servlets." is it true for Jetty 4.2.23 ?
 
 
Regards,
 
 
Jerome.
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.