• Post Reply Bookmark Topic Watch Topic
  • New Topic

UserTransaction at the PetShop  RSS feed

 
Sondra Colagrossi
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been studying the PetShop implementation.
The code come from Source URL
The code is:
UserTransaction ut = null;

// Look up the UserTransaction object
InitialContext ic = new InitialContext();
ut = (UserTransaction) ic.lookup("java:comp/UserTransaction");
ut.begin(); // start the transaction.


My question is how does "java:comp/UserTransaction" get bound into the context?
 
William Zhou
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
automatically..i think
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!