• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTA objects  RSS feed

 
K Higurashi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have been studying JTA, but it is not clear to me if java:comp/env/jta is some kind of a subdirectory for JTA objects or something else. Any light you could shed would be appreciated.

Thanks!
K.H.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is the JNDI name.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Every type of EJB gets an environment naming context, which is the java:comp/env JNDI context. The scope of the environment is for all bean instances from the same home. If a bean were deployed twice, it would have two homes and therefore two environments.

So, a bean starts navigating from the java:comp/env environment to do lookups. The EJB spec recommends, but does not mandate, that all resource manager connection factory references be organised in the subcontexts of the bean�s environment, using a different subcontext for each resource manager type as follows.

java:comp/env/ejb - EJB homes
java:comp/env/jdbc - DataSource
java:comp/env/mail - JavaMail
java:comp/env/jms - JMS connection factories
java:comp/env/url - URL connection factories
 
K Higurashi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mr. Bhat and Thank you Mr. Chung-Wee (excellent explanation!).

Regards,
K.H.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!