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).

Setting up the database

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.

  1. Install the WebSphere Business Integration Adapter Framework or WebSphere InterChange Server and all their pre-requisites.
  2. Install IBM DB2 Version 8, Fix pack 2.
  3. Create the following user ids in your operating system:
    TwineBall, TwineBallAdapter.
    Give them the password
     sample42
      
     
    
  4. 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.
  5. Run the Twine-database.bat script. You should not receive any error messages. If you do, resolve them before continuing.
  6. Create the tables needed by the TwineBall server. In the setup/SQL directory, you'll find TwineBall-Schema.bat and TwineBall-Schema.SQL.
  7. Run the TwineBall-Schema.bat script. Resolve any errors before continuing.
  8. Set up the Event and Archive tables. In the setup/SQL directory, you'll find WBIA-Events.sql and WBIA-Events.bat.
  9. Run the WBIA-Events.bat script. Resolve any errors before continuing.

Running the server

To run the server, follow these steps.

  1. 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.
  2. Create a directory called TwineBall under the connectors directory of your Adapter Framework or InterChange Server installation.
  3. 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).
  4. 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.
  5. Add the newly created TwineBall directory to your system CLASSPATH. This will allow the Java runtime to find the server classes.
  6. 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.
  7. Create a new directory called Properties inside the TwineBall directory.
  8. Place the TwineBall.policy and TwineBall.db2.properties files from the dependencies directory here and rename TwineBall.db2.properties to TwineBall.properties.
  9. 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.
  10. Start the TwineBall server by executing the runserver script. The message "Server ... has been registered" appears when it is working.
  11. Leave the server running in a window. Your ODA and adapter will connect to it via RMI.

Starting the TwineBall connector

To start the TwineBall connector, follow these steps.

  1. Create a directory called TwineBall inside the /connectors directory of your Adapter Framework or InterChange Server installation.
  2. 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.
  3. 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.
  4. Start up the Connector Configurator and change the MessageFileName standard property to "TwineBallAdapter.txt".
  5. 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
      
     
    
  6. 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.

Starting the TwineBall ODA

To start the TwineBall ODA, follow these steps.

Using JNI

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.

Copyright IBM Corp. 1997, 2003