aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes get security info about the client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "get security info about the client" Watch "get security info about the client" New topic
Author

get security info about the client

Yi Zou
Greenhorn

Joined: Mar 05, 2004
Posts: 14
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

Joined: May 29, 2003
Posts: 1258
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).


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
Vagner Freitas
Ranch Hand

Joined: Aug 02, 2004
Posts: 85
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


SCJA, SCJP, SCBCD & SCEA (Part I)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: get security info about the client