users@glassfish.java.net

Recover from Stateless Session Bean Thread Call Hang

From: <glassfish_at_javadesktop.org>
Date: Wed, 23 Jan 2008 08:34:32 PST

I have a swing app that calls an EJB3 stateless session bean remote interface method (deployed in Glassfisf V2ur1). I noticed that sometimes the container thread that process the request hangs; I am trying to find a pattern and a cause, but untill I found them, I need to do something because the client hangs waiting for a response that in a normal situation should return in less than a second. Actually I noticed that the corba request timeouts in the client side after 30 minutes (sorry but I don't have that stack trace). My questions are:

 1. Is it possible to configure that corba timeout request that defaults to 30 minute in each remote session bean call?

 2. Is it possible to configure GlassFish to timeout that blocked thread? I set the Transaction Timeout, but if this just Rollbacks or Commit the transaction if the thread finish its work, and this is not the case, because the thread seems to be hung.

3. The session bean methods just use JPA Entity manager to query, persist, remove. I don't use any Lock, Critical Section or any related to Thread Management; the container is the one that manage the transaction. How could a thread hang like this? I have a JDBC connection pool against MySQL 5, how could i know if it's a database block?. In this line, I think (I'm not certanly sure) that the threads blocks trying to access just one table, but perform correct with the others.

Thanks.
[Message sent by forum member 'abelmj' (abelmj)]

http://forums.java.net/jive/thread.jspa?messageID=255377