• 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
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

get security info about the client

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Always! Wait. Never. Shut up. Look at this tiny ad.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic