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 transaction attribute as "Required" in some cases and in other cases
I need to use different transaction say "RequiresNew" i.e. I want create a new instance of entity bean
for each transaction. How can I configure my entity bean with 2 different behaviors.
Is there any way that I can configure to work my entity bean with diff behaviors when I call entity bean in session bean.
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. basically I want to create a new transaction for each remote request.
Any help please.