Index Changes

User View

Jbi Ant Tasks Details

JBI Ant Task Reference

JBI Admin Ant Target Reference

  • jbi ant task definitions-The file containing the appropriate task definitions for the standard JSR-208 set of Ant tasks for administering a JBI instance. jbi ant task definitions also can be loaded using the antlib.xml resource defined in the jbi-ant-tasks.jar file as <taskdef resource="com/sun/jbi/ui/ant/antlib.xml" /> . Note: If you use the asant command, you do not need to load the JBI task defininitions as they are already defined in the default task definitions in the asant environment.

JBI Ant Tasks Demo (info)

Download Netbeans or Eclipse IDE Project with JBI Ant tasks build (info)

Runtime Configuration tasks

The runtime configuration tasks will be used to view and update the jbi environment configuration settings.

Changes to the common client interface that provides the access to the runtime configuration is defined at

The ant tasks that support runtime configuration are


GlassFish Dependency

The Ant task definitions have to be added to GlassFish's file that asant uses. Jane Young is our GlassFish asant contact for this. This jar file will have to be installed on GlassFish at installation time.

OpenESB Ant Tasks

The OpenESB Ant tasks in OpenESB codebase may have to be removed.

Integration questions

  • integrating jbi task definitions into the set of task definitions for appserver admin
    • is adding the taskdefs to default .properties is enough? how do we add them?
    • how about the antlib.xml ? what ant namespace the appserver admin tasks have?
    • can we add jbi tasks to the appserver admin antlib.xml or should we create a separate namespace and antlib.xml for jbi ant tasks?
    • A: We will update and antlib.xml in sun-appserv-ant.jar to include the jbi task definitions in asant
  • integrating jbi task implementation code
    • jbi ant tasks implementation will be delivered as two jar files. 1. jbi-ant-tasks.jar, 2. jbi-admin-common.jar. where do we add these two jar files so that asant will have them in their classpath?.
    • jbi-admin-common.jar is a common jar file for asant, asadmin and admin-web ( admin console ). So, how do we make this available to all tools? A: we will use option 3 in Possible Solutions
    • jbi-ant-tasks.jar is only for asant, but depends on jbi-admin-common.jar also. how do we make these two jars available for asant classpath? A: we will update the asant classpath to include jbi-ant-tasks.jar
    • jbi-admin-common.jar also uses appserver specific jmx connector ( HTTP connector ). how do we make the jmx connector classes available to this jar file?. A: asant includes these classes in its classpath
  • Are there any appserver specific ( and standard ) ant attributes that we have to support in jbi ant tasks as part of the appserver ant tasks?. A: target is the only attribute supported
  • Is there any standard format available to display task results ( success, failure and query results )?. A: No
  • A custom ant script ( jbi_admin.xml ) that defines a target for each jbi command is placed in $jbihome/bin. Is this place going to change for tighter integration with appserver? is $jbihome still a valid directory in the appserver integration?. A: jbi_admin.xml will be placed in $jbihome/bin under appserver install root.
  • How are the changes in the admin settings using appserver console ( e.g admin port, username, password ) propagated to the other tools that need to know these changes? A: ant tasks will not read any setting from the appserver configuration. so, no effect. User is required to pass all the connection info through ant task attributes.

How to configure asant classpath to run jbi ant tasks in glassfish

In order to run ant script with jbi ant tasks using asant tool, we need to have all the required client side classes in the asant classpath. Jbi ant tasks depends on jbi common client ( jbi-admin-common.jar ) code and the jmx connector code used in the glassfish. Since Jbi ant tasks are being developed in a separate open esb workspace there is no compile time dependency of the jbi ant tasks in the glassfish build system, but will have install and runtime dependency in building the glassfish with jbi.

The issue here is how to include the jbi ant tasks code and its dependent libraries ( jbi-admin-common.jar) in asant classpath.

Possible Solutions

we will be using option 3 in Possible Solutions


The JSR 208 specification defines a standard set of Ant tasks for administering a JBI instance. The OpenESB starter kit currently packages an implementation of these tasks, a property file containing the appropriate task definitions, and an Ant script which defines a target for each JBI command. This gives the administrator two choices for using JBI Ant tasks:

1. Invoking the JBI Ant script directly and passing in an ant target name for the appropriate JBI command:

  asant -f jbi_admin.xml start-component
2. Writing a separate Ant script which includes a taskdef for the JBI commands:
  <taskdef file=""/>
  <jbi-start-component name="HttpSoapBindingComponent"/>
For Glassfish 9.1, we would like to include the JBI task definitions "by default" in asant. This eliminates the requirement for the user to explicitly define the tasks in each Ant script they write. Using the prior example:
  <!-- Unnecessary
  <taskdef file=""/>
  <jbi-start-component name="HttpSoapBindingComponent"/>

The task and attribute names for JBI tasks are defined in the JSR-208 specification, so those cannot change. The format of the output, on the other hand, is left up to the implementation.




Jbi ant tasks implemenation will be in OpenESB workspace and will be packaged with the other jbi runtime jars to include in the glassfish builds. See installer and runtime plans for details.


Jbi ant tasks will be developed in a maven2 project "jbi-ant-tasks" under open-esb/ri-clients.

Build dependencies

Jbi ant tasks are dependent on the jbi-admin-common project and the ant apis

Unit tests

unit tests will invoke the ant tasks to check the validation of the task attributes

Regress tests

  • will run all the ri regress tests to run against the default target
  • todo: have to design the test environment to run the regress tests for other target options.

Glassfish changes

  • packaging and location of the ant task jars in the glassfish
    • jbi-ant-tasks.jar will be placed under $jbihome/lib under glassfish install directory
    • jbi-ant-tasks.jar will include jbi-admin-common.jar in its classpath in the manifest file so expects the jbi-admin-common.jar in the same directory as jbi-ant-tasks.jar
  • asant script will be updated to include the jbi-ant-tasks.jar in the asant classpath.
  • and the antlib.xml in the sun-appserv-ant.jar will be changed to include the jbi task definitions

Ant task output

ant tasks will process the management xml and query xml returned from the admin client via return values or exception and display the success or failure results.

task success result

      <task> succeeded [

task partial success result

      <task> succeeded [
         component : <name>


  start service assembly succeeded [
     WARNING:(JBIMA1223)Lifecycle command startServiceAssembly successful for MySA_1
     Component: com.sun.bpelse-1.0-2
           ERROR:(BPELSE)Service unit failed to load deployment prefix cannot be "null" when creating a QName
     Component: com.sun.httpsoapbc-1.0-2
          INFO:(JBIMA0500)Lifecycle operation start succeeded for Service Unit MySU_2

task failed result

      <task> failed [
         ERROR (<message-id>):<message>
         component : <name>


   deploy service assembly failed [
      ERROR:(JBIMA1223) can not deploy ServiceAssembly  MySA_1
      Component: com.sun.bpelse-1.0-2
            ERROR:(BPELSE) Service unit deployment failed: load deployment prefix cannot be "null" when creating a QName
      Component: com.sun.httpsoapbc-1.0-2
           ERROR:(JBIMA0500) duplicate service unit name "MySU2". 

list-* tasks failure result

   <task> failed [

list-* tasks success results

will print each object details

Example 1

    List of Service Engines
Name       : ant_test_engine1
State      : Started
Description: Ant test engine with shared library.
Name       : ant_test_engine2
State      : Started
Description: Ant test engine with shared library.

Example 2

    List of Service Assemblies
Name       : ant_test_service_assembly_1
State      : Started
Description: This is an Ant test service asssembly which deploys the service units to ant test engine and binding.

Service units in this service assembly [2]
  Service unit : ant_test_binding_1_su1
    State      : Started
    Deployed on: ant_test_binding1
    Description: This is an su for the ant test binding1

  Service unit : ant_test_engine_1_su2
    State      : Started
    Deployed on: ant_test_engine1
    Description: This is an su for the ant test engine1

Tasks and Schedule


  1. separate jbi ant tasks code from admin common to ri-clients/admin-ant and produce jbi-ant-tasks.jar separate from jbi-admin-commons.jar
  2. add target option to the ant tasks
  3. add target option to custom ant script ( jbi_admin.xml ) targets
  4. hookup the tasks to new common client interfaces
  5. setup asant in openesb environment - do the same packaging as the glassfish will do for adding the jar files to glassfish installation.
  6. fix regression tests.
  7. fix the success/failure and query results display according to appserver formats
  8. add additional appserver specific attributes to ant tasks
  9. update ant tasks/targets documentation


  • September 22 '06 - task 1,2,3,4, 5
  • September 29 '06 - task 6
  • October 06 '06 - task 7,8,9


Common Client Schedule

Back to GlassfishIntegration9.1

JSPWiki v2.4.100
« Home Index Changes Prefs
This page (revision-20) was last changed on 26-Nov-07 16:08 PM, -0800 by