----- Original Message -----
Sent: Thursday, February 22, 2001 12:10 AM
Subject: Re: Is this reentrant call sequence allowed ?

From the Proposed Final Draft of EJB2.0 specification
 
Section 11.1.12
 
"Non-reentrant and re-entrant instances
An entity Bean Provider entity can specify that an entity bean is non-reentrant. If an instance of a
non-reentrant entity bean executes a client request in a given transaction context, and another request
with the same transaction context arrives for the same entity object, the container will throw the
java.rmi.RemoteException to the second request. This rule allows the Bean Provider to pro-gram
the entity bean as single-threaded, non-reentrant code.
The functionality of some entity beans may require loopbacks in the same transaction context. An
example of a loopback is when the client calls entity object A, A calls entity object B, and B calls back
A in the same transaction context. The entity bean’s method invoked by the loopback shares the current
execution context (which includes the transaction and security contexts) with the Bean’s method
invoked by the client.
If the entity bean is specified as non-reentrant in the deployment descriptor, the Container must reject an
attempt to re-enter the instance via the entity bean’s remote interface while the instance is executing a
business method. (This can happen, for example, if the instance has invoked another enterprise bean,
and the other enterprise bean tries to make a loopback call.) The container must reject the loopback call
and throw the java.rmi.RemoteException to the caller. The container must allow the call if the
Bean’s deployment descriptor specifies that the entity bean is re-entrant."
 
 
 

----- Original Message -----
From: "Daniel Caune" <>
Sent: Wednesday, February 21, 2001 11:03 PM
Subject: Is this reentrant call sequence allowed ?

Dear all,

I have three BMP entity beans B1, B2, and B3 :
- no transaction management declared ;
- <reentrant>True</reentrant>.

(1). A client calls a method of B1;
(2). this method of B1 calls a method of B2;
(3). this method of B2 calls another method of B1, and returns.

Is this sequence is allowed ?

Regards,


Daniel

===========================================================================
To unsubscribe, send email to
[EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to