There are two remote EJBS talking to each other on two different JBOSS AS (version 4.2.3)
.Each EJB has methods that have transactional attribute Requied.
The methods in each EJB use JPA(Hibernate as ORM). Now my requirement is that When one
EJB1 calls the method of EJB2 on other Server the insertions into the databases should be
transactional i:e either everything should succeed or everything should fail.
Scenario :
EJB1
TransactionalAttribute.Requied
x()
{
JPA_Statement_x1;
y();
JPA_Statement_x2;
}
EJB2
TransactionalAttribute.Requied
y()
{
JPA_Statement_y1;
.....
}
Now if JPA_Statement_x2 in calling bean(EJB1) fails y()((EJB12) should roll back as
well(i:e JPA_Statement_y1 should not get executed at all).
I tried with JBOSS AS Version 4.2.3 but it seems to fail.
Can someone provide a solution please. The database is mysql.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206378#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...