Install resource adapters embedded within applications
Install resource adapters in the applications so they can access outside data sources.
The JCA Version 1.6 specification adds support for Java annotations in RAR modules. For more information on annotation support see the topic, JCA 1.6 support for annotations in RAR modules.
- Assemble an application with RAR modules in it. See the topic Assemble applications for more information.
- Install the application. Follow the steps in the topic 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.
In the Metadata for modules step of installing an application, we can set or unset the metadata-complete flag as discussed in the topic, JCA 1.6 support for annotations in RAR modules.
When installing a RAR file on a server, the application server looks for the manifest (MANIFEST.MF) for the connector module. The application server first looks for the RAR file's connectorModule.jar file and loads the manifest from the connectorModule.jar file. If the class path entry is in the manifest from the connectorModule.jarfile, 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 on how to check this setting, see the topics Resource adapter settings and WebSphere relational resource adapter settings.
- Click Finish > Save to save the changes.
- Create connection factories for the newly installed application.
See the topic, Configuring connection factories for resource adapters within applications to view the steps to complete this step.
Results
A given native library can only be loaded one time for each instance of the JVM. Because each application has its own class loader, 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.
Related concepts
Relational resource adapters and JCA JCA 1.6 support for annotations in RAR modules
Related tasks
Create or changing a resource reference Configure connection factories for resource adapters within applications Assembling applications Install enterprise application files with the console Resource adapter settings WebSphere relational resource adapter settings
CMP connection factories collection Resource adapters collection