If an application is developed with a WebSphere Adapter embedded,
the adapter is deployed with the application. You do not need to install the
adapter separately. The steps to install an application with an embedded adapter
are described.
Before you begin
This task should only be performed if the application is developed
with an embedded WebSphere Adapter, and assembled with the resource adapter
archive (RAR) modules within the application. For information about assembling
applications, see
Assembling applications.
Why and when to perform this task
If an application needs to access data in an Enterprise Information
System (EIS), it can do so using J2EE Connector Architecture connectors. As
indicated in the J2EE Connector Architecture (JCA) specification, each enterprise
information system (EIS) needs a resource adapter and a connection factory.
To deploy an application that includes an embedded WebSphere Adapter, you
install the application files and create a J2C connection factory, or select
an existing connection factory, for the application to use.
To install
an application with an embedded WebSphere Adapter, use the administrative
console to complete the following steps:
Steps for this task
- Install the application. For example, follow the steps
in Installing a mediation module EAR
file with the console.
In the Map modules to servers step, specify target servers or clusters
for each RAR file. Be sure to map all other modules that use the resource
adapters defined in the RAR modules to the same targets. Also, specify the
Web servers as targets that serve as routers for requests to this application.
The plug-in configuration file (plugin-cfg.xml) for each Web server is generated
based on the applications that are routed through it.
Note: When installing
a RAR file onto a server, WebSphere ESB looks
for the manifest (MANIFEST.MF) for the connector module. It looks first in
the connectorModule.jar file for the RAR file and loads the manifest from
the _connectorModule.jar file. If the class path entry is in the manifest
from the connectorModule.jar file, then the RAR uses that class path. To
ensure that the installed connector module finds the classes and resources
that it needs, check the Class path setting for the RAR
using the console. For more information about the Class path setting,
see the Resource Adapter settings and WebSphere relational resource adapter
settings for the administrative console.
- Save your changes to the master configuration. Click .
- Create connection factories for the newly-installed application. Use the administrative console to complete the following sub-steps:
- Select the newly-installed application
- In the navigation pane, click
- In the content pane, click the name of the application
- Click Connector Modules in the Related
Items section of the page.
- Click the name of the RAR file.
- Click Resource adapter in the Additional
Properties section of the page.
- Click J2C connection factories in the
Additional Properties section of the page.
- Click the name of an existing connection factory to update
it, or click New to create a new factory.
Note: If
the WebSphere Adapter was configured using an EIS Import or EIS Export, there
is an existing connection factory or activation specification that can be
updated.
- Optional: Specify an Authentication alias for XA
recovery, or use a component-managed authentication alias. This
field is only displayed for resources that support XA transactions.
- Optional: Select a Component-managed authentication
alias.
If a desired alias is not available, or you
want to define a different one,
- Click Apply.
- Click J2C Authentication Data Entries under Related
Items.
- Click New.
- Specify general properties.
- Click OK to return to the J2C Connection Factories
Settings panel.
Select or define an alias, if any components of your application
obtain connections from this connection factory with the empty-argument getConnection()
method and with Application or Per connection factory authentication
specified in the resource reference.
If you install an adapter that includes native path elements, consider
the following information: If you have more than one native path element,
and one of the native libraries (native library A) is dependent on another
library (native library B), then you must copy native library B to a system
directory. Because of limitations on most UNIX systems, an attempt to load
a native library does not look in the current directory.
After you create
and save the connection factories, you can modify the resource references
defined in various modules of the application and specify the Java Naming
and Directory Interface (JNDI) names of the connection factories wherever
appropriate.
Note: A given native library can only be loaded one time
for each instance of the Java virtual machine (JVM). Because each application
has its own classloader, separate applications with embedded RAR files cannot
both use the same native library. The second application receives an exception
when it tries to load the library.
If any application deployed on the
application server uses an embedded RAR file that includes native path elements,
then you must always ensure that you shut down the application server cleanly,
with no outstanding transactions. If the application server does not shut
down cleanly it performs recovery upon server restart and loads any required
RAR files and native libraries. On completion of recovery, do not attempt
any application-related work. Shut down the server and restart it. No further
recovery is attempted by the application server on this restart, and normal
application processing can proceed.