Win a copy of Machine Learning with TensorFlow this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Session bean transaction in DAO

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, I have the following issue. My stateless session bean facade is running inside the transaction and has to call 2 entity beans and two stored procedures(that are accessed by DAO's) to do the update. THe stored procedures need to see the updates done by the entity beans and if any of the described updates fail, the whole transaction needs to be rolled back. I have no problems with entity bean, but how can I make DAOs to be avare of the transaction that was started before the flow of control got to those DAO. I am using oc4j
Thank you Gennadiy
P.S. Can I use container managed transactions, or the only way for me is to use user managed transactions with the XA datasource?
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use CMT, just make sure the isolation level of your database is set such that you can view uncommitted results...
Kyle
 
Gennadiy Vasilevskiy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Kyle Brown:
You can use CMT, just make sure the isolation level of your database is set such that you can view uncommitted results...
Kyle


THank you for reply.
Even if I have 2 dao calls, both of them running inside the CMT, if the second call fails, the first call is not rolled back. I use the TX oracle connection pool.
Is it a problem with oracle oc4j implementation?
 
reply
    Bookmark Topic Watch Topic
  • New Topic