JBoss.orgCommunity Documentation
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 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.
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.
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.
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.Since Resource Adaptor Type Creation and Binding is not supported in the current EclipSLEE version, you should skip these steps and move to next dialog, "Environment Entries"
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.