[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index] [Home]

Re: Bean Reloading problem



>Hi Karl and Fritz,
>
>Karl Ostendorf wrote:
>> 
>> I'm forwarding this message here as it specifically concerns GNUJSP.  Any id
eas on how to reload beans?
>> 
>> ==
>> Karl Ostendorf
>> karl@ostendorf.com
>> 
>> _________________________________________________________
>> DO YOU YAHOO!?
>> Get your free @yahoo.com address at http://mail.yahoo.com
>> 
>>   ------------------------------------------------------------------------
>> 
>> Subject: Re: Bean Reloading problem
>> Date: Sun, 7 Feb 1999 14:12:31 -0800
>> From: Karl Ostendorf <kwostendorf@YAHOO.COM>
>> Reply-To: Karl Ostendorf <karl@ostendorf.com>
>> To: JSP-INTEREST@JAVA.SUN.COM
>> 
>> ---Fritz Budiyanto <fbudi@MAIL3.VARCOM.NET> wrote:
>> >
>> > Where is the best place to put my beans ??
>> >
>> > I am using JServ 0.97, Apache 1.3.4, and JDK 1.1.7
>> >
>> > If I don't put the bean in the wrapper.classpath, then whenever I load
>> > any jsp page that access the bean, javac will fire an error, saying
>> > javac couldn't find the bean.
>> >
>> > say this is my try.jsp
>> >
>> > <%@ import="beans.*" %>
>> > ...
>> >
>> > wrapper.classpath=/mybean
>> >
>> > beans is inside /mybean
>> >
>> > Whenever I put my beans into the wrapper.classpath, everything worked
>> > fine, except if I update the bean, jserv will always use the old bean
>> > (never get reloaded since the bean is in classpath)
>> >
>> > Anyone has any suggestion for this problem ?
>> >
>> 
>> I have the exact same problem.  I'd like to know how to reload beans
>> too.
>
>Currently, the only thing to do is to restart Apache JServ. There is not
>other way to reload classes that have been loaded through the system classpath
.
>
>However, Ben Engber has sent me a bit of code that causes GNUJSP to use
>the servlet engine's class loader (when properly configured). That code
>should provide a partial solution, but thinking about all this now, it
>seems like complicated stuff. I will investigate more and try to come up
>with a solution.

Sometime ago I wrote a servlet for jhtml-Pages.
Jhtml pages contain <servlet>-Tags and call other servlets.
That stuff uses a class loader initially based on classloader
from jacl. It is able to read from directories, jars and zips.
I hated to restart jserv just to test new servlets so
for debugging pruposes that class loader is able to forget
its classes (the GC seems to care for them getting unloaded).
If its helps I can provide sources.


>
>Regards, Vincent.
>

Ciao,
	Carsten Heyl

  Carsten Heyl                          Heyl@NADS.De
                                        NADS - Advertising on Nets
  NADS GmbH                             http://www.nads.de/
  Otto-Hahn-Str. 18                     http://www.pixelboxx.de/
D-44227 Dortmund                        Tel.: +49 231 975 123-0