Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jboss related transaction problem

 
Sajid Moinuddin
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic