You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Wax, Michael" <mw...@vantra.com> on 2001/12/21 01:55:38 UTC

Classloader Problem

I am using Tomcat 4.0 with JBoss 2.4.  I am able to call JBoss session beans
from my servlets without problem.  However, when I attempt to call a session
bean from the finalize method of a helper class, I get a
ClassNotFoundException, no matter where I put my JBoss client classes.  It
seems clear that the JBoss proxy classes are using the wrong class loader
when called from finalize.  Any thoughts?

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Classloader Problem

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 20 Dec 2001, Wax, Michael wrote:

> Date: Thu, 20 Dec 2001 16:55:38 -0800
> From: "Wax, Michael" <mw...@vantra.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: "'tomcat-user@jakarta.apache.org'" <to...@jakarta.apache.org>
> Subject: Classloader Problem
>
> I am using Tomcat 4.0 with JBoss 2.4.  I am able to call JBoss session beans
> from my servlets without problem.  However, when I attempt to call a session
> bean from the finalize method of a helper class, I get a
> ClassNotFoundException, no matter where I put my JBoss client classes.  It
> seems clear that the JBoss proxy classes are using the wrong class loader
> when called from finalize.  Any thoughts?

That sounds like something you really ought to ask on the JBoss support
lists.

As a general principle, I *never* design my classes to clean up only in
the finalize() method.  That's letting things hang around far longer than
they really should (and therefore impacting the performance of all users
of the JVM you are running in) -- clean up after yourself when you are
done using a particular object.

Craig


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>