google-code-export / morphia

Automatically exported from code.google.com/p/morphia
1 stars 0 forks source link

ClassLoader in osgi environment #461

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi all, i'm using morphia driver in an osgi environment and i have make a 
little fix in DefaultCreator to use c = Class.forName( className) instead of c 
= Class.forName( className , true , 
Thread.currentThread().getContextClassLoader() ).
When i use spring in virgo, the currentThread is the gemini (spring) thread 
used to instanciate objects. If i use simple Class.forName method the thread 
used to instanciate the object is the Bundle thread.

I think that can help a lot of people.

Original issue reported on code.google.com by fouache2...@gmail.com on 19 Jun 2013 at 6:14