geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Færch (Trifork)" <>
Subject Create followed by findByPrimaryKey in same transaction ctx, caller in another jar: FindByPrimaryKey fails
Date Thu, 15 Dec 2005 13:35:06 GMT
During adventure builder deployment, I'm running into a problem that 
looks a lot like the GERONIMO-598 Jira issue.

The setup is as follows (from the Adventure Builder 1.0.3):
opc.ear contains opc-ejb.jar and processmanager-ejb.jar
opc-ej contains
   WorkFlowManagerBean (Message Driven Bean)
processmanager-ejb contains
   ProcessManagerSB (SB)
   ManagerBean (CMP Entity Bean)

all methods involve have trans-attribute Required.

The WorkFlowManagerBean invokes (in the same transaction context) two 
methods on the ProcessManagerSB, first create, which calls create on the 
   ManagerBean home, then updateStatus, which does a findByPrimaryKey on 
the ManagerBean home (followed by a setStatus on the bean instance 

The findByPrimaryKey fails; I've verified that the same primary key is 
used on the create and the findByPrimaryKey calls.

If I change the trans-attribute on the two methods on ProcessManagerSB 
to RequiresNew, everything works fine, and I can see the ManagerBean 
entity persisted in the database.

Can anyone figure out what might be going on? The only difference from 
GERONIMO-598 I notice is the call across jar files. Maybe someone with 
more insight into OpenEJB can tell, if this could have any importance?

I've looked into the no-cache-flush mentioned in the Jira, but as far as 
I can tell, it would only make things worse.


View raw message