Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Clarification List - HFEJB 196  RSS feed

 
Natarajan Shankar
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
Would you pls. explain below things. This is from HFEEJB -196.

1. When we have an EJBHome why we cannnot access information about the
client?

2. When we can access transaction in BMT/ CMT. Any rules or any reference
need for it.

3. Access:
Special JNDI environment - What is this JNDI environment ?

 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Says who?? Whenever a client invokes a method, you can use the context object to get the caller principal. So, that would include home business methods.

2. For BMT, you can do just about whatever you want with the UserTransaction. For CMT, it is more complicated. You should really only use the setRollbackOnly on the context object, but that's about it. I think you can get the UserTransaction, but if you invoke any methods on it, it'll throw an exception.

3. I hope you're referring to the bean's ENC. I suggest you read the J2EE tutorial to get an overview of JNDI in J2EE.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!