• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

interesting issue

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!!
 
reply
    Bookmark Topic Watch Topic
  • New Topic