-->
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: configure/Refresh data from DB and not frm 1st level cache
PostPosted: Wed Aug 04, 2010 2:33 pm 
Newbie

Joined: Wed Aug 04, 2010 2:20 pm
Posts: 5
Hi,

We have different instance of an application running on each machine.We are using Hibernate with MYSQL DB to persist the data.We have configured to use primary key generation like,

@GenericGenerator(name = "generator",
strategy = "increment")

But facing issue when the Instance is started with the DB conncetion created.

THe generator fetches the ID from the First level cache.It does not go to DB to fetch the MAX record.

We tried both Session and StatelessSession but both fetches from First level cache.

Is there any way to configure the Hibernate to goto DB and fetch the MAX ID each time without fetching from 1st level cache. or Refresh the First level cache.

Help is very much needful.

Regards,
Uvaraj S


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.