-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Loading Persistent class from a different ClassLoader
PostPosted: Sun Oct 23, 2005 10:28 am 
Newbie

Joined: Mon Oct 10, 2005 1:07 pm
Posts: 13
Hi,

In my application I have a process that can accept plugin modules to run. Each such plug-in can use its own sub class of one of my tables (I am usinf the 'table per sub class' startegy). The problem is that those plug-ins are deployed in separate JAR files and loaded dynamically into the application using a diefferent class loader (one class loader per plugin). The loading of JARs and creating the plugins class loaders is done only after I have already created my session factory, hence loaded all my mapping files.

I can think of some solutions to solve the problem of loading the plugin mapping files dynamically, but the bigger problem seems to be: how to tell Hibernate to load the classes from the plug-in class loader?

Thanks for any help!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 23, 2005 12:14 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
set the context classlaoder before you access your plugin code and reset afterwards.

How do handle this for everything else?

Also remember to put the concrete classes in the Configuration.

/max

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.