![]() |
![]() |
|
|
Migrating Adapters to WebLogic Integration 2.1
Migrating an adapter developed under WebLogic Integration 2.0 to WebLogic Integration 2.1 is a simple process. The actual deployment method has been greatly simplified by reducing from three to one the actual number of files you need to create and deploy. Additionally, an auto-registration process has been added to eliminate the need to manually register an adapter.
This section contains information on the following subjects:
Changes to the Deployment Method
To migrate an adapter, you need to change how the adapter is deployed. In WebLogic Integration 2.0, an adapter had the following deployable units:
To create and deploy the .rar file for WebLogic Integration 2.0, the adapter developer bundled class files, the logging configuration, and message bundle(s) into a .jar file. This .jar file and META-INF/ra.xml was then bundled into .rar file. The adapter developer then deployed the .rar file into the J2EE-compliant container in the application server. The deployment procedure was different on every server.
To construct a valid .war file for an adapter's design time UI, the adapter developer used the Ant build process. Within the process, an Ant target constructs a valid .war file for the design-time interface in the PROJECT_ROOT/lib directory. PROJECT_ROOT is the location under the WebLogic Integration 2.1 installation where the developer is constructing the adapter; for example:
WLI_HOME/adapters/sample
In addition, this target performs an "unjar" operation in the /lib directory. This extracts the .war into a temporary directory. This is the key to having WebLogic Integration recompile JSPs without restarting.
To make the event router .war file, the adapter developer included in it the following .jar files:
The adapter developer also added any other .jar file upon which the event generator is dependent. These are specified in the <eventrouter> target in the build.xml file
How it's Done in WebLogic Integration
In WebLogic Integration 2.1, all components are contained in a single .ear file, which is deployed either manually or by using the WebLogic Integration Console. For more information on deploying adapters by using .ear files, see Deploying Adapters. For more information on .ear files, see Concepts. Refer to Listing 2-2 and Listing 2-3.
Additionally, the build.xml file has been updated to facilitate the use of .ear files. Refer to build.xml Components for a detailed description of the WebLogic Integration build.xml file.
Registering the Design-time Web Application
In addition to the deployment unit changes, WebLogic Integration uses a different mechanism to register the design-time Web application context for an adapter.
In WebLogic Integration 2.0, users were required to make an entry into the wlai.properties file to register their adapter's design-time Web application into the Application View Management Console. This allowed the end user to associate the adapter with a new application view. This step has been replaced in WebLogic Integration by an automatic registration process during adapter deployment. To use the automatic registration process, use one of these procedures:
Using a Naming Convention
The preferred approach is to use a naming convention for the design-time Web application and connector deployment.
When deploying an .ear file into WebLogic Integration, identify the file in config.xml by using the adapter logical name as the file name. Listing C-1 shows an example how to do this.
Listing C-1 Adding the Adapter Logical Name to config.xml
<Application Deployed="true" Name="ALN" Path="WLI_HOME/adapters/ADAPTER/lib/ALN.ear">
<ConnectorComponent Name="ALN" Targets="myserver" URI="ALN.rar"/>
<WebAppComponent Name="ALN_EventRouter" Targets="myserver" URI="ALN_EventRouter.war"/>
<WebAppComponent Name="ALN_Web" Targets="myserver" URI="ALN_Web.war"/>
</Application>
where ALN is the adapter logical name. You must use the adapter logical name as the value for the Name attribute on the <ConnectorComponent> element. If you name the design-time Web application deployment as ALN_Web, the design-time Web application will automatically be registered into the Application View Management Console during deployment. The DBMS, e-mail, and sample adapters use this convention.
Using a Text File
Alternatively, you can include a text file named webcontext.txt in the root of your .ear file. webcontext.txt should contain the context for the design-time Web application for your adapter. This file must be encoded in UTF-8 format.
Other Migration Issues
The following are additional changes you need to make to enable an adapter built with WebLogic Integration 2.0 deployable in WebLogic Integration 2.1.
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|