-->
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: "managed-native" hibernate in OSGi environment
PostPosted: Mon May 05, 2014 4:40 am 
Newbie

Joined: Mon Apr 07, 2014 5:35 am
Posts: 1
Hi,

I am working on moving an existing application to OSGi. Our application currently uses a lot of hibernate.
The Hibernate OSGi documentation states that only unmanaged-native hibernate is supported in OSGi environments (http://docs.jboss.org/hibernate/orm/4.2/devguide/en-US/html/ch17.html#d5e4875)

Our existing application does not use JPA and we would prefer not having to move to JPA.
Is there a way to achieve "managed-native" hibernate in an OSGi environment?


Thanks.


Top
 Profile  
 
 Post subject: Re: "managed-native" hibernate in OSGi environment
PostPosted: Tue May 27, 2014 10:53 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 18, 2012 5:03 am
Posts: 36
Location: Fort Wayne, Indiana, USA
Hello! Not following your question...

Quote:
The Hibernate OSGi documentation states that only unmanaged-native hibernate is supported in OSGi environments (http://docs.jboss.org/hibernate/orm/4.2/devguide/en-US/html/ch17.html#d5e4875)


That's not true -- 3 setups are supported: unmanaged-native, unmanaged-jpa, and managed-jpa.

What would "managed-native" mean? The "managed" part purely means that the persistence context is managed by the OSGi container. For example, managed-jpa assumes Apache Aries JPA (or something similar) manages all persistence units, EntityManagerFactories, etc. and provides your app an EntityManager through CDI or XML-based beans. "managed" == the container builds the EntityManager, while "unmanaged" == your app calls the Hibernate OSGi services, obtains an EMF, and creates the EM on its own.

I'm not sure of containers that do that for native Hibernate (SessionFactory and Session), other than maybe an odd setup involving Spring.


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.