Before you begin
Using Enterprise
Identity Mapping (EIM) identity token connection
factories requires that
WebSphere Application Server administrative
security be enabled. However, no restrictions or limitations exist
on how you choose to configure administrative security.
Before
you deploy the sample application, you must enable WebSphere Application Server administrative
security. This step is not required if you already have administrative
security enabled for your WebSphere Application Server profile. For more
information on how to configure security, see Enabling security.
About this task
The source code files that are used to implement the sample
application are contained in the testIdentityToken.ear file
and can be used as a model for creating your own applications.
The
com.ibm.identitytoken.IdentityTokenTest class is a servlet in the
sample application. After the application is deployed, the source
code file for the IdentityTokenTest servlet is in this directory:
profile_root/installedApps/testIdentityToken.ear/testIdentityTokenWeb.war
/WEB-INF/source/com/ibm/identityToken/IdentityTokenTest.java
Note
the IdentityTokenTest servlet design features when you implement your
own application.
- A profile variable with a String type
and the name, sourceApplicationID,
is set in the init method of the IdentityTokenTest servlet. This variable
is later used with the setSourceApplicationID method of a ConnectionSpecImpl
object to uniquely identify the application to Enterprise Identity
Mapping (EIM). When you implement your own applications, use a similar
convention to assign a unique SourceApplicationID ID.
- After
an identity token is generated, it is used to create a com.ibm.as400.access.AS400
object, which is stored in an HTTPSession object immediately after
the AS400 object is used to run the OS/400® server
command on the selected host server. Only the AS400 object persists
across requests to the server (not the IdentityToken object), which
provides improved performance for subsequent requests, and the identity
token does not expire.
The following steps help you
deploy the sample application
into the WebSphere Application Server environment.