Chapter 23. Packaging the custom adapter for distribution 409
Invoking the connector
To actually invoke the connector within the JVM™, the start_connName.bat
script usually calls the start_adapter.bat script. The start_adapter.bat script
provides information to initialize the necessary environment for the connector
run-time (which includes the Adapter Framework) with its startup parameters.
We do not have any of the external variables that require setup. Those
variables that are not set as part of our system environment are set by the call
to the CWConnEnv environment setup utility.
We are making the call to start the adapter from within our
start_RMConnector.bat file as shown in Example 23-2.
Example 23-2 Adapter start
%CWJAVA% -mx128m %ORB_PROPERTY% -Djava.security.policy=policy.txt
-Djava.ext.dirs="%MQ_LIB%";%JRE_EXT_DIRS%
-Djava.library.path="%CROSSWORLDS%"\bin;%CONNDIR%;"%MQ_LIB%";%JRE_EXT_DIRS%
-Duser.home="%CROSSWORLDS%" -cp %JCLASSES%;%CONNDIR%\%CONNAME%.jar;
AppEndWrapper -l%CONNPACKAGENAME% -n%CONNAME%Connector -s%SERVER% %3 %4 %5
When we start the connector, we pass the following parameters:
The name of connector definition: -n (RM)
The name of the broker instance: -s (WMQI_WAS)
The location of the local connector configuration file: -c
C:\IBM\WebSphereAdapters\connectors\RM\RMConnector.cfg
Note: The Java security policy parameter uses a file named policy.txt. This
file sets the security permissions and is included in the Additional
Materials. Copy this file to the RMConnector directory with all of the other
required files.