• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

get security info about the client

 
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
 
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).
 
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
 
Seriously Rick? Seriously? You might as well just read this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic