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: r/o Hibernate to share db handle with r/w JDBC legacy code?
PostPosted: Fri Jul 08, 2005 3:35 pm 
Regular
Regular

Joined: Sun May 08, 2005 2:48 am
Posts: 118
Location: United Kingdom
Is it possible to use Hibernate in a read-only mode and therefore without transaction support? If I call flush() around my main application loop to clear its level 1 cache to preserve memory.

Then is it possible that Hibernate can share the same database connection with some JDBC code?

Then is it possible that this JDBC code can modify the database and use SQL transactions ?



My application specifics:

In my application there is no lazy loading of any tables the JBDC legacy code modifies, of the only table that overlaps (Hibernate reads, and JBCD updates) I have finished with the hibernate loaded object instance by the time the update complete.

There is only 1 table which Hibernates reads and JBCD updates, the information Hibernate loaded from this overlapping table is not used after the update. So it seems okay for hibernates level 1 cache to be out of sync. I then want to empty hibernates cache as I restart my main application loop.

I realise that even read only usage has transaction support, but my application only needs READ-COMMITTED isolation.


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.