____________________________________________________________
TransactionRolledbackException instead of RemoteException?
___________________________________________________________
Hi,
Mi client program is having following code snippet:
Object home = (DepartmentHome) ctx.lookup("DepartmentBean");
dHome = (DepartmentHome) PortableRemoteObject.narrow(home, DepartmentHome.class);
//Create a department with code=1000 and name=HR.
dept = (Department)dHome.create("1000","HR");
.............
............
dept.remove();
dHome.remove("1000");
*****************************
and DD i have
<container-transaction>
<method>
<ejb-name>DepartmentBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
*************
@ line "dHome.remove("1000");" i'm getting following exception:
********
javax.transaction.TransactionRolledbackException:
EJB Exception: : javax.ejb.NoSuchEntityException:
[EJB:010142]Instance of EJB 'DepartmentBean' with primary key '1000' does not exist.
*********
My client hasn't started txn.(if the client has started txn i shd get TransactionRolledbackException). As per EJB2.0 spec(p376 and p375) i shd get RemoteException(Not the RemoveExcpetion).Even with trans-attribute as "RequiresNew" im getting javax.transaction.TransactionRolledbackException
cn anione explain me Y this hapens?
thanx
binoj