-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate and OSGI : ClassLoader
PostPosted: Sat Nov 07, 2009 10:54 am 
Newbie

Joined: Sat Nov 07, 2009 10:48 am
Posts: 1
Hi,

I'm developping an application which will use OSGI. The OSGI bundles will contains entities. The application is in charge of adding the bundle entities to the AnnotationConfiguration at startup. After that, the application can retreive the SessionFactory.

Right now, I had to change the classloader of the current thread to include the OSGI classloader. I was wondering if there a better way to achieve this ? Is there a way to configure the classloader used by Hibernate ?

I'm using JPA (annoted entities), Java 6, Hibernate :

<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.0.1B</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.3.0.ga</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>3.0.0.ga</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager
</artifactId>
<version>3.3.2.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations
</artifactId>
<version>3.3.0.ga</version>
</dependency>

Thank you !


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

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.