On Wed, 2003-10-15 at 14:29, Brian Wallis wrote: > On Wed, 15 Oct 2003 09:57 pm, Sebastian Hauer wrote: > > You can't use the system classloader for this. Try the current threads > > context classloader (Thread.currentThread().getContextClassLoader()). > > That's what I was afraid of. > > The code in question is in the standard JDK 1.4 library in the > java.util.prefs.Preferences class. You are supposed to be able to extend this > class but it doesn't quite work in a JBoss context. > > Pity. I wonder if this is intentional (security reasons?) or just a bug in the > Preferences class.
The usual trick with this kind of restriction is to install a wrapper in the classpath. This delegates to the real implementation which can be hot deployed and lazily instantaniated in the application classloading context. The JVM loads the wrapper using the system classloader from the classpath. The wrapper uses the context classloader. This has always been a problem with IBM's VMs. While we're on the subject, somebody should explain to the jdk developers why Class.forName() has no notion of application context when there are multiple applications running on different threads in the same VM. Regards, Adrian > > Think I'll put in a bug report to Sun and see what happens. > > thanks, > brian wallis... > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > SourceForge.net hosts over 70,000 Open Source Projects. > See the people who have HELPED US provide better services: > Click here: http://sourceforge.net/supporters.php > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user -- xxxxxxxxxxxxxxxxxxxxxxxx Adrian Brock Director of Support Back Office JBoss Group, LLC xxxxxxxxxxxxxxxxxxxxxxxx ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user