Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

runAs identity for MDBs

 
seema mani
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
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • 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
 
Dave Cronin
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>.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic