Title: RE: Deadlock in a session

if I understand you correctly you are storing
ejb references in the servlet and then passing them to
an ejb which is BAD, the ejbs should look up their own instances
of the remote handles and use them, NOT reuse the ones in the servlet.

-----Original Message-----
From: Alberto Vilches [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 26, 2001 4:39 AM
To: Orion-Interest
Subject: Deadlock in a session


Hello Orion-Interest,

I'm getting a DeadLock in a stateless session bean with concurrent
calls from different servlet clients with a full load.

The line that crashes is a standard entity bean CMP finder.
The scenario is the following:

Im getting the entity ejb home and a homehanlde for it in the
setSessionContext and storing it for use by the class. Im getting the
ejb home from the homehandle in each method that I need it with
getEJBHome() (And Im using the PortableRemoteObject.narrow() method
correctly.)

And I also store the homehandle for the stateles session bean in the
servlet.

The session method function is building a Vector of my own standard
serializable java beans, which gets sent to servlets for display. The
data of these java beans is derived from entity beans finders.

I can avoid this deadlock by setting transaction for all the stateless
session methods from "Required" to "RequiresNew" but I dont think this
is the most efficient way to do it.

What am I doing wrong?

--
Best regards,
 Alberto                          mailto:[EMAIL PROTECTED]

Reply via email to