This content has been marked as final.
Show 4 replies
-
1. Re: Reenetrancy problems
raja05 Jan 2, 2004 12:06 PM (in response to ereze)Are you calling the ProfileBean object from userbean. In that case,
UserBean --> Profilebean.mymethod --> getUser() ---> Tries to retrieve the UserBean that called profilebean (Thus causing the reentrancy). -
2. Re: Reenetrancy problems
ereze Jan 3, 2004 7:32 AM (in response to ereze)Hi Raj,
It's not exactly the wayyou described it but very close to it. But why is it forbidden?? for what good reason?
I come from the ODMG (object orinented databases) field where there is no such thing like forbidding me to call freely what ever method of what ever entity taking away the security issues.
Is there a good reason?
Regards,
Erez -
3. Re: Reenetrancy problems
raja05 Jan 3, 2004 8:59 AM (in response to ereze)From the Spec 10.5
An entity Bean Provider 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 an exception to the
second request. This rule allows the Bean Provider to program the entity bean as single-threaded,
non-reentrant code.
The functionality of entity beans with container-managed persistence 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. -
4. Re: Reenetrancy problems
raja05 Jan 3, 2004 9:02 AM (in response to ereze)And if you want this kind of loopback behaviour, try specifying
true in ur ejb-jar.xml