• 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

CMT EJB 2.1 Transaction Problems

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not long ago I bumped into a nice riddle. Let's have scenario:

1. call method A of Session Bean placed in EAR_1 - begin of transaction X
2 call method B of Session Bean placed in EAR_2 - change of datarow in database by stored procedure (setting that row to value "1" earlier it was "0")
3. recalculation of data in method A
4. call the same method B of Session Bean placed in EAR_2 - change of datarow in database by stored procedure (setting that row to value "0" now)
5 end of method A of Session Bean placed in EAR_1 - end of transaction X = commit

The question is: why, after commiting the transaction X, the datarow has value "1", not "0", as setting to "0" was the last operation on that row.

Tech specs:
Websphere 6.1, EJB 2.1, Database: Oracle 10, non-XA Oracle drivers, connection pool, all methods have TX_REQUIRED attributes, all transactions are container-managed.
When I set TX_NOTSUPPORTED transaction attribute of method A, the datarow has value "0" at the end - the right value.

Can anybody explain this strange behaviour ?
 
reply
    Bookmark Topic Watch Topic
  • New Topic