-->
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.  [ 2 posts ] 
Author Message
 Post subject: No aggresive release when generated=always
PostPosted: Thu Apr 13, 2006 7:31 am 
Newbie

Joined: Wed Jun 16, 2004 6:49 am
Posts: 4
Hibernate version:
3.1.3

Mapping documents:
Code:
      <property name="hibernate.dialect">
         org.hibernate.dialect.Oracle9Dialect
      </property>
      <property name="hibernate.current_session_context_class">
         jta
      </property>
      <property name="hibernate.cache.provider_class">
         org.hibernate.cache.TreeCacheProvider
      </property>
      <property name="hibernate.show_sql">
         false
      </property>
      <property name="hibernate.session_factory_name">
         persistence
      </property>

      <!-- Connection configuration -->
      <property name="hibernate.connection.provider_class">
      org.hibernate.connection.DatasourceConnectionProvider
      </property>
      <property name="hibernate.connection.datasource">
         java:datasource
      </property>
      <property name="hibernate.connection.release_mode">
         after_statement
      </property>
      
      <!-- Transaction configuration -->
      <property name="hibernate.transaction.factory_class">
         org.hibernate.transaction.JTATransactionFactory
      </property>
      <property name="hibernate.transaction.manager_lookup_class">
         org.hibernate.transaction.JBossTransactionManagerLookup
      </property>
      <property
         name="hibernate.transaction.flush_before_completion">
         true
      </property>
      <property name="hibernate.transaction.auto_close_session">
         true
      </property>

Code:
<hibernate-mapping>
   <class
      name="persistence.Persistable"
      table="ET_PERSISTABLE"
      abstract="true"
      rowid="rowid">
   
      <id name="key" type="long" unsaved-value="undefined" column="KEY">
         <generator class="sequence">
            <param name="sequence">SQ_PERSISTABLE_PKEY</param>
         </generator>
      </id>
      
      <property
         name="dateCreated"
         column="INSERT_DATE"
         type="date"
         not-null="true"
         generated="always"
         insert="false"
         update="false"/>
         
      <property
         name="dateLastModified"
         column="UPDATE_DATE"
         type="date"
         not-null="true"
         generated="always"
         insert="false"
         update="false"/>
      
   </class>
</hibernate-mapping>

Code:
<hibernate-mapping>

   <union-subclass name="PrimaryImpl"
      extends="Persistable"
      table="ET_PRIMARY">
   
      <property
         name="property"
         type="long"/>
</hibernate-mapping>


Code between sessionFactory.openSession() and session.close():
N/A

Full stack trace of any exception that occurs:
"forcing batcher resource cleanup on transaction completion"

Name and version of the database you are using:
Oracle 10
jBoss 4.0.3SP1

The generated SQL (show_sql=true):
None - the SQL statments in question are those stored as prepared statements in AbstractBatcher.resultSetsToClose:

Debug level Hibernate log excerpt:
INFO

Detail:
We are using Session.getCurrentSession within jBoss to externalise the creation of sessions. However, when we use this approach in combination with the 'after_statement' release mode and generated properties we received the following message:

forcing batcher resource cleanup on transaction completion

From debugging it seems that the select statements for refreshing generated properties are not being released on 'after_statement' and this is causing explicit release on 'afterTransaction'.

Has anyone else seen this behaviour?
Is so have made a mistake with our config or is this a bug/known issue?

Cheers ;-)


Top
 Profile  
 
 Post subject: Re: No aggresive release when generated=always
PostPosted: Fri Sep 19, 2014 5:53 am 
Newbie

Joined: Wed Aug 16, 2006 4:48 am
Posts: 1
I have the exact same problem.

I noticed that all the PreparedStatement associated to query for "generated=always" attribute don't get closed.

In my situation, having to do a number of subsequent queries in the same transaction, this increases enormously the number of Cursors opened on database and causes an ORA-01000: maximum open cursors exceeded Exception.

I'm desperate for a solution. Please reply if you worked this out and post solution.

Following some environment runtime info:
Database version: Oracle 10
Driver version: 10.2.0.4.0
Hibernate version 3.1.3

Please, don't hesitate to ask for any further info.

Cheers.


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