Getting up and running
The TwineBall server, adapter, and ODA have been tested for
Windows only. They may work on other platforms, but testing them is
left as an exercise for the user.
To run the TwineBall sample, you must have a JDK installed
(preferably 1.3.1).
In order to demonstrate create, restore, update, and delete
(CRUD) operations and true metadata-driven design, the TwineBall
server uses an actual database to define its entities and store its
data. This necessitates some additional setup. Scripts have been
provided to make this easier, but these scripts will require some
slight modification to match your system.
To set up the database, follow these steps.
- Install the WebSphere Business Integration Adapter Framework or
WebSphere InterChange Server and all their pre-requisites.
- Install IBM DB2 Version 8, Fix pack 2.
- Create the following user ids in your operating system:
TwineBall, TwineBallAdapter.
Give them the password
sample42
- Create the Twine database. In the setup/SQL
directory, you'll find Twine-database.bat and
Twine-database.sql.
Edit Twine-database.sql to match your password for the
db2admin id.
- Run the Twine-database.bat script. You should not receive any
error messages. If you do, resolve them before continuing.
- Create the tables needed by the TwineBall server. In the
setup/SQL directory, you'll find TwineBall-Schema.bat and
TwineBall-Schema.SQL.
- Run the TwineBall-Schema.bat script. Resolve any errors before
continuing.
- Set up the Event and Archive tables. In the setup/SQL
directory, you'll find WBIA-Events.sql and WBIA-Events.bat.
- Run the WBIA-Events.bat script. Resolve any errors before
continuing.
To run the server, follow these steps.
- Compile the entire Java source tree in both the /src
and JNI_Supplement directories by importing all the Java
source into a project in an IDE.
Configure the IDE to have all the JAR files in the
/libdirectory of the InterChange Server or Adapter
Framework in the CLASSPATH.
- Create a directory called TwineBall under the
connectors directory of your Adapter Framework or
InterChange Server installation.
- Export all compiled class files into this directory using a
normal Java package structure (that is,
com.ibm.sample.MyClass stored as
com/ibm/sample/Myclass.class).
- Copy all the files in the setup\scripts directory to
this folder as well. Normally an application would be in a
different directory than an adapter, but structuring it this way
will simplify the install.
- Add the newly created TwineBall directory to your
system CLASSPATH. This will allow the Java runtime to find the
server classes.
- Make sure the Java Development Kit bin directory is in
the CLASSPATH. Run the runrmic.bat file. This will produce the
necessary stubs and skeletons necessary for RMI communication.
- Create a new directory called Properties inside the
TwineBall directory.
- Place the TwineBall.policy and TwineBall.db2.properties files
from the dependencies directory here and rename
TwineBall.db2.properties to TwineBall.properties.
- Edit the TwineBall.properties file to change
server.name to your system name. For instance, if your
machine is called JEFFB, your server.name will be
//JEFFB:2112/TwineBallServer.
- Start the TwineBall server by executing the runserver
script. The message "Server ... has been registered" appears when
it is working.
- Leave the server running in a window. Your ODA and adapter will
connect to it via RMI.
To start the TwineBall connector, follow these steps.
- Create a directory called TwineBall inside the
/connectors directory of your Adapter Framework or
InterChange Server installation.
- Put the configuration file in that directory if you are not
running the Adapter Framework for WebSphere InterChange
Server.
If you are running InterChange Server, import the
configuration.
- Create the necessary WebSphere MQ queues for running the
adapter for your broker. If the broker is InterChange Server, this
may not be necessary because you can use the IDL transport.
- Start up the Connector Configurator and change the
MessageFileName standard property to
"TwineBallAdapter.txt".
- Attempt to start the connector using the ordinary syntax for
starting an adapter. For example:
start_TwineBall TwineBall WMQI -c
C:\IBM\WebSphereAdapters\connectors\TwineBall\TwineBall.cfg
- To test the adapter, you can set up a pass-through
collaboration in InterChange Server or reverse the delivery and
service call queues in non-InterChange server mode. However, these
procedures are beyond the scope of this document.
To start the TwineBall ODA, follow these steps.
- Attempt to start the ODA by running the start_twineballODA.bat
file.
- Attempt to use the ODA by discovering it through Business
Object Designer.
- When you select the nodes from which business objects will be
created, please select all the business objects you want to create
at the same time. Child business objects will not be created unless
you specifically select them.
You can build a Java adapter and use the Java Native Interface
(JNI) to call the C++ API. Refer to The Java Native Interface
(JNI) for details.
