• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Why not getCallerPrincipal in ejbActivate and ejbPassivate?

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got problem with question 6 at page 594 with answers at page 597 in HF EJB. What disturbs me is why I can�t call getCallerPrincipal in ejbActivate and ejbPassivate? But on the other hand CAN do it in ejbCreate!

This is a confusing for me because in the ejbCreate do I NOT have access to the EJBObject yet because it is not created until the entity have been created in the DB which is shown clearly at page 329, but I yet HAVE access to security information about the client according to page 338. Okay, I can accept that because there is a client that is currently creating a new entity. But then is it confusing that I NOT have access to the information about the user, that is can call getCallerPrincipal, in ejbActivate and ejbPassivate because there do I HAVE access to the EJBObject and the entity bean is going to or has just been executing for a specific entity. Therefore can I not find a clear good reason to why I not can call getCallerPrincipal in ejbActivate and ejbPassivate and therefore is it also hard to memorize that I can�t do it.

So can anyone give a clear good non-confusing reason to why I can�t call getCallerPrincipal in ejbActivate and ejbPassivate despite I can do it in ejbCreate please?!
[ June 24, 2007: Message edited by: Jonny Andersson ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic