Hello, all,
I am using CMP for session facades and two local entity beans. Both entity beans and the session facade are put into CMP with transaction option of 'required' in ejb-jar.xml
I am using CMP for session facades and two local entity beans. Both entity beans and the session facade are put into CMP with transaction option of 'required' in ejb-jar.xml
In my
SessionFacade.facade() method, I call EntityBean1.bean1() and then
EntityBean2.bean2(). My intention is to roll back the facade() transaction
if either bean method is failed. However, I observe that, once bean1() is
returned the database will be updated. If there is an exception thrown
from bean2(), no roll back happens.
This
is totally against my assumption. I am not sure whether it is caused by
nested transaction not supported by EJB2.0 and weblogic
currently.
I will
appreciate it if any one can provide a definite answer.
Another related question is, which one of the
followings is qualified as a 'nested transaction'? My intention is to
have a coarse update for my entity bean.
A)
SessionFacade.facade(){ bean.setA(); bean.setB();}
B)
EntityBean.updateBean(){ setA(); setB(); }
Answer
1: A) but not B)
Answer
2: both A) and B).
Thanks,
Denis
