-->
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: Switching session under POJO / replicating tables
PostPosted: Sun May 14, 2006 3:39 am 
Newbie

Joined: Sun Jul 31, 2005 11:12 pm
Posts: 8
1) Can I switch the session used by a POJO? Say I do a session1.load(obj.Class,id) then do a session2.switch(obj,id) then session2.save(obj.id)?

2) I have about 20 tables on the master which are used for updating, the slaves are used for reading.I'll replicate 10 of those tables on machine A, then I'll replicate the other 10 on machine B. Both machines will have their respective table rows propagated from the master server while the tables that aren't propagated are left blank. Also, there are no foreign keys. So could I use the same hibernate.cfg.xml file on machine A and B, just making sure I access via Hibernate the tables the machine has rows for?

Here's what the setup looks like:

Code:
--------
| master |
--------
  |    |
---  ---
| A || B |
---  ---


Thanks.


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.