Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can we manage transactions using POJO

 
Harpreet Hira
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of the features of EJBs that I admired the most was declarative transaction management. How are POJOs going to handle that?
Is the user manually going to use JTA or are we going to have some container who manages.
I guess I am still living in EJB world and the am out-of-sync with external world, which has gone past EJB.
 
Scott Selikoff
author
Saloon Keeper
Posts: 4014
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Transaction management is more a function of session beans than entity beans, so even in a non-pojo EJBs can still support ORM with transactions. If you use container management transactions, you never have specify any transaction details other than in the XML deployment descriptor.

Further, most ORM implementations create a Connection Manager that, in the backend, manages persistent state of the objects and seamlessly connect with a database managers transaction manager such that the same level of control- functions like read commited, repeatable read, read uncommited, rollback, etc etc is fully supported. Keep in mind that ultimately POJO ORM get converted to JDBC that interact with database transactions the same way you would directly in JDBC.
[ January 27, 2006: Message edited by: Scott Selikoff ]
 
Chris Richardson
author
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Harpreet Hira:
One of the features of EJBs that I admired the most was declarative transaction management. How are POJOs going to handle that?
Is the user manually going to use JTA or are we going to have some container who manages.
I guess I am still living in EJB world and the am out-of-sync with external world, which has gone past EJB.


The Spring framework provides declarative transaction management for POJOs.

Chris
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic