Install resource adapters within applications
Install resource adapters in the applications so they can access outside data sources.
- Assemble an application with resource adapter archive (RAR) modules in it. See Assembling applications.
- Install the application following the steps in Installing a new application. 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.
When installing a RAR file onto a server, WAS 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 verify the installed connector module finds the classes and resources that it needs, check the Class path setting for the RAR using the console.
See Resource adapter settings and WebSphere relational resource adapter settings
- Click Finish > Save to save the changes.
- Create connection factories for the newly installed application.
- Open the admin console.
- Click Resources > Resource Adapters > Resource adapters > resource_adapter > J2C connection factories.
- Click New to create a new connection factory, or click on an existing connection factory to update it.
(Windows) [AIX] [HP-UX] [Solaris]
If we install a J2C Resource Adapter that includes Native path elements, consider the following: If we 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 copy native library B to a system directory.
On some Windows systems and supported UNIX systems, an attempt to load a native library does not look in the current directory.
After you create and save the connection factories, we can modify the resource references defined in various modules of the application and specify the JNDI names of the connection factories wherever appropriate.
A given native library can only be loaded one time for each instance of the 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 appserver uses an embedded RAR file that includes native path elements, then always ensure that you shut down the appserver cleanly, with no outstanding transactions. If the appserver 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 appserver on this restart, and normal application processing can proceed.
Relational resource adapters and JCA
Related tasks
Set a resource reference
Related
CMP connection factories collection
Resource adapters collection