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: Can I use NHibernate and Hibernate against the same database
PostPosted: Wed Oct 24, 2007 12:12 pm 
Newbie

Joined: Wed Oct 24, 2007 11:52 am
Posts: 1
I have a situation where I may want .NET stuffs and Java stuffs to work from the same database. Can I use NHibernate and Hibernate together (in their respective VMs) with the same database?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 24, 2007 9:49 pm 
Hibernate Team
Hibernate Team

Joined: Tue Jun 13, 2006 11:29 pm
Posts: 315
Location: Calgary, Alberta, Canada
The short answer is "yes". There isn't anything inherent in NHibernate that prevent you from modifying the data with another piece of software in the background. That "piece of software", in this case, is a Java program with Hibernate. One thing to pay attention to is how you manage second-level cache, as the underlying data may get changed by another process. Depending on your need, you may have to disable second-level cache all together. Another thing you need to address is ID generation. In particular, the "hilo" strategy would likely be not acceptable. That's all I can think of now; but otherwise, you should be able to use both NHibernate and Hibernate to access the database at the same time.

_________________
Karl Chu


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.