JBoss.orgCommunity Documentation
EclipSLEE provides means to create, edit and delete JAIN SLEE Service Building Blocks.
To create a component it may be easier (but not mandatory) to first create a package to contain it. This package should be created as a child of the <sbb-module>/src/main/java folder. To do this right-click on the src folder and select
→ . Give the new package a name using the popup dialog (shown below).
In case a new package is not created at this point, it can still be created in the Component wizard, but no validation is performed at that time, regarding the package naming conventions.
To create a new JAIN SLEE SBB, right-click on the created package (or the module entry if the package is not yet created) and choose
→ as shown below.
A dialog should appear. Expand the JAIN SLEE item and choose JAIN SLEE Service Building Block (SBB). The dialog should now look like the following:
Click to get the following dialog:
The source folder and package dialogs will be completed if → has been selected from right-clicking on a package. Otherwise it may need to be chosen by selecting and selecting the desired locations or typing it's name in the appropriate field and it will be created in the end.
Name the SBB; the name must end with "Sbb.java
". Then click to go to the component identity dialog, pictured below:
The Name, Vendor and Version fields are mandatory and are used by the SLEE to identify the SBB. The description field is optional, but strongly recommended to be completed to allow easy identification of the SBB in future.
After completing these fields click
to specify the SBB's Libraries.
This dialog allows to select which JAIN SLEE Libraries this SBB should reference in it's descriptor. Select them from the top list (Available Libraries) by clicking . To remove them, select them from the bottom list (Selected Libraries) and click .
When done, click
to specify the SBB's class files.
This dialog allows you to specify that a custom SBB Local Object and/or Activity Context Interface is required for this SBB. Select the required interfaces, then click to edit the SBB's CMP fields.
Here, the SBB's CMP fields can be set. Add a CMP field by clicking on . A field can be removed by selecting it in the table and clicking . To modify a CMP field, click on the button next to it in the table.
Name the CMP field in the Name text field. A CMP field can either be a standard Java object, primitive or an SbbLocalObject
. Select the statement that represents the data type to be stored in the field.
A standard Java object or primitive type requires the fully qualified type name to be entered into the Type text field. For example, java.lang.String
.
A CMP field that stores an SbbLocalObject
may only store SBBs of a specific identity. The drop down SBB box will contain all the SBBs that the EclipSLEE plugin was able to find. Choose the one that should be stored in the CMP field, and give it a Scoped Name. This is a variable name and should be a valid Java variable name, and should begin with a lowercase letter.
If an SBB needs to store an SBB of its own type in a CMP field, then the SBB must be created without that CMP field, and the CMP field added later.
Once the CMP field is correct click
and the wizard CMP page will be updated with the new data.Repeat until all CMP fields are created, then click
to edit the SBB's usage parameters:
Check Create SBB usage interface if you require the SBB usage interface. Then add usage parameters by clicking and modifying the values in the table. Two types of parameter are available: increment
and sample
.
Click
to move to the event selection dialog, shown below:
The event selection dialog contains a list of all the events the plugin could find in your project. This includes any events that were installed as external components.
At the moment, in order for the available components to be listed in the wizard, they need to be part of the classpath. For instance if you want to use SIP11 Events for your project, you will need to add it as a Maven Dependency and be part of classpath first. Refer to Section 3.3.1, “Adding a New Maven Dependency” on how to do it.
For each event that you would like your SBB to fire or receive:
Select the event in the available events table.
Click
; the event will move to the selected events table.Click
for that event in the selected events table. This will create the following dialog.Review the Scoped Name and change it if desired.
Set the event direction.
If the event direction is Receive or FireAndReceive check This is an initial event if it should be an initial event for a service.
If this is an initial event, choose one or more initial event selectors.
Click
When all events have been configured the dialog may look something like this:
Click to define the SBB's profile specifications.
The profile selection dialog contains a list of all the profiles the plugin could find in your project. This includes any profiles that were installed as external components. If your custom profiles are not listed, verify that they have been compiled and the "jars" folder refreshed.
At the moment, in order for the available components to be listed in the wizard, they need to be part of the classpath. For instance if you want to use other component profiles specification in your project, you will need to add it as a Maven Dependency and be part of classpath first. Refer to Section 3.3.1, “Adding a New Maven Dependency” on how to do it.
For each profile specification the SBB should reference:
Highlight the profile specification in the available profiles table.
Click
Review the Scoped Name and change if required.
If your SBB should contain an Address Profile Specification select it from the drop down list.
Click
to proceed to the child SBB's dialog.
The child selection dialog contains a list of all the SBBs the plugin could find in your project. This includes any SBBs that were installed as external components. If your custom SBBs are not listed, verify that they have been compiled and the "jars" folder refreshed.
At the moment, in order for the available components to be listed in the wizard, they need to be part of the classpath. For instance if you want to use the HSS Client Enabler in your project, you will need to add it as a Maven Dependency and be part of classpath first. Refer to Section 3.3.1, “Adding a New Maven Dependency” on how to do it.
For each child SBB the SBB should reference:
Highlight the child SBB in the available SBBs table.
Click
Review the
and change if required.Set the default priority of the child SBB.
Click
to proceed to the resource adaptor types dialog.
The Resource Adaptor Type Bindings dialog contains a list of all the resource adaptor types the plugin could find in your project. This includes any resource adaptor types that were installed as external components.
At the moment, in order for the available components to be listed in the wizard, they need to be part of the classpath. For instance if you want to use the SIP11 Resource Adaptor Type for your project, you will need to add it as a Maven Dependency and be part of classpath first. Refer to Section 3.3.1, “Adding a New Maven Dependency” on how to do it.
For each resource adaptor type the SBB should reference:
Highlight the resource adaptor type in the available resource adaptor types table.
Click
Optionally, specify the Activity Context Interface Factory Name.
If the RA Type should have resource adaptor entity bindings, click
.
For each binding:
Click
to create a new binding.Specify the bindings JNDI object name.
Optionally, specify the resource adaptor entity link name.
Click
to apply these bindings to the resource adaptor type.
Click
to edit the SBB's environment entries.
Add an environment entry with the "Add" button. Set its name, type, value, and optionally, description in the table. Do this for each environment entry.
Then click
to create the SBB.can be clicked at any point after setting the SBB's identity if a skeleton SBB is required. It is not necessary to complete each wizard page first.
The SBB Java file, MobicentsDemoSbb.java
(plus the remaining interfaces and classes which were selected at the wizard) is created in the specified package and opened for editing in the workspace. The sbb-jar.xml
deployment descriptor is updated to reflect the new sbb or created if not already present. The resulting workspace can be seen below.
It is possible with EclipSLEE to edit existing components. When right-clicking in one of the JAIN SLEE Service Building Block classes a similar menu should be shown:
It is also possible to edit by right-clicking on the sbb-jar.xml descriptor. In that case a sub-menu allowing to pick which Service Building Block to edit is shown:
After selecting the desired Service Building Block, the menu shown should be similar to the one presented when using the class file to edit.
The following actions are available for a JAIN SLEE Service Building Block:
This operation can be accessed by selecting Identity... and allows to change the JAIN SLEE Service Building Block identity (name, vendor, version) and it's description. The following dialog is presented:
EclipSLEE does not automatically update other component descriptors in order to reflect such identity change, so it should be made manually.
This operation can be accessed by selecting Classes... and allows to change which companion classes for the SBB should exist. The following dialog is presented:
Unchecking an option will delete the corresponding class, an irreversible operation, so it should be used carefully.
This operation can be accessed by selecting CMP Fields... and allows to Add, Remove or Modify the existing SBB CMP fields. The following dialog is presented:
This operation can be accessed by selecting Usage Parameters... and allows to change whether an Usage interface should be created and to Add or Remove SBB Usage Parameters. The following dialog is presented:
Unchecking an option will delete the corresponding class, an irreversible operation, so it should be used carefully.
This operation can be accessed by selecting Events... and allows to change the events fired by the SBB. Either changing or removing the already selected ones as well as adding new ones. The following dialog is presented:
This operation can be accessed by selecting Profiles... and allows to change the profile specifications the SBB will use. Either changing or removing the already selected ones as well as adding new ones. The following dialog is presented:
This operation can be accessed by selecting Children... and allows to change the Child Relations for the SBB, by either changing or removing the existing ones as well as adding new ones. The following dialog is presented:
This operation can be accessed by selecting Resource Adaptor Bindings.... It allows to modify or remove the existing Resource Adaptor Type bindings for this SBB and to add new ones. The following dialog is presented:
This operation can be accessed by selecting Environment Entries.... It allows to add, modify or remove this SBB Environment Entries. The following dialog is presented:
It is possible with EclipSLEE to delete existing components. Right-clicking in one of the JAIN SLEE Service Building Block classes or XML descriptor file (see Section 6.2, “Editing a JAIN SLEE Service Building Block (SBB)”) and selecting the Delete option.
A confirmation dialog similar to the following should be presented:
Deleting a component is an irreversible operation, so it should be used carefully.