What is the cause of EJB 2.x “reentrant method call detected” Exceptions? How to solve them?

I've seen this before where EJB1 calls EJB2 which calls back to EJB1 within the container as part of the same transaction.

I've seen this before where EJB1 calls EJB2 which calls back to EJB1 within the container as part of the same transaction. You can tell the container to allow this by marking EJB1 as reentrant which will allow it to be accessed multiple times in the same transaction. This is done in the deployment descriptor with the following tag: True There should be a corresponding EntityEJB annotation that XDoclet can use to generate this for you.

We just came across the same problem and our solution was two-fold. Firstly we ensure that none of ejb's had transaction attributes of NotSupported within our ejb-jar.xml. We then used "instance per transaction" as our optimistic locking strategy.It's a bit of a belt-and-braces approach, but it works.

It does mean that the Entity bean in question cannot be accessed concurrently, which makes sense since it would likely corrupt the data.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions