Win a copy of AWS Security this week in the Cloud/Virtualization 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 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

runAs identity for MDBs

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello
I read that it is mandatory to specify the runAs security identity for a message driven bean. Is this correct ? What would happen if it is not specified ?
Thank you
 
Ranch Hand
Posts: 8943
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it is not.
 
seema mani
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi thanks for the reply. I still have a query.
In page: 501 of "Enterprise JavaBeans" by OReilly, it says "MDBs must always have a runAs security identity specified". Is this a mistake ?
Or did I understand the concept in a wrong way ?
Thank You
seema
 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The O'Reilly book compares the use of the <run-as> and <use-caller-identity> elements. As an MDB has no knowledge of the identity of its caller, it cannot use <use-caller-identity> and can only use <run-as>.
However, if the MDB never calls another EJB, or only calls methods with no security check, there is presumably no point in declaring <run-as>.
 
When it is used for evil, then watch out! When it is used for good, then things are much nicer. Like this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic