Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MDB context difference between EJB 1.3 & 5

 
Ashraf Fouad
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dears,
I read in some posts that MDB didn't change between 1.3 & 5, but I found a difference while reading EJB 5 and if someone could say why I will be thankful.

-----------------------
In Head First EJB 1.3 page 456 while talking about MDB context, he mention exactly this phrase:
"MDB don't have clients. Thats means they don't have a client view, so there's no home interface. And since ther's no client there's no client security information. So, you can't call the two methods for getting the home(since you have no home), or the two methods for getting info about caller's security."
And I find the following methods with strikethrough as not to use:
getCallerPrincipal, getEJBHome, isCallerInRole, getEJBLocalHome
-----------------------

But in EJB 3.0 core specs section 5.4.4, pages 107, 108:
- The getCallerPrincipal method returns the java.security.Principal that is
associated with the invocation.
- The isCallerInRole method is inherited from the EJBContext interface. Message-
driven bean instances must not call this method.
- The getEJBHome and getEJBLocalHome methods are inherited from the EJBContext
interface. Message-driven bean instances must not call these methods.
-----------------------

I'm really confused between getCallerPrincipal thats causing me difference, what information does it get in EJB 3.0 and it seems there is change from EJB 1.3 so HFEJB is not trused while studying EJB 3.0 certificatin in this section.

Seeking clarification.

Thanks in advance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic