• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is JTA applicable to common java code ?  RSS feed

 
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I use JTA (Java transaction api) for the transaction management for general java code (not EJB or hibernate, just plain java code) that handles DAO access ?
 
Marshal
Posts: 5664
769
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interesting! I never heard that JTA can be used with J2SE.
 
ben oliver
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Devaka Cooray wrote:Interesting! I never heard that JTA can be used with J2SE.


Actually I was not exactly talking about J2SE. I was referring to codes like java action classes that handles DAO access, etc. The code is deployed in J2ee container. The code may be some plain action classes (not EJB). So in the code I access DAO layer. In this type code, can I use JTA to demarcate transaction ?
 
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the container provides JTA you can use it--it's not specific to EJB (or even DBs).
 
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May be of help to read the section "User transaction support in Java SE" at the bottom in this.
 
ben oliver
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what .jar do I need to import the javax.transaction.* ? let's say if I have a jar file for a container (like weblogic.jar), does that help ? is there any j2ee standard jar that includes this package ?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!