![]() |
![]() |
|
|
Creating a Custom Development Environment
Warning: We strongly recommend that you do not directly alter the sample adapter included with the ADK. Instead, use the GenerateAdapterTemplate utility described in this chapter. Modifying the sample adapter by any other means might result in unexpected and unsupported behavior.
To facilitate using the sample adapter (see Sample Adapter), the ADK provides GenerateAdapterTemplate, a command-line utility you can use to clone the sample adapter development tree and create a new adapter development tree.
This section provides information on the following subjects:
Adapter Setup Worksheet
The adapter setup worksheet is a questionnaire that will help you identify and collect critical information about the adapter you are developing. You can find this questionnaire in Adapter Setup Worksheet.
This worksheet is a set of 20 questions that will help you identify critical adapter information, such as EIS type, vendor, and version, locale and national language of the deployment, the adapter logical name, and whether or not the adapter will supports services. When you run GenerateAdapterTemplate, you will be prompted to enter this information. When the information is processed, a custom development tree for your adapter will be created.
Using GenerateAdapterTemplate
This section describes how to use GenerateAdapterTemplate. You will need to perform the following steps:
Step 1. Execute GenerateAdapterTemplate
To use this tool, do the following:
The system responds:
<WLAI_HOME>\dev\bin>generateadaptertemplate
***************************************************************
Welcome! This program helps you generate a new adapter development tree by cloning the ADK's sample adapter development tree.
Do you wish to continue? (yes or no); default='yes':
The system responds:
Please choose a name for the root directory of your adapter development tree:
The system responds:
created directory d:\wlai\dev\dir_name
(where dir_name is the new directory name.)
Note: If you entered a directory name that already exists, the system will respond:
d:\wlai\dev\sample already exists, please choose a new directory that does not already exist!
Please choose a name for the root directory of your adapter development tree:
Enter the EIS type for your adapter:
The system responds:
Enter a short description for your adapter:
The system responds:
Enter the major version number for your adapter; default='1':
The system responds:
Enter the minor version number for your adapter; default='0':
The system responds:
Enter the vendor name for your adapter:
The system responds:
Enter an adapter logical name; default='default_name':
The system responds:
Enter the Java package base name for your adapter (e.g. sample adapter's is sample): Java package base name
The system responds:
The following information will be used to generate your new adapter development environment:
EIS Type = 'SAP R/3'
Description = 'description'
Major Version = '1'
Minor Version = '0'
Vendor = 'vendor_name'
Adapter Logical Name = 'adapter_logical_name'
Java Package Base = 'com.java.package.base'
Are you satisfied with these values? (enter yes or no or q to quit);
default='yes':
The system responds with the appropriate build information.
Note: If you enter no, you will be routed back to Step 4. If you enter q (quit), the application will terminate.
Step 2. Rebuild the Tree
After completing the clone process, change to the new directory and use Ant, the ADK's build tool to rebuild the entire tree. For more information on Ant, see Ant-Based Build Process in Tools.
To rebuild the tree by using Ant, do the following:
Notes: The installer will perform this step for you; however, you should be aware that these settings control the Ant process.
On UNIX, the Ant file in <WLAI_HOME>\dev\project\ant needs to have an execute permission set. To add the execute permission, type chmod u+x ant.
Executing ant release will generate the Javadoc for the adapter. You can view the Javadoc by going to:
<WLAI_HOME>/dev/<CLONE>/src/overview.html
This file provides environment specific instructions for deploying your adapter in Application Integration. Specifically, it provides config.xml entries and the replacements for the path already made. In addition, the file provides mapping information. You can copy the contents of overview.html directly into config.xml, which will facilitate adapter deployment, as described in Step 3. Deploy the Adapter to Application Integration.
Step 3. Deploy the Adapter to Application Integration
After rebuilding the new adapter, deploy it into Application Integration. To do so, follow these three basic steps:
Note: For more detailed information on adapter deployment, see "Deploying the Adapter" in either Developing a Service Adapter or Developing an Event Adapter.
Note: You can simply copy the code shown in Listing 4-1 from <WLAI_HOME>/dev/<CLONE>/src/overview.html into config.xml.
Listing 4-1 Sample Code for Deploying an Adapter Created with GenerateAdapterTemplate
<!-- This deploys the WebLogic Specific .rar file -->
<Application
Deployed="true"
Name="BEA_WLS_SAMPLE_ADK_WLS.rar.rar"
Path="d:\bea\wlai1.0\dev\sample\lib">
<ResourceAdapterComponent
Name="BEA_WLS_SAMPLE_ADK_WLS.rar"
Targets="myserver"
URI="BEA_WLS_SAMPLE_ADK_WLS.rar.rar"/>
</Application>
<!-- This deploys the Web application for design time -->
<Application
Deployed="true"
Name="BEA_WLS_SAMPLE_ADK_Web"
Path="d:\bea\wlai1.0\dev\sample\lib">
<WebAppComponent
Name="BEA_WLS_SAMPLE_ADK_Web"
ServletReloadCheckSecs="1"
Targets="myserver"
URI="BEA_WLS_SAMPLE_ADK_Web"/>
</Application>
<!-- This deploys the event router Web application -->
<Application
Deployed="true"
Name="BEA_WLS_SAMPLE_ADK_EventRouter"
Path="d:\bea\wlai1.0\dev\sample\lib">
<WebAppComponent
Name="BEA_WLS_SAMPLE_ADK_EventRouter"
Targets="myserver"
URI="BEA_WLS_SAMPLE_ADK_EventRouter.war"/>
</Application>
Note: Replace all occurrences of <WLAI_HOME>\dev\sample\lib with the correct path to the adapter's lib directory for your environment in all elements shown in Listing 4-1.
wlai.adapter.<Vendor name from .rar>.<Display name from .rar>.webAppPath=<web app path>
<Vendor name from .rar> and <Display name from .rar> cannot contain the characters "." (dot), "=" (equals), or a blank space. Replace these characters by using the following mappings:
Replace all instances of "." with "+" (plus)
Replace all blank spaces with "_" (underscore)
Replace all instances of "=" with "-" (dash)
For this adapter, the entry should be:
wlai.adapter.__BEA__.BEA_WLS_SAMPLE_ADK.webAppPath= BEA_WLS_SAMPLE_ADK_Web
For this version of the ADK, you should add the .jar file for your adapter to the ADAPTER_CLASSPATH in wlaiEnv.cmd/sh, as shown in Listing 4-2:
Listing 4-2 Sample Code Showing How to Add the .jar File to a Classpath
set ADAPTER_CLASSPATH=%WLAI_LIB_HOME%\logtoolkit.jar; %WLAI_LIB_HOME%\adk.jar;%WLAI_HOME%\dev\sample\lib\BEA_WLS_SAMPLE_ADK.jar;%WLAI_HOME%\dev\dbms\lib\BEA_WLS_DBMS_ADK.jar;%WLAI_HOME%\dev\email\lib\BEA_WLS_EMAIL_ADK.jar
http://<host>:<port>/wlai
and attempt to add a new application view for your adapter. This will verify that the adapter has been deployed correctly. For instructions on adding an application view, see Defining Application Views in the BEA WebLogic Application Integration User Guide.
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|