The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes runAs identity for MDBs Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » EJB Certification (SCBCD/OCPJBCD)
Reply Bookmark "runAs identity for MDBs" Watch "runAs identity for MDBs" New topic
Author

runAs identity for MDBs

seema mani
Ranch Hand

Joined: Sep 30, 2001
Posts: 49
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


Sun Certified Java Programmer<br />Sun Certified Web Component Developer<br />Sun Certified Business Component Developer
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8845

it is not.


Groovy
seema mani
Ranch Hand

Joined: Sep 30, 2001
Posts: 49
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

Joined: Apr 25, 2003
Posts: 114
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>.


Dave Cronin<p>SCJP,SCWCD,SCBCD
 
 
subject: runAs identity for MDBs
 
Threads others viewed
Security - Principal & run-as-identity
EJB 2.0 vs. 1.1
@RunAs Application
JAAS In WebSphere
Doubt with EJB Programmatic Security
Two Laptop Bag