-->
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: Hibernate session closing for WAS8/Hibernate4.2.3 JMS trans
PostPosted: Fri Jul 19, 2013 5:36 pm 
Newbie

Joined: Fri Jul 19, 2013 5:23 pm
Posts: 1
We are upgrading project from IBM websphere 7 to 8 ,Hibernate 3.3.2.GA to 4.2.3 and using Hibernate with JPA.we are auditing page clicks using Spring transaction management ( websphere based JTA) and storing page audit info in database.

After upgrading we are getting below exception as audit message are coming to JMS queue using spring JMS listener(DefaultMessageListenerContainer)


org.hibernate.SessionException: Session is closed!
at org.hibernate.internal.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:129)


Transaction manager config in spring-ds.xml is below:

<bean class="org.springframework.transaction.jta.WebSphereUowTransactionManager" id="wasUOWTxnManagerObj"> </bean>

<bean class="javax.transaction.TransactionManager" id="transactionManager" factory-method="getTransactionManager" factory-bean="wasUOWTxnManagerObj"> </bean>

<bean id="xxMsgListenerContainer"
class="org.springframework.jms.listener.DefaultMessageListenerContainer">
<property name="connectionFactory" ref="xxAuditConnectionFactory" />
<property name="destination" ref="jmsxxQueue" />
<property name="messageListener" ref="xxMessageListener" />
<property name="transactionManager" ref="transactionManager" />
<property name="taskExecutor" ref="taskExecutor" />

</bean>


bean id="hibernateJpaProps"
class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="properties">
<props>
<!-- <prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect
<prop key="hibernate.dialect">org.hibernate.dialect.SQLServer2008Dialect
SQL Sever Dialect -->
<prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect
<!-- -->
</prop>
<prop key="hibernate.cache.region.factory_class">
org.hibernate.cache.ehcache.EhCacheRegionFactory
</prop>
<prop key="hibernate.cache.use_second_level_cache">
true
</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.show_sql">true</prop>
<!-- comment out default_schema for SQL server
<prop key="hibernate.default_schema">IB</prop> -->
<prop key="hibernate.transaction.manager_lookup_class">
org.hibernate.transaction.WebSphereTransactionManagerLookup</prop>
<prop key="hibernate.transaction.flush_before_completion">false</prop>
</props>
</property>
</bean>


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.