Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Clarification List - HFEJB 196

 
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.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!