This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

get security info about the client

 
Yi Zou
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, all,
In First Head EJB book, it says you can get client security info in ebjCreate, ejbRemove, ejbPassivate and ejbActivate.
But in EJB spec page 90, the chart there shows you can only do this
business method.
(Unless, there is other ways to get security info instead of isCallerinRole
etc)
Anyone has any idea?
Thanks
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remember, different bean types have different lifecycles -- so while some allow you to get that information, others will throw a nasty exception (depending on when the time).
 
Vagner Freitas
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yi,

Stateless session beans can get client security info only in business methods.
Stateful session beans can get client security info in ejbCreate, ejbRemove, ejbActivate, ejbPassivate and business methods.
CMP entity beans can get client security info in ejbCreate, ejbPostCreate, ejbRemove, ejbLoad, ejbStore and home business methods.

I hope this helps you.

Vagner
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic