Run-as support for servlets is similar to run-as support for EJBs:
Run-as support is defined on a per-servlet basis.
Run-as support applies to all method invocations on Beans called from the servlet.
To enable run-as support for servlets or JSPs, the servlet
or JSP must be installed in a Web application. Additionally, you
must specify corbaname
URLs
in the EJB Reference properties for the servlet or JSP that issues
the call. For information on interoperable naming URLs, see Chapter
9, “EAServer EJB Interoperability,” in
the EAServer Programmer’s Guide.
From EAServer Manager, configure the run-as identity as follows:
Expand the icon for your Web application.
Highlight the servlet for which you are configuring run-as support.
Display the Run As Identity tab and configure the settings as follows:
Run as – choose specified
.
Role – specify a role name. The identity specified in the Mapped to Jaguar identity field should be in this role. This name is used if the Web application exported to a WAR file.
Run as identity – specify a logical identity name.
Mapped to Jaguar identity – choose an EAServer identity from the drop-down list. This is the identity with which the servlet invokes components.
Description – enter an optional text comment. This field can be used to provide identity mapping instructions for the deployer when the Web application is deployed to another server.
The Existing Mappings on the Web Application table displays logical identity names that are mapped to EAServer identities by servlets in the same Web application.
You can configure a run-as identity application or server-wide. This provides a convenient way to globally set the run-as identity for all of the servlets/JSPs in an application or server. See “Configuring EJB 2.0 components or servlets to run as a different identity at the application or server level” for more information.
Copyright © 2005. Sybase Inc. All rights reserved. |