-->
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: How to load all data in memory
PostPosted: Mon Feb 15, 2010 12:13 pm 
Newbie

Joined: Mon Feb 15, 2010 12:11 pm
Posts: 1
Is it possible to load all data in memory using JPA or Hibernate directly, do many transactions like create, delete, update and finally make a commit when I want?.
I am trying to do something like Weblogic does, the user locks a console, does many transactions (create services, delete accounts, update costumers etc) and at the end when he presses a button, all changes are committed.


Top
 Profile  
 
 Post subject: Re: How to load all data in memory
PostPosted: Tue Feb 16, 2010 6:20 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Quote:
Is it possible to load all data in memory using JPA or Hibernate directly


It depends if you have enough memory (-Xmx) in your java virtual machine in way to hold all your entities without running into OutOfMemory.
But generally speaking it makes only sense for performance reasons by configuring an appropriate sencond level cache implementation.

Quote:
do many transactions like create, delete, update and finally make a commit when I want?.


You can do this in Hibernate (as well as with JPA or Hibernate directly)
Hibernate offers different ways for doing transaction demarcation.
One of it is manual transaction demarcation.


Top
 Profile  
 
 Post subject: Re: How to load all data in memory
PostPosted: Tue Feb 16, 2010 9:31 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Quote:
do many transactions like create, delete, update and finally make a commit when I want?


Just to be clear: create, delete, update actions itself are not transactions.
Under "Transaction" we understand the whole thing which is happening between a begin and
the final commit or rollback.


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.