Once you have written the connector's application-specific component,
you must compile it into an executable format, its
connector library. This section provides information on how
to compile and link a connector.
This section provides the following information:
To build the application-specific component of the connector, you need to
include the connector header file, include any other required header files,
compile the source files, and link CwConnector.lib to create
the connector's dynamically loadable library (DLL).
Important:
- Previous releases of IBM WebSphere InterChange Server and WebSphere
Business Integration Adapters provided the Cayenne libraries for use in C++
connectors. However, with this release (version 2.4 of the
WebSphere Business Integration Adapter Framework) the Cayenne libraries have
been replaced by Standard Template Libraries (STL). Therefore, you must
recompile any existing custom C++ connectors so that they use the new
STL.
- On Windows systems, the CwConnector.lib file is provided
as part of the C++ Connector Development Kit (CDK). The CDK is
supported only on Windows systems. Therefore, creation of a
C++ connector is supported only on Windows systems. On a
UNIX-based system, you cannot compile and link a C++
connector; however, you can run existing C++ connectors.
On a Windows system, use the MicroSoft Visual C++ 6.0 programming
environment to build your connector, and follow these instructions:
- Make sure that the system PATH variable includes the C++ connector
library,
CwConnector.dll, which resides in the bin subdirectory
of the product directory.
- In the Project Settings window under C/C++, add CDKIMPORT to the
Preprocessor definitions for the project.
- In Project Settings, C/C++, Additional include directories under the
Preprocessor category, add:
..\..\generic_include
- Important:
- Because of the replacement of the Cayenne libraries with STL, you no longer
need to include the cayenne_include directory in your C++
files. In addition, you can no longer use any Cayenne classes or
methods in your C++ connector.
- Define the information displayed in the Version tab of the Properties
window for your connector DLL. Follow these steps:
- Create a file named ConnectorVersion.h and define the
constants for your connector, such as Product Name and Product Version.
A sample for this file is located in the following subdirectory of the product
directory:
DevelopmentKits\cdk\samples\sampleconnector\include
- Note:
- This sample ConnectorVersion.h file provides values for the
Product Name and Product Version. Make sure you change these sample
values to values that are appropriate for your connector. To check the
version of a DLL, right-click on the DLL and choose the Properties>Version
tab. The correct version must appear here.
- In the project file, make sure that the following file is added to the
project:
DevelopmentKits\cdk\ConnectorVersion.rc
- In the Additional Resources Include section, make sure the following
include directories exist:
- ..\..\generic_include
- the include directory for your connector
The Version window uses the files ConnectorVersion.rc and
generic_include\CxResourceVersion.h, which are shipped with
the CDK. You need to define the ConnectorVersion.h
file for your connector.
- In the Project Setting Link tab, add the appropriate version of the C++
connector library (CwConnector.lib) to your project, as
follows:
- Compile and link the connector.
- Create the C++ connector's
library file, which is a dynamically loadable library (DLL).
The suggested naming convention for the connector DLL file is to have it
match the connector name (Table 89). For more information, see Naming the connector.
For example, for a C++ connector with a connector name of MyCPP,
the name of its DLL is:
MyCPP.dll
Use the MicroSoft Visual C++ 6.0 programming environment to run a
debug version of a C++ connector. Assuming that the WebSphere Business
Integration Adapters product is installed into a directory that
ProductDir represents, to run a debug version of a C++ connector,
set the executable for the debug session under Project Settings to the
following:
ProductDir\bin\java.exe
In the program arguments, set the debug parameters to:
-Duser.home=ProductDir
-classpath ProductDir\lib\crossworlds.jar;ProductDir\lib\rt.jar;
ProductDir\lib\mq.jar AppEndWrapper -ddllName -nconnectorName
-sICSinstanceName
