tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: Non-Application Exception in Session Bean Cascades Destruction of Other Session Beans?
Date Fri, 18 Jun 2010 20:57:00 GMT

On Jun 18, 2010, at 2:59 AM, Ravindranath Akila wrote:

> I still cannot figure out what is happening.
> I will explain with additional information.
> 
> I have a *singleton *called *DBLocal *with *@Startup* scope.
> 
> DBLocal looks up *HumanCRUDHumanLocal*(*stateless* SB) with a context look
> up(not injection).
> 
> The interceptor for DBLocal reports that an instance is returned(and it is
> not null either).
> 
> HumanCRUDHumanLocal has a class variable injected called *
> UHumansIdentityLocal*(*stateless *SB).
> 
> 
> Now, explaining the scenario in 4 rounds of calls
> 1. DBLocal looks up(context) HumanCRUDHumanLocal. HumanCRUDHumanLocal calls
> a method in UHumansIdentityLocal. UHumansIdentityLocal's method throws a *non
> application exception*. This is caught and reported in an interceptor for
> HumanCRUDHumanLocal.
> 
> 
> http-8080-*1*|2010-06-18 15:14:30,031|DEBUG:141>Timing:public
> ai.ilikeplaces.logic.crud.HumanCRUDHumanLocal
> ai.ilikeplaces.logic.crud.DB.getHumanCRUDHumanLocal():done. [Time
> Taken:0]//LOOKUP//*Interceptor for DBLocal*
> 
> http-8080-*1*|2010-06-18 15:14:30,265|DEBUG:141>Timing:public
> ai.ilikeplaces.util.Return
> ai.ilikeplaces.logic.crud.HumanCRUDHuman.doUHumansPublicURL(ai.ilikeplaces.util.RefObj,java.lang.String):done.
> [Time Taken:203]//METHOD RETURN//*Interceptor for **HumanCRUDHuman*
> 
> 
> 2. DBLocal looks up(context) HumanCRUDHumanLocal. However, there onwards,
> the log indicates no calling of the interceptor for HumanCRUDHuman.
> 
> http-8080-*1*|2010-06-18 15:14:52,093|DEBUG:141>Timing:public
> ai.ilikeplaces.logic.crud.HumanCRUDHumanLocal
> ai.ilikeplaces.logic.crud.DB.getHumanCRUDHumanLocal():done. [Time
> Taken:0]//LOOKUP//*Interceptor for DBLocal*
> 
> 3. DBLocal looks up(context) HumanCRUDHumanLocal on a page refresh. New
> thread. Still no indication of HumanCRUDHumanLocal methods being called.
> 
> http-8080-*2*|2010-06-18 15:15:01,593|DEBUG:141>Timing:public
> ai.ilikeplaces.logic.crud.HumanCRUDHumanLocal
> ai.ilikeplaces.logic.crud.DB.getHumanCRUDHumanLocal():done. [Time
> Taken:0]//LOOKUP//*Interceptor for DBLocal*
> 
> *The returned **HumanCRUDHumanLocal cannot be null because DBLocal
> checks*for this before returning.
> * This means an instance of HumanCRUDHumanLocal is being returned but any
> calls on it leaves the thread hanging.**
> *
> Any advice would greatly help me. If you need me to attach the sources, I
> will do so. Also, if you need a thread dumb immediately after the above
> calls, I will attach.
> 
> To summarize, if a Singleton A, looks up a stateless B, which contains a
> class variable stateless C, and C throws a non application exception,
> further look ups by A on B, returns an instance but leaves the method call
> threads hanging. Am I doing something wrong in coding here?

A thread dump and the OpenEJB version would be great.  Stateless session beans are pooled,
so it could be there are no more instances in the pool and calls are waiting for new instances.
 Depending on the OpenEJB version, the timeout for such situations is configurable.

-David


Mime
View raw message