Win a copy of Modern frontends with htmx this week in the Spring forum!
  • 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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 ]
 
No matter how many women are assigned to the project, a pregnancy takes nine months. Much longer than this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic