HI,
I have following method A in sessionbean A:
methodA()
{
try
{
methodB();
methodC();
}
catch(application exception)
{
sessioncontext.setRollbackOnly();
}
}
methodB() will call entityHome1 to instantiate entity bean1 and insert a record in table1; methodC() will call entityHOme2 to instantiate entity bean2 and insert a record in table2.
sessionbean and entitybean use container-managed transaction, and all method's transaction's attribute is required.
when methodC failed to insert record in table2, seems new inserted record in table1 rollback, because i use oralce sqlplus to inquiry, and no that record.
But the issue is when i use application to insert same record in table1, it always throw out duplicatekey exception. even i stop the
test server and restart a couple of times, still the same. I'm wondering it's ejbobject cache??
I use wsad4.0 test server and oracleXADatasource.
So what do you think the possible reason behind such interesting issue.
Thanks!!