db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kalén <mka...@apache.org>
Subject Re: Class.forName() -- possible issues
Date Fri, 11 Mar 2005 10:32:53 GMT
Clute, Andrew wrote:
> Looking at the source for ClassHelper, I am seeing that we are using
> Class.forName() to load a new instance of a classes. This causes known
> issues, due to Sun's implementation of class caching, inside of JBoss.
>  
> It is recommended to instead of doing 
>  
> Class.forName()
>  
> you do,
>  
>  Thread.currentThread().getContextClassLoader().loadClass() 

Agreed. Same issues apply for eg Jakarta Tomcat with class- and resource 
loading.

> Is there any reason why we are using Class.forName?

I will have a look at it. Probably not I would say (in which case I will 
apply your suggested changes).

Regards,
  Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message