• 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

Jboss related transaction problem

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,
I have run through a jboss related transaction problem. What is the default transaction attribute in jboss 4. I have two beans with the exact same configuration & behavior except some different attribute. Now, When I get an application exception, I am rolling back the transaction by calling setRollBackOnly. The interesting point is that one bean is rolling back the transaction while other is not. I am not putting any transaction attribute in my ejb-jar.xml. But How come one works and other doesn't? How can I track this? plz help..I am stuck .

Regards,
Sajid Moinuddin.
 
Sajid Moinuddin
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I narrowed down the problem a bit.....I have an ejbSelect method call in the middle of a business method where the transaction is not rolling back. From the log of the server, I can see that container is doing a ejbStore just before performing the ejb-select. If I don't call the ejbSelect method, the transaction is rolled back properly. And If I don't, the things I have done before the ejbSelect call are saved to the database. But after the ejbSelect call, I have an Exception and I want to roollback the operation of the whole business method. Do I have any basic conception problem here? Isn't the transaction is supposed to roll back for the entire method? Or it's just a jboss related problem/ it's causing because I didn't put any transaction related attribute in ejb-jar??
plz help
Regards,
Sajid
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, first, lets me move this thread to the JBoss forum.

Second, which version of JBoss are you using?

Mark
 
Sajid Moinuddin
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using JBOSS 4.0.3. Just tell me, Am I wrong in my design and I shouldn't call any ejbSelect method in my business methods or it's just a problem of JBOSS???

regards.
Sajid
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic