-->
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.  [ 4 posts ] 
Author Message
 Post subject: application hung on websphere
PostPosted: Fri May 16, 2008 12:12 pm 
Newbie

Joined: Fri May 16, 2008 12:10 pm
Posts: 1
Hello,

We are experiencing trouble with our application, based on the following config :
- Spring 2.5
- Hibernate 3.2.1
- Websphere 6.1.013
- Oracle 10.2.0.3.0

The application basically retrieve some list of items. The application runs pretty well on Tomcat. But on Websphere, after several (number varying) calls, the application does not respond anymore.

The last lines of the log are :

DEBUG OpenSessionInViewFilter : Opening single Hibernate Session in OpenSessionInViewFilter
DEBUG OpenSessionInViewFilter : Opening single Hibernate Session in OpenSessionInViewFilter
DEBUG SessionFactoryUtils : Opening Hibernate Session
DEBUG SessionFactoryUtils : Opening Hibernate Session
DEBUG SessionImpl : opened session at timestamp: 4960054393966592
DEBUG SessionImpl : opened session at timestamp: 4960054393966592
INFO NamingHelper : JNDI InitialContext properties:{}
INFO NamingHelper : JNDI InitialContext properties:{}
INFO NamingHelper : JNDI InitialContext properties:{}
INFO NamingHelper : JNDI InitialContext properties:{}
DEBUG SessionImpl : setting flush mode to: NEVER
DEBUG SessionImpl : setting flush mode to: NEVER
(then after 10 min)
00000034 ThreadMonitor W WSVR0605W: Thread "WebContainer : 0" (00000037) has been active for 651493 milliseconds and may be hung. There is/are 1 thread(s) in total in the server that may be hung.
00000034 ThreadMonitor W WSVR0605W: Thread "WebContainer : 1" (00000038) has been active for 648415 milliseconds and may be hung. There is/are 2 thread(s) in total in the server that may be hung.


Spring config is :

<bean name="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName">
<value>java:comp/env/jdbc/myDB</value>
</property>
<property name="lookupOnStartup">
<value>false</value>
</property>
<property name="cache">
<value>true</value>
</property>
<property name="proxyInterface">
<value>javax.sql.DataSource</value>
</property>
</bean>

<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="jtaTransactionManager" ref="transactionManager"/>
<property name="dataSource" ref="dataSource"/>
<property name="annotatedClasses">
<list>
<value>com.app.EntryList</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.cache.provider_class">net.sf.ehcache.hibernate.EhCacheProvider</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.jdbc.batch_size">20</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.connection.release_mode">auto</prop>
</props>
</property>
</bean>

<tx:annotation-driven transaction-manager="transactionManager"/>

<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>

Has someone any clue ?

Tx !


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 19, 2008 6:11 am 
Newbie

Joined: Tue Aug 19, 2008 4:19 am
Posts: 2
hi,

we're experiencing pretty much the same problem, configuration is similar except that we use DB2 instead of Oracle.

How did you resolve this issue?

thx!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 19, 2008 1:13 pm 
Newbie

Joined: Thu Jul 24, 2008 1:23 pm
Posts: 16
Have you tried

<tx:jta-transaction-manager />

instead of

<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>

?

It uses the native WebSphere transaction manager (UOWManager) automatically.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 19, 2008 10:10 pm 
Newbie

Joined: Tue Aug 19, 2008 4:19 am
Posts: 2
This is exactly the direction in which I am going. It seems like this is a locking issue, I am able to reproduce the problem by editing an object, then trying to query all objects from the same table.
This somehow leaves the table in a locked state.

I still can't explain why this happens. My configuration is as follows.

Code:
   <bean id="myApp"
      class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
      <property name="transactionManager" ref="transactionManager" />
      <property name="target">
         <bean class="com.xxxx.service.ServiceManagerImpl"
            init-method="init">
            <property name="dao" ref="dao" />
            <property name="asd" value="${asdsda}" />
         </bean>
      </property>
      <property name="transactionAttributes">
         <props>
            <prop key="store*">PROPAGATION_REQUIRED</prop>
            <prop key="update*">PROPAGATION_REQUIRED</prop>
            <prop key="remove*">PROPAGATION_REQUIRED</prop>
            <prop key="send*">PROPAGATION_REQUIRED</prop>
            <prop key="*">PROPAGATION_SUPPORTS,readOnly</prop>
         </props>
      </property>
   </bean>


<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
        <property name="sessionFactory" ref="sessionFactory"/>
</bean>


I will try changing the transactionManager to JtaTransactionManager...

Is there a reason why the HibernateTransactionManager would no longer work on WebSphere? As I understand it, the HbnTxManager would do local transactions as opposed to JtaTxManager would be global transactions - should it not work correctly both ways (performance put aside)?

Thanks for the help!


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