-->
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: problems in Processing of BatchMessages using Hibernate
PostPosted: Tue Jul 29, 2008 2:58 am 
Newbie

Joined: Tue Jul 29, 2008 2:43 am
Posts: 2
We are doing a batch program for processing the messages coming from MQ. We use Hibernate to implement the DB operations. Our expectation is to process 100,000 messages per hour. We were able to process 1000 messages in 30 seconds (which should give 120,000/Hr). But as the Messages are increasing, the performance is hindered very much. For eg.10,000 messages are taking more than 16 min.





We open the session during application startup and in a while(true) loop, we do the session.beginTransaction() and towards the end of loop we do a session.getTransaction().commit();This application needs to run 24/7 .

Is there anything like cache clearing in Hibernate or any pointers on above will be highly helpful


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 29, 2008 7:37 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Sometimes an ETL tool is even better than Hibernate for large batch processes. Have any IBM licenses for DataStage?

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 31, 2008 5:32 am 
Newbie

Joined: Fri Dec 21, 2007 12:09 pm
Posts: 3
Calling Session.clear() and System.gc() periodically may help.

Also, make sure ResultSet wrapping is off (hibernate.jdbc.wrap_result_sets needs to be false or absent). Hibernate leaks memory and database resources when this is enabled.


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.