-->
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: Multiple JBoss/Hibernate instances accessing a single DB
PostPosted: Thu Oct 18, 2007 7:58 am 
Newbie

Joined: Mon Jun 18, 2007 12:57 pm
Posts: 2
Location: Williamstown, VT, USA
I'm using the version of hibernate that comes bundled with JBoss 4.2.1. I've deployed my application to multiple JBoss 4.2.1 servers. All of the servers are configured to use the same database. I can connect to one JBoss server, run some hibernate code and everything works fine. But when I connect to another JBoss server and run some hibernate code, I get 'Could not synchronize database state with session' errors.

17-10-2007 11:49:55 WARN SQL Error: 1062, SQLState: 23000
17-10-2007 11:49:55 ERROR Duplicate entry '109365' for key 1
17-10-2007 11:49:55 ERROR Could not synchronize database state with session

I assume that this is some sort of caching issue. Is it possible to point multiple JBoss instances at a single database? If so, what are the configuration steps?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 19, 2007 7:39 am 
Newbie

Joined: Mon Jun 18, 2007 12:57 pm
Posts: 2
Location: Williamstown, VT, USA
I found the answer to my question.... use a replicated cache (i.e. JBoss Cache).

Information about this can be found on page 189 in "Hibernate in Action" and on the JBoss wiki: http://www.jboss.com/wiki/Wiki.jsp?page=JBossCache


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.