WebSphere brand IBM WebSphere Premises Server, Version 6.1.x

Installing the bundle loader and a bundle list

The bundle loader is an OSGi bundle that, when started, locates a list of bundles and performs the action specified on each bundle in the list.

The bundle list file format

The bundle list is a script in which each line is a command to the bundle loader to perform an action on a specified bundle. The actions that can be performed include START and INSTALL. The START action installs and starts a bundle, while the INSTALL action only installs a bundle. After the action command is the path to the bundle on which to perform the action.

The bundle list can contain the PREFIX command as well. When this is used, the string that follows PREFIX will be prepended to the name of each bundle in the bundle list.

The bundle list also supports the INCLUDE command. The INCLUDE command points to another bundle list that will also be read by the bundle loader.

This is an example of the file format:

// The line below will look for this exact file name
START org.eclipse.osgi.services_3.1.200.v20070605.jar
// The line below will look for a file beginning with this 
// (assuming wildcarding is enabled on WebSphere Premises Server) 
START org.eclipse.osgi.services_

The bundle list location

When the bundle loader starts, it looks in three locations for the bundle list URL:

  • At startup it checks for the Configuration Admin (ConfigAdmin) service, which is an OSGi Managed Service. If the ConfigAdmin service is available and the bundle loader receives a configuration object it will look for the URL there.
  • If either the ConfigAdmin is not available or the configuration object is empty, the bundle loader looks for a system property which is either set in the config.ini file or through a Java™ command line argument.
  • If the bundle loader cannot find the list in the system property, then it looks at a default location in the file system for the ibm-rfid-bundle-list.txt bundle list.

After successfully receiving the bundle list, the bundle loader runs the commands in the list to install the bundles. This process is stored in the ConfigAdmin object as a result property (for example, value="working"). After this task is completed, the bundle loader saves the final result (as a success or a failure) in the result property. Then, when the bundle loader is restarted or when the configuration changes, the bundle loader looks in the result value to determine if it should download additional bundles.

Installing the bundle loader and bundle list

About this task

Use these steps to install the bundle loader and a bundle list. For reference, see the tools/remoteDC.zip sample packaged with the IBM® Data Capture and Delivery Toolkit for WebSphere® Premises Server.

Note: The sample config.ini uses 127.0.0.1 for the IP address of the WebSphere Premises Server. Change the value to the actual IP address if using the sample config.ini for a remote Data Capture and Delivery install.
Procedure
  1. Install Equinox on the server that will run the bundle loader.

    Equinox is packaged in the equinox folder of the IBM Data Capture and Delivery Toolkit for WebSphere Premises Server disk.

    Note: Other OSGi implementations are also supported, but this document only covers the Equinox implementation.
  2. Create a configuration directory in the eclipse path in Equinox. For example, C:\equinox\eclipse\configuration.
  3. Create a config.ini file in the configuration directory and add these lines to it:
    com.ibm.rfid.bundle.list.url=http://IP_address:port_number/bundleadmin/GetBundle?name=http://IBM_HTTP Server_name/bundles/bundlelists/dc_core.txt
    
    com.ibm.rfid.edge.config.url=http://IP_address:port_number/ibmrfidadmin/premises.sl?action=getconfig&edge=E3&version=6.1

    The values for IP_address and IBM_HTTP_Server_IP_address are the name of the server that is hosting the Bundle Repository Server.

    The second line of code configures Data Capture and Delivery to use the E3 controller, which is shipped as a sample remote controller with WebSphere Premises Server. The E3 controller loads the Simulated Reader to help verify your configuration before testing with a real reader.

  4. Start the Equinox runtime.
    Note:
    • Be sure the Data Transformation service is running on the server (dts.bat).
    • In the case of Data Transformation, the bundle loader bundle is loaded, but not started. It must be started manually.
    • The bundle lists are slightly different for Data Transformation (for example, dc_core.txt and dc_core4dts.txt). Be sure that you reference the correct bundle list version based on whether you are loading the list into a remote Data Capture and Delivery controller (dc_core.txt, dc_rdrsim.txt) or into Data Transformation (dc_core4dts.txt, dc_rdrsim4dts.txt).
  5. Start the bundle loader.
    1. Find the ID of the bundle loader bundle by running the OSGi ss command.
    2. Start the bundle loader bundle by entering start bundle_ID at the OSGi prompt.

      Once the core Data Capture and Delivery bundles are loaded, Data Capture and Delivery pulls its configuration from WebSphere Premises Server (using the com.ibm.rfid.edge.config.url= property). If this configuration includes an update to the bundle list URL, then the bundle loader attempts to load that additional list of bundles.

      This is one method of installing multiple bundle lists into a Data Capture and Delivery controller. Data Transformation is set up with E2 to run the reader simulator. The Data Transformation config.ini file points to dc_core4dts.txt file to load the core bundles, and the Data Capture and Delivery configuration then points to the dc_rdrsim4dts.txt file to then load the reader simulator. For additional methods for installing bundle lists, refer to Installing additional bundle lists.

  6. Test the configuration using the Simulated Reader in the WebSphere Premises Server Administrative Console. Choose R3 as your simulated test reader.
  7. Create a new remote Data Capture and Delivery controller based on the E3 sample and use it with your real reader.

Library | Support | Terms of use

(c) Copyright IBM Corporation 2004, 2008. All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.