-->
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: Integrating question...
PostPosted: Tue Jun 20, 2006 5:57 pm 
Beginner
Beginner

Joined: Mon Jun 19, 2006 9:21 pm
Posts: 25
So I've decided to use hibernate simply because it seems much better then the current framework w/ which I'm working, but the problem is that I can't really re-do the entire project that I'm working on (5 years worth of development that was handed to me 2 months ago). The reason why I would like to use hibernate is currently there are three different developers who have worked on this, and three different styles/designs all of which either won't allow me to do more of the complicated things I need to do or force me to do it in a really ugly manner.
The point of this is that I am worried that when one part of my system, that maybe uses rmi, or designer number three's api, that the parts that use hibernate won't update the persistent classes because the amount of rows haven't changed, or some other factor that makes it think the current classes in memory are up to date.
Not sure if I'm making sense...hope I am...but I'm just wondering if that's possible....if because it uses persistent classes in some parts of my program (hibernate parts) and non-persistent classes in others, will the persistent classes get updated whenever I do a sql call?
I know in theory I should tear down the project and make it use one style, one framework, and therefore allow easier maintanability and whatnot, but it's five years worth of development and I'm the only one here, so it's really not feasible.
Also, I will fully admit I haven't read all the documentation, I wanted to have this answered before doing so because it obviously determines whether I can even use hibernate or not.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 21, 2006 1:15 am 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
The objects in your session cache won't change when you change the associated DB rows via any other method. That doesn't mean that hibernate can't be used some of the time, though: you simply clear your cache before doing anything, if you think some non-hibernate code may have affected cached objects.

You can have hibernate do this cache-clearing automatically, to an extent. Have a look at the <synchronize> element (ref docs section 5.1.3), and the select-before-update attribute (same section).

_________________
Code tags are your friend. Know them and use them.


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.