-->
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: JTA and read-only queries
PostPosted: Fri Jun 03, 2005 5:12 am 
Newbie

Joined: Tue May 17, 2005 8:09 am
Posts: 5
Hi all,

I'm using Hibernate 3.0.5 as a DAO implementation that sits behind a session bean to load/persist everything against an Oracle 9i database. All on a Weblogic 8.1 SP 2 server.

Since updating from Hibernate 3.0.3 my server logs are filling up with the following log statement:

Code:
03-Jun-2005 09:44:08 org.hibernate.jdbc.ConnectionManager afterStatement
INFO: Skipping aggresive-release due to open resources on batcher


Althought the info message appears to be new in release 3.0.5 (should it be info or a debug?) the cause concerns me. Going by the documentation it states that the default release mode is "on_close", but this message comes from the afterStatement method of org.hibernate.jdbc.ConnectionManager which says that my release mode is actually "after_statement". Does the default change when you use JTA? Or have I configured hibernate incorrectly (config file below)?

Also, I get these messages even though I'm doing a read-only operation, with no lazy-loading classes. The read-only operations are part of a JTA transaction to simplify the code (using the getCurrentSession() method instead of manually acquiring the session), is this the recommended approach to have every EJB call require a transaction as it is when using XA?


Thanks for your time and help!
Andy


My configuration file:
Code:
<hibernate-configuration>
    <session-factory>
        <!-- Due to a conflict with weblogic of antlr we need to use the classic query parser -->
        <property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>


        <!-- As inside a container, as an appropriate DataSource -->
        <property name="hibernate.connection.datasource">...</property>
        <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
        <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.WeblogicTransactionManagerLookup</property>

        <!-- We are using Oracle, so use the appropriate dialect -->
        <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>

        <!-- As we are using solely JTA transactions, these 2 parameters are required -->
        <property name="hibernate.transaction.flush_before_completion">true</property>
        <property name="hibernate.transaction.auto_close_session">true</property>


        <!-- The definition of the POJOs -->
        <!-- ... -->
    </session-factory>
</hibernate-configuration>
[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 03, 2005 9:38 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
in CMT environment the default is afterStatement

_________________
Emmanuel


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.