Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

run-as Element

 
Shivani Chandna
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
run-as is an optional element in the <servlet> tag.

But in the Servlet Specs - the sub-elements of run-as are not mentioned?

In the following page Ersin Eser Deployment Descriptor aid the sub - elements of run-as are mentioned to be role-name(mandatory) and description(Optional). Is this because this site is specifying servlet 2.3 DD ?

Or am I missing something??



Really confused.

-- Shivani.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is in the spec, but not very clear


The run-as element specifies the identity to be used for the execution
of a component. It contains an optional description, and the name of a security
role specified by the role-name element.


By looking at the j2ee schema, I found that there were two subtags:
description and role-name.

I don't know why they're not shown in the <servlet> diagram...
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

<run-as> is useful in the full Enterprise Application. It used when EJB and Servlet used togather. The EJB requires some role to be provided by container (depends on DD setting). The servlet can intoduce itself using <run-as> element to EJB. Not really used it, but read somewhere.

Thanks
 
Shivani Chandna
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was thinking of learning the elements in DD from the diagram given in SPECS. But the diagram looks incomplete ( I just discovered run-as did not have sub-elements in it) .

Is Ersin Eser Deployment Descriptor aid complete and correct?.
Narendra can you confirm? .

Since it had a header of Servlet 2.3 DD when I was a firing a printout of it....Hmm....

Thanks,
Shivani
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


Is Ersin Eser Deployment Descriptor aid complete and correct?.


I had not refer above DD.

In the specifications, though it is not shown in the diagram, the description in given on page 139.


The run-as element specifies the identity to be used for the execution
of a component. It contains an optional description, and the name of a security role specified by the role-name element.


For more information on run-as element please refer,
SRV.12.7 Propagation of Security Identity in EJB Calls


Hope this help you.

Thanks
[ August 07, 2006: Message edited by: Narendra Dhande ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic