Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

AutoCummit the Unit of Work inside CMT

 
Baskaran Chinnusamy
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

System:
JBoss 5.1.0, Oracle 10g, Spring

Inside a container managed transaction (Stateless session bean) we are updating multiple db tables.
Although we want one operation to be committed immediate. since the table will be used by other users.

We tried with nested transaction, it works fine but performance issue.

Is it possible to use Auto-commit? or some other better solution.

Thanks in Advance.
 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can move the unit of work to a new method and specify the RequiresNew transaction attribute for that method. You have mentioned you have a performance issue with nested transactions, so maybe you have already tried this out.

The only other option that I am aware of is that you use BMT (and the JTA UserTransaction object) if you wish to control transaction boundaries in your methods.

cheers,
ram.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!