Index Changes
This is version 4. It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

Using the Scheduler Binding Component


Scheduler Binding Component Application Variables

Application Variables

The binding component Application Variables property allows you to define a list of name:value pairs for a given stated type. The application variable name can be used as a token for a WSDL extensibility element attribute in a corresponding binding. For example, if you were defining an application variable for the hostname as FOO, then the WSDL attribute would be ${FOO}. In the Application Variables property you would enter a String value of FOO for the name, and the desired attribute as the value.

When you deploy an application that uses application variables, any variable that is referenced in the application's WSDL is loaded automatically.

The message sent by the Scheduler Bonding Component when a trigger is fired can reference Application Variables. These Application Variables are set at the time of deployment and are appraised each and every time a message is sent. This allows that variables to be changed dynamically, on the fly.

This feature allows the administrator to control confidential information in a message, such as passwords, by allowing them to add this information after a project's design time, and allowing changes to this information without changing a project's business logic.

Using Application Variables in a Trigger Message

Application Variables are created using the Scheduler Binding Component runtime properties editor. They can also be created using the GlassFish Admin Console and the asadmin Command Line Interface (CLI).

Creating and Using Application Variables

Note - Any defined Application Variable is available to all JBI applications deployed in a GlassFish server, therefore care must be taken to qualify Application Variables for different deployments. Typically, you can do this by adding a unique prefix to the Application Variable name, such as the name of the WSDL binding. For example, in the image above, the prefix “cronBinding.” is used as a prefix.

  1. Reference the Application Variable in the Message field of the trigger editor, using the dollar-sign curly braces format, as highlighted in the figure below.
    Image shows the Cron trigger editor and demonstrates using Application Variables in the Message field

  2. Next, prior to deployment time, set the referenced Application Variables. To do this
    1. From the Services window, right-click the sun-scheduler-binding, under GlassFish V2 → JBI → Binding Components, and choose Properties from the pop-up menu. The sun-scheduler-binding Properties editor appears.
    2. Click the edit button for the Application Variables property. The Application Variables dialog box appears.
    3. Click Add, and select the type of variable type for your Application Variable: String, Number, Boolean, or Password. Click OK
      Image shows the Scheduler runtime properties editor as described in context

      A new row is added to the Application Variables dialog box.
    4. For each Application Variable, enter the name, exactly as referenced in the Message field of the trigger editor, omitting the dollar sign and curly braces.
    5. Enter the Application Variable's corresponding value in the Value field. Password values are masked for confidentiality.Image shows the Application Variables dialog box with two Application Variables configured(info)
    6. Once you have completed all of your Application Variables, Click OK.

      The Application Variables are added to the sun-scheduler-binding Properties Editor's Application Variables field, and are ready to use.
Note - The value field cannot reference another Application Variable.

Using Admin Console and asadmin to Create Application Variables

In addition to the NetBeans IDE, you can also use these other tools to create Application Variables for the Scheduler Binding Component.

GlassFish Admin Console
To access the Admin Console, from the NetBeans Services window, right-click GlassFish V2 under Servers and choose View Admin Console from the pop-up menu. You can also access the Admin Console at http://localhost:4848/login.jsf.

To open the Manage Application Variables window in the Admin Console, select the sun-scheduler-binding, under Common Tasks → JBI → Components. Select the Application tab and the Variables sub-tab.
Image shows the Manage Application Variables window of the GlassFish Admin Console
asadmin Command Line Interface
For information on using the Command Line Interface (CLI) to create, update, and delete Application Variables, see Create JBI Application Variables, Update JBI Application Variables, or Delete JBI Application Variable.


JSPWiki v2.4.100
« Home Index Changes Prefs
This particular version was published on 01-May-09 11:48 AM, -0700 by rjacobus