• 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

synchronizing Hibernate transactions

 
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Guys,
We use Hibernate API to manage persistence of our data into a Postgresql database.
we built a complex J2EE system that uses many components communicating together in different ways such as Spring managed beans , EJB and JMS for asynchronous messaging.
we are testing our system now. to be able to wait until a JMS message has been received ,consumed and replied.. and also for all Transaction logic within the JMS MDBean to complete, we used a quick & dirty technique which is using Thread.sleep() statements to pause the system for few secs until one transaction has completed ,so the system pass to next transaction without the causing errors or conflicts between concurring Hibernate transactions.
we are aware this is Not a clean technique and want to Find a better solution for this problem:
How to tell hibernate to LOCK a given transaction and pause all other transactions until current one is complete? is there some Java code to do this ? do we need to configure some jboss xml files to tell hibernate how to synchronize its transactions?
I'm not yet mastering the hibernate API very well and would appreciate if you suggest some good solutions to the problem i described above.

thanks for your Help.
 
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic