-->
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.  [ 4 posts ] 
Author Message
 Post subject: Mutliple Sessions Per Transaction
PostPosted: Tue Apr 05, 2005 6:39 am 
Newbie

Joined: Wed Sep 15, 2004 10:13 pm
Posts: 8
Hi

I am not sure if I am right but I have an application that spawns about 50000 threads, each trying to save some data using Hibernate and end the session straight after this operation.

Inside a container managed environment, this operation is being initated by a SessionBean. By spawning so many threads and do the above mentioned operation, the JVM soon become Out Of Memory and died.


At a standalone application, it ran smoothly but in the container-managed environment, due to the fact that the JTA transaction is taking over all the commits, the problem arised.

I hope I am not confusing you guys here, but does anyone have a solution to my problem here?

Mike

_________________
Thanks in advance!


Top
 Profile  
 
 Post subject: Add memory
PostPosted: Tue Apr 05, 2005 7:35 am 
Regular
Regular

Joined: Thu Nov 13, 2003 2:55 am
Posts: 71
Location: Sweden
First thing you should look at, especially since it works outside a container, is assigning more memory to the JVM. Have a look at the -Xmn -Xms and -Xmx java parameters.

This is by no means a Hibernate issue. Google for "JVM tweaking". Possibly you need to add RAM to your computer.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 05, 2005 8:35 am 
Newbie

Joined: Wed Sep 15, 2004 10:13 pm
Posts: 8
Well,

I am running on Pentium M 2.0GB CPU with 2GB RAM already.

I've tried -Xms and -Xmx settings too, it still gives the same result.

Hanzc

_________________
Thanks in advance!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 05, 2005 1:39 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Do you think the session is doing the OutOfMemoryException?
If yes, do a flush() and clear() "from time to time"

_________________
Emmanuel


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