-->
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 objects creating hung threads on WAS Server
PostPosted: Thu Feb 06, 2014 12:10 am 
Newbie

Joined: Wed Feb 05, 2014 11:57 pm
Posts: 1
Hello Everyone,

We need your help as we are facing a serious production issue. Entire Application is hung because CPU usage becomes high due to lot of hung threads on WAS server.

Please see the code below which seems to create hung threads, we are using hibernate version 2.0 jars.

Can anyone help us in this?

import net.sf.hibernate.*;

public CarrierProfile getCarrier(String carrierCD) throws Exception
{
CarrierProfile carrier= null;

Query query=getSession().createQuery(" from CarrierProfile carrier where carrier.delDate is null and carrier.carrierCD=?");

query.setString(0,carrierCD);
ArrayList<CarrierProfile> carriers;

carriers=(ArrayList<CarrierProfile>) query.list();
if(carriers!=null && carriers.size()>0){
carrier=carriers.get(0);
}

return carrier;
}

Please see log below from our production system:

30/01/14 11:06:43:122 EST] 00000017 ThreadMonitor W WSVR0605W: Thread "WebContainer : 4" (0000001e) has been active for 903762 milliseconds and may be hung. There is/are 13 thread(s) in total in the server that may be hung. at sun.reflect.Reflection.getClassAccessFlags(Native Method) at sun.reflect.Reflection.quickCheckMemberAccess(Reflection.java:63) at java.lang.reflect.Method.invoke(Method.java:579) at net.sf.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:96) at net.sf.hibernate.persister.AbstractEntityPersister.getPropertyValues(AbstractEntityPersister.java:253) at net.sf.hibernate.impl.SessionImpl.flushEntity(SessionImpl.java:2502) at net.sf.hibernate.impl.SessionImpl.flushEntities(SessionImpl.java:2486) at net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:2281) at net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1815) at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1578) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1543) at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49) at au.com.woolworths.replenishment.dao.hibernate.scheduler.SchedulerBookingDAOImpl.getCarrier(SchedulerBookingDAOImpl.java:686)



Thanks a lot in advance for your time in going through this.

Regards,
Abhishek


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.