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>
|
|