Previous Topic: Start Bundle Builder from an Ant TaskNext Topic: Logging for Bundle Builder


How Bundle Builder Packages a Connector

When you use Bundle Builder to create a bundle for a new connector, the tool does the following:

  1. Parses the bundle manifest to get the list of JAR files that should be included.

    This is listed in the Bundle-Classpath property in the bundle manifest.

  2. Looks for an entry in the bundle manifest classpath for a jar file prefixed with ‘jcs-connector-‘.

    This will be identified as the main connector jar file.

  3. Opens the ‘jcs-connector-...jar’ file and extracts the connector.xml file.
  4. Creates and compiles the connector class factory for the connector.

    This class is used by the core connector server when it needs to use java reflection to creating a new instance of a class that is contained in the connector bundle. . OSGi requires that the classloader of the bundle that contains the class be used when creating a new instance of a class.

    The compiled class and the src will be included in the root folder of the connector bundle.

  5. Modifies the connector.xml to make the connector class factory available to the connector.

    This requires adding a bean definition for the connector class factory, and injecting the bean definition into the impl bundle definition in the connector.xml. The modified connector.xml will be located in the META-INF/spring folder of the connector bundle.

  6. Creates the spring configuration to register the connector as an OSGi service.

    This will expose the impl bundle as a service to CA IAM CS when the bundle is deployed and started. The name of this file will be connector-osgi.xml and will be located in the META-INF/spring folder of the bundle.

The connector bundle is now ready to be used.