No, that is not a Tomcat problem... it's a specific application problem... I 
saw some people complaining about the same things in applications similar to 
mine.

The big whole problem with my application is the framework usage: Hibernate and 
Struts...
My guess is that hibernate is not finalizing normally (i done some tests 
restarting the context using only struts and garbage collecting and checking 
the amount of free memory)... cause when I restart the context about 4 times 
using hibernate and struts there is no more free memory neither memory to 
allocate. It ends with a Heap space error.

Every time a new class is compiled during development the context must be 
restarted to update the class reference, so now we have a problem.

My way out is to make a classloader to monitor these classes in classes folder 
and auto-update the reference...
Wish me luck ;-)

I will take a look at your idea... but seems you are not trying to reload the 
classes references.

------------- Segue mensagem original! -------------

De: Sriram Narayanan <[EMAIL PROTECTED]>
Data: Thu, 12 Jan 2006 01:59:21 +0530
Para: Tomcat Users List <users@tomcat.apache.org>
Assunto: Re: Problems Using Context Loader

On 1/11/06, Michel Costa <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I am trying to create a ClassLoader for my application so then I will not 
> have to reload all the hibernate and struts when a new class is compiled.
>

Could you please explain why this is a problem ? Is the startup time an issue ?

> Then my problems started:
> I do not know where to put my special ClassLoader.
> I got lots of classcast exceptions until I found that a instance of 
> org.apache.catalina.loader.WebappClassLoader.
> So far so good, just extended my class and apache can't find 
> org.apache.catalina.loader.WebappClassLoader.
>
I'd taken another approach. See
http://issues.apache.org/bugzilla/show_bug.cgi?id=38223

> Now I have a java.lang.ClassNotFoundException: 
> org.apache.catalina.loader.WebappClassLoader
>
> I think the error is just because I put my classloader in the wrong place 
> (which is CATALINA_HOME/common/classes) but i could not avoid this common 
> folder... Before this one, I tried webapps/MYAPP/WEB-INF/classes but java 
> didnt found my class.
> My guess is something about the ClassLoader hierarchy and visibility of the 
> classes...
>

You place your class at CATALINA_HOME/server/classes. See the bug
report that I've filed for information on how I used my own
Classloader.

-- Sriram

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to