Sure, I have two enterprise applications (App1 and App2). All EJBs are Container Managed Transaction with transction attribute required.
App1 and App2 are connected with the same database across different datasources (DataSource1 and DataSource2). My problem is: In the database I have two tables: TABLE1 and TABLE2. TABLE2 have a foreign key for TABLE1. My problem is: When a EJB in App1 execute, it insert one row with TABLE 1. Inside EJB in App1 I call one EJB in App2, then EJB in App2 try to insert one row in TABLE2 with the foreign key id generated by App1. I think that when I call EJB in App2 the transaction context is propagated. Is the same transaction because EJB in App2 are with transaction attribute required. But, looks like two database transactions, the data inserted by EJB in App1 are isolated to EJB in App2. Then, the EJB in App2 throws an error: Foreign key constraint violation, because it can no see the data inserted by EJB 1 in the same XA Transaction but in different datasource. Thanks. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956330#3956330 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3956330 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user