Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Client-Initiated Transactions problem  RSS feed

 
kevin chang
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i used this codes

it seems i can't find UserTransaction class, should i set Transaction in EJB or weblogic? any suggestion?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where did you get "HelloWorld/UserTransaction" from? As far as I know, the only way and place to get a UserTransaction reference is within an EJB by looking up "java:comp/UserTransaction". I might very well be wrong though.
 
kevin chang
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i can't understand the String "java:comp/UserTransaction",
but after seeing JNDI in weblogic, i used "javax/transaction/UserTransaction" and it worked very well.
could u please tell me what's "java:comp" here? i saw a lot of books write this.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "java:comp" context is a private JNDI context which the application server provides to an Enterprise JavaBean. The J2EE specifications specify that, for example, the container must make an implementation of the javax.transaction.UserTransaction interface available through the JNDI name "java:comp/UserTransaction". Similarly, the private JNDI context is used for obtaining references to resources mapped using the env-entry, ejb-ref, etc. elements in your deployment descriptors.
[ October 09, 2003: Message edited by: Lasse Koskela ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!