-->
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.  [ 3 posts ] 
Author Message
 Post subject: Updates/Inserts not being seen by apps sharing same db
PostPosted: Mon Apr 05, 2010 8:56 am 
Newbie

Joined: Mon Apr 05, 2010 8:46 am
Posts: 1
I am having a problem where I have application A running in a JVM (no application server) and have application B running in a JVM (no application server). Application A selects from table Y every 10 seconds checking for new rows. Application B places records into table Y. Application A never picks up the new rows. If I start and stop Application A then he picks up the new rows. I have tried turning off first and second level query caching as well as turning of caching all together. I should also mention that I am using Hibernate as my implementation of JPA. I am not using a hibernate cfg but I am using a Persistence.xml. I am running under JDK 1.6. Any help is much appreciated.


Top
 Profile  
 
 Post subject: Re: Updates/Inserts not being seen by apps sharing same db
PostPosted: Tue Apr 06, 2010 5:21 am 
Newbie

Joined: Thu Dec 03, 2009 4:36 am
Posts: 12
You need to commit the transaction and flush the session. So that the new records will be read by other application

_________________
Regards,
Rajesh Subbiah


Top
 Profile  
 
 Post subject: Re: Updates/Inserts not being seen by apps sharing same db
PostPosted: Tue Apr 06, 2010 5:22 am 
Newbie

Joined: Thu Dec 03, 2009 4:36 am
Posts: 12
Can you share the code which inserts data into the DB

_________________
Regards,
Rajesh Subbiah


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.