-->
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: JBoss with Hibernate
PostPosted: Sat Mar 13, 2004 4:16 pm 
Beginner
Beginner

Joined: Sat Mar 13, 2004 4:00 pm
Posts: 32
Hello,

We just started using Hibernate 2.1.2 with JBoss 3.2.3RC1 and seem to be having a memory leak (also using Oracle 9.2). We have a client application that reads about 2000 objects (the object is read-only mapping) one at a time from the server. If I put this client application into a loop that runs every 30 seconds, we run out of heap memory within the server after a couple of hours (we have it max VM size at 1.5G, and the object isn't that large). We have tried both net.sf.hibernate.cache.TreeCacheProvider and ehcache with the same results.

We have session bean that basically performs the following steps:

1) Creates a Session.
2) Performs the query.
3) Closes the Session.

We are assuming the JBoss container is controllering the transaction (but this is a reading operation of a read-only bean). Are we required to do anything other than openning/closing a Hibernate session within the JBoss container? We have to be missing something to have a memory leak this bad.

We are using the Hibernate Service MBean as the documentation states, here is the declaration within our jboss-service.xml file.

<mbean code="net.sf.hibernate.jmx.HibernateService" name="jboss.jca:service=Hibernate-ScorDS">
<depends>jboss.jca:service=RARDeployer</depends>
<depends>jboss.jca:service=LocalTxCM,name=jdbc/ScorDS</depends>

<attribute name="CacheProvider">net.sf.hibernate.cache.TreeCacheProvider</attribute>

<!--
<attribute name="CacheProvider">net.sf.ehcache.hibernate.Provider</attribute>
-->

<attribute name="UseQueryCache">true</attribute>
<attribute name="MapResources">
&referenceservice-resources;,
&securitiesservice-resources;
</attribute>
<attribute name="JndiName">java:/hibernate/ScorDS</attribute>
<attribute name="Datasource">java:/jdbc/ScorDS</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.Oracle9Dialect</attribute>
<attribute name="UseOuterJoin">true</attribute>
<attribute name="ShowSql">false</attribute>
<attribute name="UserTransactionName">UserTransaction</attribute>
<attribute name="TransactionStrategy">net.sf.hibernate.transaction.JTATransactionFactory</attribute>
<attribute name="TransactionManagerLookupStrategy">net.sf.hibernate.transaction.JBossTransactionManagerLookup</attribute>
</mbean>


Any help would be appreciated. Thanks in advance,

Rich


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.