• 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
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

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.
reply
    Bookmark Topic Watch Topic
  • New Topic