• Post Reply Bookmark Topic Watch Topic
  • New Topic

Database Updates/Inserts using SLSBs  RSS feed

 
Mike Robinson
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
From a Design Perspective,is it OK to do database updates/deletes using SLSBs and JDBC?If yes is JDBC good enough to handle transactions.Or do I need to use
the JTA API?

Thanks
Mike
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37181
515
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike,
Welcome to JavaRanch!

From a design perspective using JDBC and SLSBs is fine. You can set the SLSB with a transaction setting to manage the transaction for you (rather than use JTA.) And if each statement is a transaction in itself, you don't even need to do that - JDBC handles it for you.
 
Mike Robinson
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for your swift reply.So this mean that the commit and the rollback will be handled by the container itself.Thats great.

Thanks a lot again

Krishnan
 
Mike Robinson
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for your swift reply.So this mean that the commit and the rollback will be handled by the container itself.Thats great.

Thanks a lot again
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For a non-EJB application, you have the option of JDBC or JTA transactions. But for an EJB application, the container uses JTA transactions under the covers for CMT beans. Of course, you explicitly use JTA for BMT beans. The container will handle all commits and rollbacks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!