users@glassfish.java.net

Single Threading an EJB in Glassfish v2?

From: jsexton0 <jsexton0_at_gmail.com>
Date: Fri, 3 Sep 2010 12:19:08 -0700 (PDT)

I have an EJB that makes several SOAP requests to the same and to other
servers. There is a situation on one of these calls (just one) where if two
threads make the call at the same instant the v2 Glassfish server completely
freezes losing all ability to make any SOAP calls what so ever.

In the logs when this happens I can track things right up to the sending of
the two requests, then nothing. No exception is thrown, no time-out occurs.

I would like to avoid this by bottle-necking the EJB in some form of
singleton.

I have tried setting the max EJB pool and cache sizes to one in the sun
deployment descriptor file, but two threats still executed.

I have tried assigning a new thread pool to the EJB, limited to one threat,
but it continued using the default thread pool.

The EJB is in a SA. It is both called by, and calls, BPEL processes. The
critical methos is synchronized. I need to limit it to one execution at a
time. I can limit it either in the java of the EJB, in the EJB descriptor
or container, or in BPEL somehow. Any means at all is acceptable.

Any ideas on how to create a point of single-use for a SOAP call?

Thanks
-- 
View this message in context: http://old.nabble.com/Single-Threading-an-EJB-in-Glassfish-v2--tp29617566p29617566.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.