Hi,
I am using Jboss-3.2.1 and EJB2.0
I have an entity bean and using this entity bean in some other session beans.
The transaction attribute type is "Reuqired" in entity bean.
I want to use trasaction attribute as "Required" in some cases and in other cases
I need to use different trasaction say "RequiresNew" i.e I want create a new instance of entity bean
for each trasaction. How can I configure my entity bean with 2 different behaviours.
Is there any way that I configure to work my entity bean with diff behaviours when I call entity bean in session bean.
Ex:
Let say entity bean as "A" and session beans are "B" and "C".
Case (1): B is calling A(entity bean)
In this case I am running the entity bean under transaction "Required" attribute.
Case (2): C is calling A(entity bean)
In this case I want to run entity bean under transaction "RequiresNew" attribute i.e I want to create
and create a new transaction for each remote request.
Any help please.
Thanks.