Jain - Slee 1 - 0 FR Spec
Jain - Slee 1 - 0 FR Spec
Jain - Slee 1 - 0 FR Spec
0 Specification,
Final Release
Specification Leads:
David Ferry
Open Cloud Limited
JAIN SLEE 1.0 Specification, Final Release
1/30/2004 - 13:00:00
Table of Contents
Chapter 1 Introduction .......................................................................1
1.1 Target audience.............................................................................................................................. 1
1.2 Typographic and terminology conventions............................................................................... 1
1.3 Acknowledgements....................................................................................................................... 1
1.4 Organization ................................................................................................................................... 2
1.5 Goals ................................................................................................................................................ 3
1.6 Scope ............................................................................................................................................... 3
1.7 Relationship with JAINTM ............................................................................................................ 4
Chapter 4 Addresses.......................................................................... 38
4.1 Address objects........................................................................................................................38
4.2 AddressPlan objects .............................................................................................................39
4.3 Address string...............................................................................................................................40
14.14 Security........................................................................................................................................237
C.6 Restrictions.................................................................................................................................266
Chapter 1 Introduction
This is the specification of the JAIN TM Service Logic and Execution Environment (SLEE) architecture.
This architecture defines a component model for structuring the application logic of communications appli-
cations as a collection of reusable object-oriented components, and for composing these components into
more sophisticated services. The SLEE architecture also defines the contract between these components
and the container that will host these comp onents at runtime.
The SLEE specification supports the development of highly available and scaleable distributed SLEE
specification compliant application servers, but does not mandate any particular impleme ntation strategy.
More importantly, applications may be written once, and then deployed on any application server that com-
plies with the SLEE specification.
In addition to the application component model, the SLEE specification also defines the management inter-
faces used to administer the application server and the application components executing within the appli-
cation server. It also defines a set of standard Facilities, like the Timer Facility, Trace Facility, and Alarm
Facility.
1.3 Acknowledgements
The JAIN SLEE architecture is a broad effort that includes contributions from numerous people at Sun,
Open Cloud, and at partner companies.
We acknowledge Phelim O’Doherty of Sun, David Page, Steven Adams, Koryn Grant, Oliver Jowett, Ben
Evans, Matthew Hutton, Catherine Allen and Nick Earle of Open Cloud for their valuable direct contribu-
tions. They wrote and edited many chapters and appendices in this document and provided much needed
critical reviews.
We thank the members of the JAIN SLEE Expert Group for their contributions to this specification. The
expert group members include: Chammika Subasinghe of Fujitsu, Gal Shachor, Shmuel Kallner, Joe McIn-
tyre of IBM, Anders Lundqvist and Mickael Larsson of Incomit, Herb Ca lhoun of Motorola, John Storrie of
Nortel Networks, Atsuyoshi Shirato, Shinji Tanaka and Hideki Shina of NTT, Yaron Sheffer and Teddy
Pardo of Personeta, Ulf Lange of Siemens, and Ramana Devarapalli and Stuart Broad of TrueTel Commu-
nications, Michael Maretzke of Vodafone.
We thank Subodh Bapat, Charlie Tierney, Rob Goedman, and Margaret Nilson of Sun, and David Long of
Open Cloud for their enthusiastic support and continuing to dedicate valuable resources to this effort
throughout its long gestation process.
We thank Douglas Tait, Steven Grover, and Gary Bruce of the JAIN team for their tireless effort in promot-
ing JAIN, and more specifically, the JAIN SLEE.
We also thank Vlada Matena and Mark Hapner of the Sun Microsystems J2EE team for sharing their exper-
tise in comp onent models and application server architectures.
1.4 Organization
This document is divided up into several chapters as follows:
• Chapter 2, ‘Overview’ discusses at a high level each of the concepts required in order to under-
stand the JAIN SLEE architecture.
• Chapter 3, ‘Putting it Together’ discusses how a developer would implement a Service Building
Block (SBB) component, compose SBB components into higher level SBB components and Ser-
vice components, define components for custom event types and provisioned data, deploy and
administer Service components.
• Chapter 4, ‘Addresses ’ discusses addresses.
• Chapter 5, ‘SBB Local Interface’ discusses how an SBB component defines its local interface that
is used by other SBBs to invoke this SBB in a synchronous manner.
• Chapter 6, ‘The SBB Abstract Class’ discusses the SBB abstract class and the life cycle of its in-
stances.
• Chapter 7, ‘Activity Objects, Activity Contexts, and Activity Context Interface Objects’ discusses
Activities and Activity objects, how Activities are represented in the SLEE by Activity Contexts,
the Activity Context Interface objects that expose the attributes of an Activity Context and the re-
lationships of these objects to other objects and entities.
• Chapter 8, ‘Events’ discusses the SLEE event architecture, defining events, and the semantics of
firing and receiving events.
• Chapter 9, ‘Transactions’ discusses how the SLEE uses well-established transaction concepts to
respond to unexpected failures during execution.
• Chapter 10, ‘Profiles and Profile Specifications’ discusses defining the schema and behavior of
Profiles using Profile Specifications, the classes and interfaces that implement these Profile Speci-
fications, and the life cycle of instances of these classes.
• Chapter 11, ‘Usage Parameters’ discusses defining counters and sample sets that are updated by
SBB components and the operations available to manage usage parameter sets and the data con-
tained within them.
• Chapter 12, ‘Runtime Environment’ discusses the application programming interfaces provided by
the SLEE at runtime and the restrictions that the SLEE imposes on components running in the
SLEE.
• Chapter 13, ‘Facilities’ discusses the standard Facilities defined by the SLEE specification.
• Chapter 14, ‘Management’ discusses the management interfaces exposed by the SLEE inclu ding
those for subscription management, Service management, and management of the SLEE Facilities.
• Chapter 15, ‘Resource Adaptors’ discusses resources, resource types, and how resources interact
with the SLEE.
• Appendix A, ‘Event Router Formal Model’ discusses the desired behavior of the SLEE event
router with a formal mathematical specification.
• Appendix B, ‘Event Router Pseudo Code’ discusses the desired behavior of the SLEE event router
using pseudo code.
• Appendix C, ‘JCC Resource Adaptor Type’ discusses the recommended way to adapt and plug
JCC resources into the SLEE.
• Appendix D, ‘JAIN SIP Resource Adaptor Type’ discusses the recommended way to adapt and
plug JAIN SIP resources into the SLEE.
• Appendix E, ‘JAIN TCAP Resource Adaptor Type’ discusses the re commended way to adapt and
plug JAIN TCAP resources into the SLEE.
• Appendix F, ‘ Integration with EJB applications’ discusses the recommended way to integrate
JAIN SLEE with Enterprise JavaBeans
1.5 Goals
The JAIN Service Logic and Execution Environment (SLEE) architecture has the following goals:
• Define the standard component architecture for building distributed object-oriented communica -
tions applications in the Java™ programming language.
• Allow the development of distributable communication applications by combining components
developed using tools from different vendors.
• Support simple application development. Application developers wi ll not have to understand low-
level transaction and state management details, multi-threading, connection pooling, and other
complex low-level APIs.
• Adopt the Write Once, Run Anywhere™ philosophy of the Java programming language. Applica-
tion components can be developed once, and then deployed on multiple platforms without recom-
pilation or source code modification.
• Address the development, deployment, and runtime aspects of a communications application’s life
cycle.
• Define the interfaces that enable communication applications from multiple vendors to develop
and deploy components that can interoperate at runtime.
• Compatible with the Enterprise JavaBeans (EJB) specification and the Java Naming and Directory
Interface (JNDI) specification. SLEE vendors should be able build an implementation of the SLEE
specification on an EJB 2.0 compliant J2EE implementation. J2EE vendors may also choose to ex-
tend their existing EJB servers to support JAIN SLEE applications.
• Compatible with the Java Management Extensions (JMX) specification. JMX can be used as an
instrument that can be controlled by a JMX server.
• Compatible with other Java programming language APIs.
1.6 Scope
The first version of the JAIN SLEE specification deals with commonly used functions that are routinely
required in an execution platform, where application developers need to provide the application logic. This
typical functionality deals with the application life cycle – installation, management and execution - and the
framework under which the applications run.
This specification does not address the connection of external resources, such as protocol stacks, to the
SLEE. This interface will be addressed in a subsequent revision.
Chapter 2 Overview
A SLEE is an application server. This application server is a container for software comp onents. The SLEE
specification is designed and optimized for event driven applications.
The SLEE specification is targeted at users of a SLEE. These users include the developer of software com-
ponents running on the SLEE and Administrators managing the software comp onents deployed on the
SLEE.
This specification does not specify how a SLEE vendor should implement a SLEE and the underlying tech-
nology. Multiple implementation choices allow multiple SLEE vendors to differentiate their products and
to ensure diversity in the SLEE market.
event. The application code may interact with the resource that emitted the event or other resources, fire
new events or update the application state.
A common example of an event driven application is an application that implements a state machine. A
state machine has states and transitions. A transition occurs when there is an occurrence that causes the
state machine to move from one state to another state. A transition may be annotated with computation that
occurs during the transition.
When an application implements a state machine, the application’s variables determine the state of the state
machine, Events represent occurrences on state transitions, and application code performs computations on
transitions.
A common way to build an event driven application is to provide a single event handler method to receive
all events. When the event handler method receives an event, it inspects the event and directs further proc-
essing of the event based on the event type. Often this processing is delegated to a separate method for
each event type.The SLEE component model models the external interface of an event driven application
as a set of events that the application can receive. Each event type is handled by its own event handler
method. This enforces a well-defined event interface. The event driven component model allows the SLEE
to provide the event routing logic for the application.
One of these interfaces is known as the resource adaptor interface. It also defines the event types
fired by the resource adaptors of the same resource adaptor type. The SLEE specification includes
non-normative recommendations for the JCC, SIP, and TCAP resource adaptor types. Typically, a
resource adaptor type is defined by an organization of collaborating SLEE or resource vendors,
such as the SLEE expert group.
• Resource adaptor.
A resource adaptor is an implementation of a particular resource adaptor type. There may be mu l-
tiple implementations of the same resource adaptor type. A resource adaptor consists of a set of
Java classes and a d eployment descriptor. It must include a Java class that implements the resourc e
adaptor interface of its resource adaptor type. Typically, a resource adaptor is provided either by a
resource vendor or a SLEE vendor to adapt a particular resource implementation to a SLEE. It also
includes the Java classes of the resource. For example, vendor A that has a JCC resource may pro-
vide a JCC resource adaptor (i.e. a resource adaptor of the JCC resource adaptor type) or SLEE
vendor B may provide a JCC resource adaptor that adapts vendor A’s JCC resource to its SLEE.
In either case, the JCC resource adaptor will include the Java classes of the JCC implementation
and the Java classes that adapt the JCC implementation to the SLEE.
• Resource adaptor entity.
A resource adaptor entity is an instance of a resource adaptor. Multiple resource adaptor entities
may be instantiated from the same resource adaptor, For exa mple, a JCC resource adaptor that
adapts a SIP-based JCC implementation to the SLEE may accept IP addresses and port numbers as
parameters. The Administrator may instantiate one of these JCC resource adaptors for each unique
IP address and port number pair. An important function of a resource adaptor entity is to forward
events originating from the resource that the resource adaptor entity represents to the SLEE.
2.1.7 Packaging
An application is composed from one or more components. Each component may consist of one or more
Java class files and deployment descriptors. The SLEE specification defines how a component’s Java class
files and the comp onent’s deployment descriptor are aggregated into a deployable unit.
• How the SLEE reclaims an SBB entity tree and its associated descendent SBB entities
• Activity Context Interface interface and Activity Context Interface object
• Profile, Profile Table, and Profile Specification
• Service
• Deployable unit
• Management interface
15
Y SBB
X SBB
20 125
(root)
-20
Z SBB
B Service (root)
33
C Service
A Service 22
80
-11
SLEE
For example, the SLEE may instantiate a root CallBlockingAndForwarding SBB entity to handle a single
call. This SBB entity may subsequently create zero or more children CallBlocking SBB or CallForwarding
SBB entities to help it handle the call. This SBB entity tree has one root CallBlockingAndForwarding SBB
entity and zero 1 or more directed edges from the root SBB entity to its child CallBlocking SBB entities or
CallForwarding SBB entities.
To illustrate that a child SBB of a root SBB may also be a root SBB in this example, the CallBlocking SBB
is also a root SBB. Hence, the SLEE may also create a root CallBlocking SBB entity to handle a different
call. This SBB entity tree of this root CallBlocking SBB entity only contains the root CallBlocking SBB
entit y.
Figure 2 illustrates several SBB entity trees that may be instantiated from the SBB graph in Figure 1. It also
shows the SLEE as the “logical parent” of all root SBB entities. The root SBB entities in this example are
X1, X2, and Z2. X1, Y1, Z1, and Y2 belong to the SBB entity tree rooted at X1. X2 belongs to the SBB
entity tree rooted at X2. Z2, Z3, Y3, Z4, Z5, Z6 belong to the SBB entity tree rooted at Z2.
15 Y1
X1 -20
-11
Z1 20
Y2
33 X2
SLEE
22 82 Z4
80 Z3 80
Z2 20 Z5
Y3 125
Z6
1
It has zero directed edges before the root SBB entity creates any child SBB entities or after it has removed all its child SBB entities.
JAIN SLEE 1.0 Specification, Final Release Page 10
Chapter 2
Overview
2.2.9 Activity
An Activity represents a related stream of events. These events represent occurrences of significance that
have occurred on the entity represented by the Activity. From a resource’s perspective, an Activity repre-
sents an entity within the resource that emits events on state changes within the entity or resource.
2
JVM garbage collection does not solve this problem as SBB entity state is not directly related to instances of SBB objects.
3
The SBB entity exists but the SLEE may not assign an SBB object to the SBB entity until the SBB entity is invoked.
JAIN SLEE 1.0 Specification, Final Release Page 11
Chapter 2
Overview
The SLEE maintains an implicit attachment count for each SBB entity. The a ttachment count of an SBB
entity is the total number of SBB entity to Activity Context attachments that the SBB entity and its descen-
dent SBB entities have.
Figure 3 illustrates attachment relations and counts graphically. In this graph, rectangles represent Activity
Contexts and ovals represent SBB entities. An SBB entity to Activity Context attachment is represented by
a non-directed edge between an SBB entity and an Activity Context. There is at most one edge between
each SBB entity and Activity Context pair. The attachment count of an SBB entity is the total number of
edges that connect the SBB entity and its descendents to Activity Contexts. The number in each oval is the
attachment count of the SBB entity.
AC1
Y1
(0)
X1
(6)
Z1
(4)
Y2
(2)
SLEE
AC2 AC3
2.2.13 Activity Context reclamation and SBB entity tree removal example
In this example, there are two SBB entities in the SBB entity tree. There is a root SBB entity and the root
SBB entity has a single child SBB entity. The root SBB entity is not attached to any Activity Context and
the child SBB entity is attached to a single Activity Context.
The following simplified4 example sequence illustrates how the SLEE and these SBB entities interact with
the Activity Context to reclaim the Activity Context after its underlying Activity object ends (see Section
7.2.4 for details) and to remove the SBB entity tree after it is no longer attached to any Activity Context .
1. The child SBB entity invokes a method on the underlying Activity object of the Activity Context
to end the Activity object (see Section 7.2.4). 5
2. The SLEE detaches all SBB entities from the Activity Context.6 When t he SLEE detaches the
child SBB entity from the Activity Context, the SLEE decrements the attachment count of the
child SBB entity from one to zero. It also decrements the attachment count of the ancestors of the
child SBB. In this case, the SLEE decrements the attachment count of the root SBB entity from
one to zero.
3. The SLEE reclaims the Activity Context 7 and removes the SBB entity tree by initiating a cascad-
ing removal of the root SBB entity as the root SBB attachment count is zero.
4
Not all steps are shown.
5
The SLEE moves the Activ ity Context to the Ending state.
6
After delivering an Activity End Event to the SBB entities attached to the Activity Context that can receive the Activity End Event.
7
The SLEE moves the Activity Context to the Invalid state.
JAIN SLEE 1.0 Specification, Final Release Page 14
Chapter 2
Overview
2.2.16 Service
A Service is a deployment and management artifact. It specifies a child relation from the SLEE (as the logi-
cal parent of all root SBBs, see Figure 1) to a root SBB. Hence, it identifies the root SBB of the Service, the
default event delivery priority of the Service, and provides other information needed by the SLEE to instan-
tiate root SBB entities of the Service.
The SLEE will assign the default event delivery priority of the child relation to root SBB entities created by
the SLEE for this Service (see Figure 2).
To define a Service, the Administrator provides a Service deployment descriptor element that provides the
following:
• A globally unique name of the Service.
• A refere nce to a root SBB.
• An optional reference to a Resource Info Profile Table.
A Resource Info Profile Table contains provisioned data that the SLEE passes to resource adaptor
entities on behalf of the Services that reference this Profile Table.
• An optional reference to an Address Profile Table.
An Address Profile Table contains provisioned address data used by the SLEE to determine when
new root SBB entities of the Service are created.
Two Services may reference the same root SBB, but the Services may provide different event dispatch pri-
orities, reference different Resource Info Profile Tables and Address Profile Tables.
Inactive
activate Service
no more
Active outstanding
SBB entity trees
of the Service
deactivate Service
Stopping
2.3 Roles
The SLEE architecture identifies the following roles:
• SBB Developer.
• Service Deployer.
• Administrator.
2.3.3 Administrator
The Administrator manages the SLEE and the applications running in the SLEE through the SLEE’s man-
agement interfaces. An Administrator may be a management client, such as a network management appli-
cation, network management console, or a person using a management client to manage the SLEE.
attribute can be updated through any of the aliased attributes’ set accessor methods. Changes to the
logical attribute are observable through any of the aliased attributes’ get accessor methods.
This interface is optional. If the SBB does not require any usage parameters, the SBB Developer does not
have to provide an SBB Usage Parameters interface.
If the SBB Developer declares an SBB Usage Parameters interface, the SBB Developer should also declare
(in the SBB abstract class) at least one of the get SBB Usage Parameter methods to get access to objects
that implement the SBB Usage Parameters interface.
• A description element.
This is an optional informational element.
• An sbb-alias-ref element.
This element references an SBB by its sbb-alias that is specified
within the same sbb element.
• A get-child-relation-method-name element.
This element specifies the method name of the get child relation
method in the SBB abstract class. The SBB entity uses this method to
get an object that can be invoked to create child SBB entities and to
enumerate child SBB entities of this relation.
• A default-priority element.
This element is mandatory. A default-priority element speci-
fies the default event delivery priority of the child SBB relative to its
sibling SBBs (see Section 8.5.7).
§ Zero or more get-profile-cmp-method elements.
Each get Profile CMP method declared in the SBB abstract class must be identi-
fied by a get-profile-cmp-method element. Each get-profile-
cmp-method element has the following sub-elements:
• A description element.
This is an optional informational element.
• A profile-spec-alias-ref element.
This element refe rences a Profile Specification by its profile-
spec-alias that is specified in a profile-spec element within
the same sbb element.
• A get-profile-cmp-method-name element.
This element specifies the name of the method used to get an object
that implements a Profile CMP interface from a Profile identifier. The
Profile CMP interface is specified by the Profile Specification identi-
fied by the above profile-spec-alias-ref element.
o An sbb-local-interface element.
This ele ment is optional. If the SBB developer defines an SBB local interface, this ele-
ment identifies the SBB local interface. It contains the following sub-elements:
§ A description element.
This is an optional informational element.
§ An sbb-local-interface-name element.
This element identifies the class name of the SBB local interface.
o An sbb-activity-context-interface element.
This element is optional. If the SBB developer defines an SBB Activity Context Interface
interface, this element identifies the SBB Activity Context Interface interface. It contains
the following sub-elements:
§ A description element.
This is an optional informational element.
§ An sbb-activity-context-interface-name element.
This element identifies the class name of the SBB Activity Context Interface in-
terface.
o An sbb-usage-parameter-interface element.
This element is optional. If the SBB developer defines an SBB Usage Parameters inter-
face, this element identifies the SBB Usage Parameters interface. It contains the follo w-
ing sub-elements:
§ A description element.
This is an optional informational element.
§ An sbb-usage-parameter-interface-name element.
This element identifies the class name of the SBB Usage Parameters interface.
• An address-profile-spec-alias-ref element.
This element is optional. If the SBB can be a root SBB, this element identifies the Address Profile
Specification of the SBB. This element references a Profile Specification by its profile-
spec-alias that is specified in a profile-spec-ref element in the same sbb element.
• Zero or more event elements.
Each event type that the SBB may receive or fire must have an event element (see Section 8.1).
An event element contains the following attributes and sub-elements:
o An initial-event attribute.
This attribute indicates if the event type is an initial event type (see Section 8.5.1).
o An event-direction attribute.
This attribute indicates if the SBB receives or fires the event type identified by the
event-type-ref element of the event element. The value of this attribute must be
“Receive”, “Fire”, or “FireAndReceive”. If initial-event is true, then event-
direction must be either “Receive” or “FireAndReceive”.
o A mask-on-attach attribute.
This attribute indicates whether events of the event type identified by the event-
type-ref element should be masked when an SBB entity attaches to an Activity Con-
text (see Section 7.4.1).
o A description element.
This is an optional informational element.
o An event-type-ref element.
This element references an event type. It contains the following elements:
§ An event-type-name element, an event-type-vendor element, and an
event-type-version element.
These elements uniquely identify an event type declared in an event-
definition element specified in another deployment descriptor. An event-
definition element declares an event type (see Section 8.3.1)
o An event-name element.
This element provides the SBB scoped name that the SBB uses to refer to the event type
identified by the event-type-ref element (see Section 8.1.10).
o Zero or more initial-event-select elements.
These elements are only meaningful if initial-event is true. They indicate which
convergence name variables should be selected (see Section 8.5.3). It has the following
attribute.
§ A variable attribute.
The value of this attribute can be one of “ActivityContext”, “AddressProfile”,
“Address”, “EventType”, or “Event”.
o An initial-event-selector-method-name element.
This element is optional and is meaningful only if initial-event is true. It identifies
an initial event selector method. The SLEE invokes this optional method to determine if
an event of the specified event type is an initial event if the SBB is a root SBB (see Sec-
tion 8.5.4).
o An event-resource-option element.
This element is optional. It provides additional event handling options that the SLEE
forwards to resource adaptor entities that emit events of the event type identified by the
event-type-ref element (see Section 8.3.2).
• Zero or more activity-context-attribute-alias elements.
These elements are optional. These elements and Activity Context attribute aliasing are described
in detail in Section 7.8. Each of these elements contains the following sub-elements:
o A description element.
This is an optional informational element.
o An attribute-alias-name element.
This element specifies an alias name. The alias name logically identifies the aliased logi-
cal attribute. This name is globally scoped. If two or more activity-context-
attribute-alias elements specify the same attribute-alias-name, all the
attributes specified by their sbb-activity-context-attribute elements are
aliased.
o One or more sbb-activity-context-attribute-name elements.
Each element identifies an attribute declared in the SBB Activity Context Interface inter-
face of the SBB that should be aliased. Each SBB Activity Context Interface attribute can
be aliased at most once, i.e. it is either not aliased or aliased through a single alias name.
• Zero or more env-entry elements.
These elements are optional. Each env-entry element binds an environment entry into the
JNDI component environment of the SBB (see Section 6.13). Each env-entry element contains
the following sub-elements:
o A description element.
This is an optional informational element.
o An env-entry–name element.
This element specifies the location within the JNDI component environment to which the
environment entry value will be bound.
o An env-entry-value element.
This element specifies the value that will be bound to the location specified by the env-
entry–name element.
o An env-entry–type element.
This element specifies the type of the value specified by the environment env-entry
element.
• Zero or more resource-adaptor-type-binding elements.
These elements are optional. Each resource-adaptor-type-binding element declares a
resource adaptor type that the SBB depends on (see resource-adaptor-type-ref below).
It may optionally bind an object that implements the resource adaptor type defined Activity Con-
text Interface Factory interface into the JNDI component environment of the SBB (see Section
6.13.2). If necessary, it may also contain resource-adaptor-entity-binding sub-
elements that binds resource adaptor entities of the same resource adaptor type to be SBB. Each
resource-adaptor-type-binding element contains the following sub-elements:
o A description element.
This is an optional informational element.
Chapter 4 Addresses
An address is a unique identifier for an entity in a network or the SLEE. A common address today is a tele-
phone number or a URI address.
// integer representation
public static int ADDRESS_PLAN_NOT_PRESENT …;
public static int ADDRESS_PLAN_UNDEFINED …;
public static int ADDRESS_PLAN_IP …;
public static int ADDRESS_PLAN_MULTICAST …;
public static int ADDRESS_PLAN_UNICAST …;
public static int ADDRESS_PLAN_E164 …;
public static int ADDRESS_PLAN_AESA …;
public static int ADDRESS_PLAN_URI …;
public static int ADDRESS_PLAN_NSAP …;
public static int ADDRESS_PLAN_SMTP …;
public static int ADDRESS_PLAN_E164_MOBILE …;
public static int ADDRESS_PLAN_X400 …;
public static int ADDRESS_PLAN_SIP …;
public static int ADDRESS_PLAN_H323 …;
public static int ADDRESS_PLAN_GT …;
public static int ADDRESS_PLAN_SSN …;
public static int ADDRESS_PLAN_SLEE_PROFILE_TABLE …;
public static int ADDRESS_PLAN_SLEE_PROFILE …;
• A singleton instance of each enumerated value is guaranteed (via an implementation of the read-
Resolve method, see java.io.Serializable for more details), so that equality tests using
== are always evaluated correctly. For convenience, an integer representation of AddressPlan
objects is also available.
• Each of the is<Plan> methods determines if this AddressPlan object represents the
<PLAN> of the address, and is equivalent to (this == <PLAN>). For e xample, the isSIP
method determines if this AddressPlan object represents the SIP plan of the address and is
equivalent to (this == SIP).
• The fromInt and toInt methods allow conversion between the AddressPlan object form
and numeric form.
• The fromInt method throws a java.lang.IllegalArgumentException if the plan
argument is not one of the integer address plan representations.
// integer representation
public static int ADDRESS_PRESENTATION_ALLOWED …;
public static int ADDRESS_PRESENTATION_RESTRICTED …;
public static int ADDRESS_PRESENTATION_UNDEFINED …;
public static int ADDRESS_PRESENTATION_ADDRESS_NOT_AVAILABLE …;
// singletons
public static AddressScreening NETWORK …;
public static AddressScreening UNDEFINED …;
public static AddressScreening USER_NOT_VERIFIED …;
public static AddressScreening USER_VERIFIED_PASSED …;
public static AddressScreening USER_VERIFIED_FAILED …;
• A singleton instance of each enumerated value is guaranteed (via an implementation of the read-
Resolve method, see java.io.Serializable for more details), so that equality tests using
== are always evaluated correctly. For convenience, an integer representation of AddressS-
creening objects is also available.
• Each of the is<Screening> methods determines if this AddressScreening object repre-
sents the <SCREENING> of the address, and is equivalent to (this == <SCREENING>). For
example, the isNetwork method determines if this AddressScreening object represents the
Network screening of the address and is equivalent to (this == NETWORK).
• The fromInt and toInt methods allow conversion between the AddressScreening object
form and numeric form.
• The fromInt method throws a java.lang.IllegalArgumentException if the
screening argument is not one of the integer address presentation representations.
stract class. For each method defined by the SBB Developer, there must be a matching method in
the SBB abstract class. The matching method must have:
o The same name.
o The same number of arguments, and same argument and return types.
o The same set of exceptions in the throws clause.
• All SBB local objects that represent an SBB entity that does not exist are invalid. An attemp ted
invocation on an invalid SBB local object marks the current transaction for rollback and throws a
javax.slee.TransactionRolledbackLocalException (a subclass of javax.sl-
ee.SLEEException).
• An SBB Developer defined local interface method is a mandatory transactional method (see Sec-
tion 9.6.1). The SLEE throws a javax.slee.TransactionRequiredLocalException
if an SBB Developer defined local interface method of an SBB local object is invoked without a
valid transaction context.
• This method may also throw a javax.slee.SLEEException if the method failed due to a
SLEE level or system level failure. If the caller of this method receives this exception, the caller
does not know, in general, whether the corresponding method imple mentation in the SBB abstract
class was invoked. The caller also does not know if the transaction has been marked for rollback.
However, the caller may determine the transaction status by using the getRollbackOnly
method (see Section 6.10.3).
• The SBB Developer defined SBB local interface methods must not throw java.rmi.Remote-
Exception, any subclass of RemoteException, or any RuntimeException. For more
information on exception handling for SBB local object invocations, see Section 6.9.
• Parameters to local interface methods are passed by reference.
• Note that the SbbLocalObject does not expose the methods of the javax.slee.Sbb inter-
face, event handler methods, or the various callback methods. These methods are used by the
SLEE to manage SBB object instances, deliver events, and handle callbacks.
The following example illustrates two SBB local interfaces:
public interface ControlDelegate extends SbbLocalObject{
public void startWithActivity(ActivityContext ac, ControlCoordinator coordinator)
throws UnacceptableActivityException;
}
6.1 Overview
The SBB Developer implements the SBB abstract class. The requirements for an SBB abstract class is as
follows:
• The class must implement, directly or indirectly, the javax.slee.Sbb interface.
• The class must be defined as public and must be abstract.
• The class must not define the finalize method.
The SBB Developer defines the following concrete and abstract methods in the SBB abstract class.
invokes this method for each event of the event type. The return value of this method invocation
determines whether one or more new root SBB entities will be instantiated to process this event
(see Section 8.5.4).
should declare at least one of the two get SBB Usage Parameters methods. Each of these methods
return an object that implements the SBB Usage Parameters interface of the SBB. This allows the
SBB to manipulate the usage parameters named by the SBB (see Section 0).
1. newInstance
2. setSbbContext unsetSbbContext
Pooled
sbbExceptionThrown
Ready
sbbLoad sbbStore
SBB entity. All SBB objects in the pool are considered equivalent, and therefore any SBB object
can be assigned by the SLEE to an SBB entity during the transition to the Ready state.
• An SBB object transitions from the Pooled state to the Ready state when the SLEE selects that
SBB object to process an event or to service a logic object invocation. There are two possible tran-
sitions from the Pooled state to the Ready state: through the sbbCreate and sbbPostCreate
methods, or through the sbbActivate method. The SLEE invokes the sbbCreate and
sbbPostCreate methods when the SBB object is assigned to a new SBB entity that has just
been created explicitly by an invocation of the create method on a ChildRelation object or
implicitly by the SLEE to process an initial event. The SLEE invokes the sbbActivate method
on an SBB object when an SBB object needs to be activated to receive a method invocation on an
existing SBB entity. This occurs when there is no existing SBB object in the Ready state assigned
to the SBB entity.
• When an SBB object is in the Ready state, the SBB object is associated with a specific SBB entity.
While the SBB object is in the Ready state, the SLEE can synchronize the transient state held in
the SBB object with the persistent state of the SBB entity whenever it determines the need to, by
invoking the sbbLoad and sbbStore methods zero or more times. Event handler, local inter-
face, exception callback, and transaction rolled back callback methods can be invoked on the SBB
object zero or more times. Invocations of the sbbLoad and sbbStore methods can be arbitrar-
ily mixed with invocations of these methods subject to the SBB object life cycle .
• The SLEE can choose to passivate an SBB object. To passivate an SBB object, the SLEE first in-
vokes the sbbStore method to allow the SBB object to prepare itself for the synchronization of
the SBB entity’s persistent state with the SBB object’s transient state, and then the SLEE invokes
the sbbPassivate method to return the SBB object to the Pooled state.
• Eventually, the SLEE will transition the SBB object to the Pooled state. There are three possible
normal transitions from the Ready state to the Pooled state: through the sbbPassivate method,
through the sbbRemove method, and because of a transaction rollback for sbbCreate or
sbbPostCreate (not shown in above SBB object life cycle state diagram). The SLEE invokes
the sbbPassivate method when the SLEE wants to disassociate the SBB object from the SBB
entity without remo ving the SBB entity. The SLEE invokes the sbbRemove method when the
SLEE wants to remove the SBB entity (i.e. when the SBB entity is removed as part of a cascading
removal of an SBB entity sub-tree). If sbbCreate and sbbPostCreate are called and suc-
cessfully return without throwing a RuntimeException or CreateException, and subse-
quently the enclosing transaction rolls back, the SLEE will transition the SBB object to the Pooled
state by invoking the sbbPassivate method.
• When the SBB object is put back into the pool, it is no longer associated with the SBB entity. The
SLEE can assign the SBB object to any SBB entity of the same SBB component.
• The SLEE may release its references to an SBB object in the pool, allowing it to be garbage col-
lected, after calling the unsetSbbContext method on the SBB object.
Notes:
1. The SbbContext object passed by the SLEE to the SBB object in the setSbbContext
method is not an object that contains static information. For example, the result of the
getSbbLocalObject method might be different each time an SBB object moves from the
Pooled state to the Ready state, and the result of the getActivities method may be different
in different event handler method invocations.
2. A RuntimeException thrown from any method of an SBB object (including the event handler
methods, the local interface methods, and the life cycle callbacks invoked by the SLEE) results in
the transition to the Does Not Exist state after the appropriate exception handler methods have
been invoked (see Section 6.7). The SLEE will not invoke any method except the sbbExcep-
tionThrown method on the SBB object after a RuntimeException has been caught. The
corresponding SBB entity continues to exist. The SBB entity can continue to receive events and
synchronous invocations because the SLEE can use a different SBB object to process events and
synchronous invocations that should be sent to the SBB entity. Exception handling is described
further in Section 6.9.
3. A SLEE implementation is not required to maintain a pool of SBB objects in the Pooled state. The
pooling approach is an example of a possible implementation, but it is not the required implemen-
tation. Whether the SLEE implementation uses a pool or not has no bearing on the SBB abstract
class coding style.
The SLEE invokes this method after a new instance of the SBB abstract class is created. It uses this method
to pass an SbbContext object to the SBB object. If the SBB object needs to use the SbbContext ob-
ject during its lifetime, it must remember the SbbContext object in an instance variable.
During this method, an SBB entity has not been assigned to the SBB object. The SBB object can take ad-
vantage of this method to allocate and initialize state or connect to resources that are to be held by the SBB
object during its lifetime. Such state and resources cannot be specific to an SBB entity because the SBB
object might be reused during its lifetime to serve multiple SBB entities.
• The setSbbContext method must be declared as public and cannot be static, ab-
stract, or final .
• The SBB object must not attempt to access its persistent state using the CMP field accessor meth-
ods during this method
• This method is invoked with an unspecified transaction context (see Section 9.7.1 for details on
how the SLEE executes methods with an unspecified transaction context).
The SLEE invokes this method on an SBB object before the SLEE creates a new SBB entity in response to
an initial event or an invocation of the create method on a ChildRelation object. This method
should initialize the SBB object using the CMP field get and set accessor methods, such that when this
method returns, the persistent representation of the SBB entity can be created.
• The sbbCreate method must be declared as public and cannot be static, abstract, or
final.
• This method should throw a javax.slee.CreateException when there is an application
level problem (rather than SLEE or system level problem). If this method throws this exception,
then the SLEE will not create the SBB entity. The SLEE will also propagate the CreateExcep-
tion unchanged to the caller that requested the creation of the SBB entity. The caller may be the
SLEE or an SBB object. The throws clause is mandatory.
• The SLEE guarantees that the values that will be initially returned by the SBB object’s CMP field
get methods will be the Java language defaults (e.g. 0 for integer, null for object references).
• The SLEE invokes this method with a transaction context (see Section 9.6). After this method re-
turns, and in the same transaction context, the SLEE creates the persistent representation of the
SBB entity.
• Child SBB entities should not be created in this method.. This method is invoked before the per-
sistent representation of the new SBB entity is created so the SLEE may not be able to maintain
the relation between the new SBB entity and its child SBB entities. Child SBB entities should in-
stead be created in the sbbPostCreate method or in event handling or local invocation meth-
ods.
The SLEE invokes this method on an SBB object after the SLEE creates a new SBB entity. The SLEE in-
vokes this method after the persistent representation of the SBB entity has been created and the SBB object
is assigned to the created SBB entity. This method gives the SBB object a chance to initialize additional
transient state and acquire additional resources that it needs while it is in the Ready state.
• The sbbPostCreate method must be declared as public and cannot be static, ab-
stract, or final .
• This method may throw a javax.slee.CreateException when there is an application
level problem (rather than SLEE or system level problem). The SLEE will propagate the Cre-
ateException unchanged to the caller that requested the creation of the SBB entity. The caller
may be the SLEE or an SBB object. The throws clause is optional.
• The SLEE invokes this method with the transaction context (see Section 9.6) used to invoke the
sbbCreate method.
• The SBB entity enters the Ready state when sbbPostCreate returns normally. If sbbPost-
Create returns by throwing an exception, the SBB entity does not become Ready.
The SLEE invokes this method on an SBB object when the SLEE picks the SBB object in the pooled state
and assigns it to a specific SBB entity. This method gives the SBB object a chance to initialize additional
transient state and acquire additional resources that it needs while it is in the Ready state.
• The sbbActivate method must be declared as public and cannot be static, abstract,
or final.
JAIN SLEE 1.0 Specification, Final Release Page 53
Chapter 6
The SBB Abstract Class
• The SBB object must not attempt to access its persistent state using the CMP field accessor meth-
ods during this method.
• This method executes with an unspecified transaction context.
tion on the values returned by the CMP field accessor methods, such as converting text fields to more con-
venient objects or binary representations.
• The sbbLoad method must be declared as public and cannot be static, abstract, or fi-
nal.
• The SLEE invokes this method within a transaction context.
The SLEE calls this method to synchronize the state of the SBB entity’s persistent state with the state of the
SBB object. The SBB Developer should use this method to update the SBB object using the CMP field
accessor methods before its persistent state is synchronized. For example, this method may perform con-
version of object or binary data representations to text . The SBB Developer can assume that after this
method returns, the persistent state is synchronized.
• The sbbStore method must be declared a s public and cannot be static, abstract, or
final.
• The SLEE invokes this method within a transaction context.
• The object returned is an object that implements the SBB local interface of the SBB entity. The
SBB object uses Java typecast to narrow the returned object reference (from SbbLocalObject)
to the SBB local interface of the SBB entity.
• The SBB object of the SbbContext object must have an assigned SBB entity when it invokes
this method. Otherwise, this method throws a java.lang.IllegalStateException.
• It is a mandatory transactional method (see Section 9.6.1). Hence, the SBB object must invoke this
method within a transaction. It throws a javax.slee.TransactionRequiredLocal-
Exception if it is invoked without a valid transaction context.
• It throws a javax.slee.SLEEException if the requested operation cannot be performed due
to a system-level failure.
• This method is a non-transactional method. An SBB object may invoke this method at any time to
get the ServiceID object for the SBB.
• It throws a javax.slee.SLEEException if the requested operation cannot be performed due
to a system-level failure.
• This method is a non-transactional method. An SBB object may invoke this method at any time to
get the SbbID object for the SBB.
• It throws a javax.slee.SLEEException if the requested operation cannot be performed due
to a system-level failure.
• Logically, setting an SBB local object into a CMP field stores a reference to the SBB entity repre-
sented by the SBB local object. The SLEE maintains referential integrity for SBB entity references
stored in CMP fields. If the target SBB entity of a reference is deleted, the SLEE must in future re-
turn null from any CMP field accessor for a CMP field that referenced the target SBB entity.
• CMP fields that hold SBB entity references.
o If the Java type of the CMP field is an SBB local interface (i.e., SbbLocalObject, or
a type derived from SbbLocalObject ), then the sbb-alias-ref ele ment must be
present. An sbb-alias-ref element cannot be declared for a CMP field of a Java
type other than SbbLocalObject or a type derived from SbbLocalObject.
o The Java type of the CMP field must be the same type or a base type of the SBB local in-
terface of the SBB component specified by the sbb-alias-ref element.
o If the sbb-alias-ref element is present, only null and references to valid SBB en-
tities of the SBB component identified by the sbb-alias-ref element can be stored
in the CMP field. The SLEE implemented set accessor method must throw the
java.lang.IllegalArgumentException if any other SBB entity reference, or
an invalid reference to an SBB entity of the SBB component identified by the sbb-
alias-ref element, is passed to the set accessor method.
• The CMP field accessor methods are mandatory transactional methods (see Section 9.6.1). They
throw a javax.slee.Trans actionRequiredLocalException if they are invoked
without a valid transaction context.
• These methods may also throw a javax.slee.SLEEException if the operation cannot be
completed due to a system-level failure.
• Neither the get accessor method nor the set accessor method can include a throws clause.
• The method must be declared as public and abstract. The SLEE provides the concrete im-
plementation of the get Profile CMP method when the SBB is deployed.
• The method name must not begin with “sbb” or “ejb”, and must be a valid Java identifier.
• The Java type of the only input argument must be ProfileID.
When the SBB invokes this method with a ProfileID object, the ProfileID object should
uniquely identify a Profile that is in a Profile Table created from the Profile Specification.
• The method must be public and abstract. The SLEE provides the concrete implementation
of the get child relation method when the SBB is deployed.
• The method name must not begin with “sbb” or “ejb”.
• The method does not have a throws clause.
• The return type must be javax.slee.ChildRelation. An SBB entity invokes the returned
ChildRelation object to create child SBB entities and enumerate child SBB entities that be-
long to this relation (see Section 6.8.1 ).
• The ChildRelation object and its Iterator objects are only valid within the same transac-
tion in which the ChildRelation object was obtained.
• The name of the method, i.e. <get child relation method name>, must be a valid Java
identifier.
• The method must not throw any checked exceptions.
• The SBB object must have an assigned SBB entity when it invokes this method. Otherwise, this
method throws a java.lang.IllegalStateException.
• It is a mandatory transactional method (see Section 9.6.1). Hence, the SBB object must invoke this
method within a transaction. It throws a javax.slee.TransactionRequiredLocal-
Exception if it is invoked without a valid transaction context.
• It throws a javax.slee.SLEEException if the requested operation cannot be performed due
to a system-level failure.
The get-child-relation-method deployment descriptor element declares the child relation from
the SBB to the child SBB. This SBB Developer specifies the following aspects of the child relation using
the get-child-relation-method element:
• The child SBB of the child relation, i.e. the SBB that plays the child role in this child relation.
• The method name of the get child relation method for this child relation.
• The default event delivery priority of the child relation.
o Any attempts to add to the child relation using these methods result in a java.la-
ng.UnsupportedOperationException. For example, the SLEE must throw the
UnsupportedOperationException when these methods are invoked with argu-
ments that add to the collection.
o An invocation of an add method that has no effect on the collection, such as invoking the
addAll method with an empty collection may or may not throw an UnsupportedOp-
erationException .
o The create method of the ChildRelation interface should be used to create a child
SBB entity. This causes the SLEE to automatically add an SBB local object that repre-
sents the newly created SBB entity to the collection.
• The remove methods: clear, remove, removeAll, and retainAll.
o These methods may remove SBB entities from the child relation. The input argument
specifies which SBB entities will be removed from the child relation or retained in the
child relation by specifying the SBB local object or collection of SBB local objects that
represent the SBB entities to be removed or retained.
o Removing an SBB entity from a child relation initiates a cascading removal of the SBB
entity tree rooted by the SBB entity, similar to invoking the remove method on an SBB
local object that represents the SBB entity.
• The iterator method and the Iterator objects returned by this method.
• The sbbRolledBack method must be declared as public and cannot be static, ab-
stract, or final .
• This method is invoked with a new transaction context, i.e. not with the transaction context of the
transaction that has been rolled back.
• This method is a mandatory transactional method.
• This method is only invoked on SBB objects in the Ready state.
• If this method returns by throwing an exception, the SLEE processes this exception like the excep-
tion has been thrown from an event handler method, i.e. by invoking the sbbException-
Thrown method in the same transaction.
• In the case that a RuntimeException causes the transaction to be rolled back, the sbb-
RolledBack method is always invoked after the sbbExceptionThrown method since the
sbbExceptionThrown method is invoked in the transaction that will eventually be rolled
back. If the sbbRolledBack method returns by throwing a RuntimeException, then the
sbbExceptionThrown method will be invoked again in the same transaction that invoked the
sbbRolledBack method.
JAIN SLEE 1.0 Specification, Final Release Page 65
Chapter 6
The SBB Abstract Class
• If the transaction that invoked the sbbRolledBack method also rolls back, the SLEE must log
this condition and not invoke the sbbRolledBack method again.
• When the SLEE rolls back a transaction, the SLEE may start zero or more new transactions to de-
liver transaction rolled back callbacks.
o If the rolled back transaction does not invoke any SBB entities, i.e. none of the SLEE
originated invocations (see Section 9.8.2) of the transaction (see Section 9.8.3) have a
target SBB entity, then the SLEE does not start any new transactions to deliver transac-
tion rolled back callbacks.
o If the rolled back transaction includes one or more SLEE originated invocations (see Sec-
tion 9.8.2), then the SLEE starts a new transaction to deliver a transaction rolled back
callback for each of the SLEE orig inated invocations in the transaction that has a target
SBB entity.
The SLEE may or may not be successful in delivering a transaction rolled back callback .
For example, if the SLEE does not have already have an SBB object in the Ready state
that represents the target SBB entity, then SLEE has to invoke the necessary life cycle
methods on an SBB object before it can invoke the sbbRolledBack method. The SLEE
does not invoke the sbbRolledBack method if one of these life cycle methods throw a
RuntimeException and cause the new transaction to be rolled back before the SLEE
has an opportunity to invoke the sbbRolledBack method.
For example, the SLEE starts a transaction so that it can invoke an event handler method
of a Foo SBB. This event handler method directly invoked by the SLEE synchronously
invokes a local interface method of another SBB. The implementation of this local inter-
face method throws a RuntimeException. The SLEE marks the transaction for roll
back. Eventually, the event handler method returns (whether by throwing an exception or
normally). The SLEE eventually starts a new transaction to invoke the sbbRolled-
Back method of a Foo SBB object.
• The isRemovedRolledBack method returns true if the transaction that was rolled back in-
cludes a SLEE originated logical cascading removal method invocation (see Section 9.8.1).
The SLEE originated logical cascading removal method invocation must have been initiated in the
transaction that has been rolled back for this method to return true.
• It is a mandatory transactional method. If this method is invoked when the SBB object is not
invoked within a transaction, then the SLEE will throw a javax.slee.Transaction-
RequiredLocalException.
• It throws a javax.slee.SLEEException if the requested operation cannot be performed due
to a system-level failure.
• It is a mandatory transactional method. If this method is invoked when the SBB object is not
invoked with a transaction, then the SLEE will throw a javax.slee.Transaction-
RequiredLocalException.
• It throws a javax.slee.SLEEException if the requested operation cannot be performed due
to a system-level failure.
cess external resources that are dependent on the target operational environment. The Service De-
ployer may use deployment descriptor elements to associate external resources with the SBB
component.
The ability to customize the environment of the SBB component at assembly and deployment allows inde-
pendent software vendors to develop SBB components that are, to a large degree, independent from the
operational environment in which the SBB components will be deployed.
Deployer uses these bindings to bind actual resource adaptor objects provided by resource adaptor entities
at runtime to SBB comp onents.
• Implement the java:comp/env environment naming context, and provide it to SBB Objects at
runtime. The naming context must include all the environment entries, resource adaptor type bind-
ings, resource adaptor entity bindings, and EJB references declared by the SBB Developer with
their values supplied (directly or indirectly) by their respective deployment descriptor elements.
The environment naming context must allow creation of subcontexts if they are needed by an
SBB.
• The SLEE must ensure that the instances of the SBB component classes have only read access to
their component environment. The SLEE must throw the javax.naming.OperationNot-
SupportedException from all the methods of the javax.naming.Context interface
that modify the environment naming context and its subcontexts.
6.15 SBB abstract class methods invoked by the SBB abstract class
Abstract class or interface Method Transaction
SBB abstract class fire event methods Mandatory
get child relation methods
CMP field accessor methods
asSbbActivityContextInterface
get Profile CMP methods
7.1 Relations
The SLEE architecture defines the following relations:
• Activity objects and Activity Contexts: 1-to-1.
• Activity Contexts and Activity Context Interface objects: 1-to-many.
• Activity Contexts and SBB entities: many-to-many.
• Activity Contexts and SLEE Facilities: many-to-many
SBB
0..n
SBB’s attach to SLEE
Activity Contexts Domain
0..n
Activity Context
The Activity 1
Context provides
access to the
1
Activity Object
Activity Object
The Activity
1 Resource
Object is a Java
representation of Domain
the Activity 1
Activity
Activity Context
The API used internally by the SLEE to fire events on an Activity object and the API used by a resource
adaptor entities to fire an event on an Activity object is outside the scope of this release of the SLEE speci-
fication.
Active
Activity object of
Activity Context
ends
Ending
Invalid
8. The last outstanding event on the Activity Context has been delivered.
9. The SLEE performs the two following two sequences concurrently or in an unspecified order:
a. The SLEE fires an Activity End Event on the Activity Context. The SLEE routes the Activity
End Event to each SBB entity that is attached to the Activity Context and is interested in the
Activity End Event (see Section 8.5). After the SLEE delivers the Activity End Event to an
interested SBB entity, the SLEE detach es the SBB entity from the Activity Context .
b. The SLEE also detaches SBB entities that are attached to the Activity Context but are not in-
terested in the Activity End Event.
10. The SLEE notifies the SLEE Facilities that have references to the Activity Context that the Activ-
ity End Event has been delivered on the Activity Context. The Activity Context Naming Facility
will remove the Activity Context’s name bindings. The Timer Facility will remove any timers that
depend on the Activity Context. Both of these Facilities will release their references to the Activity
Context.
11. The SLEE transitions the Activity Context to the Invalid state and the SLEE can reclaim the Ac-
tivity Context.
3. The ZAX resource adaptor entity enrolls the underlying connection in the transaction and marks
the isolated state for the connection as closing. As part of the commit processing the commited
state for the connection is modified to be closing.
4. The event handler method returns and the SLEE commits the current transaction successfully. The
ZAX resource adaptor entity participates in the transaction commit protocol and knows the out-
come of the commit protocol.
If the transaction rolls back, then the ZAX resource adaptor entity would be notified and it will
remove its mark on the underlying connection and will not modify the committed state of the con-
nection.
5. The ZAX resource adaptor entity closes the underlying connection.
6. The ZAX resource adaptor entity notifies the SLEE that the ZaxConnection object has ended.
7. The SLEE marks the Activity Context of the ZaxConnection object as being in the Ending
state.
The remaining steps are the same as steps 7 through 11 in the Section 7.3.4.1.
X1 Y1 Y2 Z2
Activity Context
contains attrs
x1, x2, ...
y1, y2, ...
z1, z2, ...
Represents
Activity object
7.5.1 SBB Activity Context Interface get and set accessor methods
The SBB Developer must declare a set accessor method and/or a get accessor method for each shareable
attribute in the SBB Activity Context Interface interface.
• The rules for computing accessor method names from an attribute name are the same as the rules
for computing accessor method names from a CMP field name (see Section 6.5.1).
• The Java types of an Activity Context attribute are restricted to Java primitive types and Java seri-
alizable types. SBB local interfaces (i.e., SbbLocalObject and the types d erived from
SbbLocalObject) cannot be stored in Activity Context attributes.
• The semantics of these accessor methods are also the same as the semantics of CMP field accessor
methods.
• For an attribute to be writeable, the SBB Developer must define a set accessor method. For an at-
tribute to be readable, the SBB Developer must define a get accessor method. An attribute can be
(from the SBB’s point of view), either read-only, write-only or read-write, based on the methods
defined.
• Activity Context attribute accessor methods are mandatory transactional methods (see Section
9.6.1).
In the following example, the FooSbbActivityContextInterface interface declares two attrib-
utes.
…
import javax.slee.ActivityContextInterface;
…
public interface FooSbbActivityContextInterface extends ActivityContextInterface {
public int getFooAmount();
public void setFooAmount(int fooAmount);
public String getTestString();
public void setTestString(String testString);
}
An SBB object uses the following method declared by the SBB Developer in the SBB abstract class to in-
teract with Activity Contexts.
• An asSbbActivityContextInterface method to narrow an object that implements the
generic ActivityContextInterface interface to an object that implements the SBB-
specific SBB Activity Context Interface interface.
• This method does not change the values of any Activity Context attributes.
• The SBB object of the SbbContext object must have an assigned SBB entity when it invokes
this method. Otherwise, this method throws a java.lang.IllegalStateException.
• It is a mandatory transactional method (see Section 9.6.1). Hence, the SBB object must invoke this
method within a transaction. It throws a javax.slee.TransactionRequiredLocal-
Exception if it is invoked without a valid transaction context.
• It throws a javax.slee.SLEEException if the requested operation cannot be performed due
to a system-level failure.
See Section B.4 for the pseudo code that illustrates the desired behavior of the getActivities method.
• The method must be declared as public and abstract. The SLEE provides the concrete im-
plementation of the method when the SBB is deployed.
• The return type must be the Activity Context Interface interface of the SBB, or a base interface of
the Activity Context Inteface interface of the SBB.
• This method does not have throws clause.
• The SBB object must have an assigned SBB entity when it invokes this method. Otherwis e, this
method throws a java.lang.IllegalStateException.
• It is a mandatory transactional method (see Section 9.6.1). Hence, the SBB object must invoke this
method within a transaction. It throws a javax.slee.TransactionRequiredLocal-
Exception if it is invoked without a valid transaction context.
• It throws a javax.slee.SLEEException if the requested operation cannot be performed due
to a system-level failure.
9
The SBB entities of the same SBB are the SBB entities that are instantiated from a single SBB component (which is installed in the
SLEE only once) regardless of which Service the SBB entities are instantiated for.
JAIN SLEE 1.0 Specification, Final Release Page 93
Chapter 7
Activity Objects, Activity Contexts, and Activity Context Interface Objects
…
<sbb>
…
<sbb-name> CallForwardingSbb </sbb-name>
<sbb-vendor> com.foobar </sbb-vendor>
<sbb-version> 1.0 </sbb-version>
…
<activity-context-attribute-alias>
<attribute-alias-name>
counter
</attribute-alias-name>
<sbb-activity-context-attribute-name>
forwardCounter
</sbb-activity-context-attribute-name>
</activity-context-attribute-alias>
…
</sbb>
• This Facility allows multiple SBB entities that have been created in response to initial events on
different Activities (thus have d ifferent Activity Contexts) to converge on a “shared” Activity
Context, so that these SBB entities can signal each other by firing events on the shared Activity
Context and share common state by reading and modifying attributes.
import javax.slee.SLEEException;
import javax.slee.TransactionRequiredLocalException;
import javax.slee.FactoryException;
import javax.slee.TransactionRequiredLocalException;
• See Section 7.6.1 for a general description on Activity Context Interface Factories, the transac-
tional semantics, and the exceptions thrown by a getActivityContextInterface method.
6. The SLEE continues to deliver any event outstanding on the Activity Context.
At this point, the SLEE does not allow additional events to be fired on the Activity Co ntext.
7. The last outstanding event on the Activity Context has been delivered. The SLEE fires an Activity
End Event on the Activity Context.
8. The SLEE performs the two following sequences concurrently or in an unspecified order:
a. The SLEE delivers the Activity End Event to each SBB entity that is attached to the Ac-
tivity Context and is interested in the Activity End Event (see Section 8.5.5). After the
SLEE delivers the Activity End Event to the interested SBB entity, it detaches the inter-
ested SBB entity from the Activity Context.
b. The SLEE detaches the SBB entities that are attached to the Activity Context and are not
interested in the Activity End Event.
9. The SLEE notifies SLEE Facilities that have references to the Activity Context that the Activity
End Event has been delivered on the Activity Context. The Activity Context Naming Facility will
remove the Activity Context’s name bindings. The Timer Facility will remove any timers that de-
pend on the Activity Context. Both of these Facilities will release their references to the Activity
Context.
10. The SLEE transitions the Activity Context to the Invalid state and the SLEE can reclaim the Ac-
tivity Context and the NullActivity object.
Chapter 8 Events
Events represent occurrences of significance or state transitions within the SLEE or outside the SLEE.
They are used to convey information about the occurrence from one entity in the SLEE to another entity in
the SLEE. These entities may be the SLEE, SBB objects, resource adaptor entities that represent external
resources, and SLEE Facilities.
For example, the SLEE fires an Activity End Event on an Activity Context when the Activity Context’s
Activity object ends.
For communication among SBB entities, SBB entities should use events to signal each other and use Activ-
ity Contexts to share common s tate. This reduces the use of direct references among SBB entities and ref-
erences to SBB entities by other entities.
8.1 Overview
Event producers fire events. Event consumers receive events. The SLEE event router delivers events fired
by event producers to event consumers.
Each event fired by an event producer is represented within the SLEE by:
• An event object (see Section 8.1.5).
• An event type (see Section 8.1.7).
When an event producer fires an event, it provides to the SLEE the event type of the event either directly or
indirectly (see Section 8.2.1). The SLEE does not inspect the event object or the Activity object on which
the event was fired to determine the event type of the event.
The SLEE specification does not define any application code visible API for event type. SBB components
cannot define methods with event type arguments and cannot invoke methods with event type arguments.
The human readable representation of an event type is composed of three strings containing the event
type’s name, vendor and version. Hence, an event type identifier consists of the event type’s name, vendor
and version. This representation of the event type is used in deployment descriptor elements. It is recom-
mended that the SBB Developers should adopt the fully qualified Java package naming convention for
event type names.
In general, the default address is obtained from an event class attribute or an Activity class attrib-
ute for all events of the same event class. A well-specified resource adaptor type should always
identify the attribute that provides the default address for each event type that its resource adaptor
entities fire.
If the event type of the event is an initial event type of a Service and the initial event policy for the
event type is a built -in policy that uses the default address, the SLEE event router uses the default
address together with the Address Profile Table of the Service (see Section 10.13.2) to determine
whether a new root SBB entity of the Service should be instantiated to process the event. If a new
root SBB entity is instantiated, this event is the new SBB entity’s initial event (see Section 8.5.1).
If different SBBs specify conflicting options, the event producer is responsible for resolving the
conflict. In the above example, if an SBB specifies “Notify” and another specifies “Block”, the
Java Call Control resource adaptor entity may resolve the conflict in favor of “Block”.
8.4.1.1 Restrictions
The SBB Developer must observe the following restrictions when developing an SBB that fires events.
• An SBB object cannot modify an event object after it passes the event object as an argument to a
fire event method invocation.
• An SBB object cannot modify the event object even after the fire event method returns.
• An SBB object can only invoke its own fire event methods.
• An SBB object can only invoke fire event methods from within an execution thread used to d e-
liver an event to the SBB object.
The execution behavior of the SBB object and the SLEE is undefined if these restrictions are not followed.
8.4.1.2 Example
The following example illustrates an event-definition element, an event element, and a fire event
method of a hypothetical Foo SBB that introduces and fires a new custom event type.
The example event-definition element is as follows:
…
<event-definition>
<description>
An event of this type is fired when a FooActivity starts.
The event class of this event is com.foobar.FooEvent.
This event type identifies a com.foobar.FooEvent with
• The event handler method must be declared as public and cannot be static, abstract, or
final.
• The event handler method is a mandatory transactional method (see Section 9.6.1). Hence, the
SLEE always invoke this method within a transaction.
• As described earlier, an SBB object as an event consumer receives an event on an Activity Con-
text. This Activity Context is the Activity Context on which the event was fired. In the case of an
event handler method, an SBB Activity Context Interface object (if the SBB defines an SBB Ac-
tivity Context Interface interface) or a generic Activity Context Interface object represents the Ac-
tivity Co ntext on which the event was fired.
• The event handler method may return by throwing a RuntimeException. See Section 6.9 and
Section 6.10.1 on how the SLEE handles this situation.
8.4.2.1 Restrictions
The SBB Developer must observe the following restrictions when developing an SBB that receives events.
• Event handler methods cannot modify event objects passed to it.
• After an event handler method invocation returns, the invoked SBB object cannot continue to hold
a reference to the event object passed to the event handler method, either directly or indirectly
through other objects.
The execution behavior of the SBB object and the SLEE is undefined if these restrictions are not followed.
8.4.2.2 Example
The following example illustrates an event-definition element, an event element, and the event
handler method of a hypothetical Foo SBB that receives an event type whose event type name is
“com.some.event.types.PlayEvent”.
The resource adaptor type’s deployment descriptor contains the following element:
…
<event-definition>
…
<event-type-name> com.some.event.types.PlayEvent </event-type-name>
<event-type-vendor> com.some </event-type-vendor>
<event-type-version> 3.2.1a </event-type-version>
<event-class-name> com.some.events.PlayEvent </event-class-name>
</event-definition>
…
The SBB’s deployment descriptor is as follows:
<sbb>
…
<sbb-classes>
<sbb-abstract-class>
…
<sbb-abstract-class-name>
com.foobar.FooSbb
</sbb-abstract-class-name>
</sbb-abstract-class>
In the FooSbb.java:
package com.foobar;
…
public abstract FooSbb implements javax.slee.Sbb {
…
private SbbContext sbbContext;
…
public void setSbbContext(SbbContext context) {
…
sbbContext = context;
…
}
…
public void onPlayEvent(com.some.events.PlayEvent event,
FooSbbActivityContextInterface ac) {
…
if (…) {
…
return;
}
…
if (sbbContext.getRollbackOnly()) {
// do my own cleanup
…
return;
}
return;
}
…
}
• This method returns a set of event names. The SBB entity that is assigned to the SBB object of the
SbbContext object uses this method to obtain the set of currently masked event types (refer-
enced by their event names) for the Activity Context identified by the activity arg ument.
• The SBB object of the SbbContext object must have an assigned SBB entity when it invokes
this method. Otherwise, this method throws a java.lang.IllegalStateException.
• This method throws a java.lang.NullPointerException if the activity argument is
null.
• This method throws a javax.slee.NotAttachedException if the SBB entity is not at-
tached to the specified Activity Context.
• If the SBB entity has not invoked the maskEvent method to set an event mask after the SBB en-
tity is attached or reattached to the Activity Context, then the set of event names returned by the
getEventMask method is the set of event names of event elements whose mask-on-
attach attribute is set to “True”.
• Otherwise, the set of event names returned by the getEventMask method is the same as the set
of event names specified by the most recent maskEvent method for the same SBB entity and
same Activity Context.
• The getEventMask method is a mandatory transactional method (see Section 9.6.1 ). Hence, the
SBB object must invoke this method within a transaction. It throws a javax.slee.Trans-
actionRequiredLocalException if it is invoked without a valid transaction context.
• It throws a javax.slee.SLEEException if the requested operation cannot be performed due
to a system-level failure.
method or passed to the event router when the event was fired by the event producer if no initial
event selector method was invoked for the Service . If the default address is null, then the value
of this variable is null.
A default address, or the address returned by an initial event selector method, can only be present
in at most one Address Profile in an Address Profile Table. Hence, a single address maps to at
most one Address Profile identifier and the SLEE constructs at most one convergence name for
the identifier of the at most one Address Profile that the address is present in.
Future releases of the SLEE specification are likely allow a single address to be included in mul-
tiple Address Profiles. In this case, the SLEE will construct a conve rgence name for each Address
Profile identifier that the address maps to.
The default address and the selection of the Address Profile identifier in the convergence name
play an important role in the creation of a convergence name. If the Address Profile identifier is
selected for inclusion in the convergence name and the default address is not null, but a match-
ing Address Profile is not found, no convergence name is created for the SBB for the event and the
event is not an initial event for the SBB. Examples where a matching Address Profile might not be
found are if the default address is not present in the Addresses attribute of any of the profiles in the
Address Profile Table, or if the Address Profile Table for the Service does not exis t in the SLEE.
• Address.
The value of this variable (if selected) is the default address passed to the event router when the
event was fired by the event producer or returned by the initial event selector method. If a default
address is not passed (i.e. the default address is null), then the value of this variable is null.
• Event type.
The value of this variable (if selected) is the event type of the event that was fired.
• Event.
The value of this variable (if selected) is unique for each event fired, e.g. each invocation of an
SBB fire event method or each firing of an event by a resource adaptor (using SLEE vendor spe-
cific fire event methods). It is unique regardless of whether the same pair of event object and Ac-
tivity Context object (in the case of SBB fired event, or Activity object in case of resource adaptor
fired event) are passed to the fire event method. There are two unique events fired in the following
scenarios:
o An SBB invoking the same fire event method twice. From the SLEE’s perspective, the
two fire method invocations fire two unique events even if the Activity Context object
and event object passed to the fire event method are the same.
o An SBB firing an event in its event handler method. The event fired through the fire
event method is a different event even if the same Activity Context object and event ob-
ject passed to the event handler method is passed to the fire event method.
o A resource adaptor entity invoking one or more SLEE provided methods for firing events
multiple times. From the SLEE’s perspective, these invocations fire multiple unique
events even if the Activity object and event object passed are the same.
• Custom name.
If the root SBB of the Service identifies an initial event selector method for the event type, then
the value of this variable is provided by this method. Otherwise, this variable is not selected.
Two convergence names are equal if the values of each of these variables in the two convergence names
are equal.
It is expected that an initial event selector method will be defined for the event types emi t-
ted by each kind of Activity.
o The event element may contain initial-event-select elements. These ele-
ments provide selection hints to the initial event selector method. Ultimately, the initial
event selector method determines which convergence name variables are selected.
o The custom name variable is selected if the custom name value returned by the initial
event selector method is not null.
• The initial event selector event handler method must be declared as public and cannot be
static , abstract, or final.
• The method name must not begin with “sbb” or “ejb”, and must be a valid Java identifier.
• This method is a non-transactional method.
• It is only invoked on SBB objects in the Pooled state.
The public interface of the InitialEventSelector interface is as follows:
package javax.slee;
/* the event name, event object, Activity object, default address, and
custom name */
public String getEventName();
public Object getEvent();
public Object getActivity();
public Address getAddress();
public void setAddress(Address address);
public String getCustomName();
public void setCustomName(String customName);
/* control attribute */
public boolean isPossibleInitialEvent();
public void setPossibleInitialEvent(boolean b);
}
Before the SLEE invokes the initial event selector method, it initialises the InitialEventSelector
object argument to the initial event selector method as follows:
• The <variable>Selected attributes are initialized to true if the event element contains a
select element that selects the convergence variable.
• The eventName and event attributes are initialized according to the event fired by the event
producer. The eventName attribute is initialized with the SBB defined event name correspond-
ing to the event type of the event. The event attribute is initialized with the event object pro-
vided by the event producer or an event object logically equivalent to the event object provided by
the event producer.
The InitialEventSelector object may be instantiated in a different JVM than the event
producer. The event object may be a remote copy of the original event object provided by the event
producer.
• The activity attribute is initialized to the underlying Activity object of the Activity Context
that was provided by the event producer or a logically equivalent Activity object.
• The address attribute is initialized to the default address provided by the event producer. If the
event producer did not provide a default address, this attribute is set to null.
• The customName attribute is set to null.
• The possibleInitialEvent attribute is set to true.
The implementation of the initial event selector method must observe the following rules:
• The method may use the set accessor methods of the InitialEventSelector object to mo d-
ify the InitialEventSelector object.
• It must not mo dify the event object or the Activity object returned by the getEvent method and
getActivity method. If it modifies these objects, then the execution behavior is unspecified.
• It must return the InitialEventSelector object passed in as its argument.
When the initial event selector method returns, the SLEE computes the convergence name as described in
Section 8.5.2 according to the information in the InitialEventSelector object.
• If the possibleInitialEvent attribute is set to false, then the event is not an initial event
for this Service and no further convergence name and initial event processing is performed for this
Service, i.e. the SLEE will not create any new root SBB entity for this Service to process this
event. If this attribute is set to true, then this event is an initial event if the computed conver-
gence name is unique to the Service.
• The selected convergence name variables are determined by the <variable>Selected attrib-
utes of the InitialEventSelector object.
• The address attribute of the InitialEventSelector object provides the default address.
The value of this attribute may be null if there is no default address. The value of this attribute
determines the value of the address variable in the convergence name if the address variable is se-
lected and is also used to look up Address Profiles in the Address Profile Table of the Service if
the Address Profile variable is selected.
o If the address attribute is null when the initial event selector method returns, then the
address convergence name variable is not selected, i.e. same as setting AddressSe-
lected attribute to false.
o If the AddressProfile variable is set to true and the address is not null but does
not locate any Address Profile in the Address Profile Table of the Service, then no con-
vergence name is created, i.e. same as setting PossibleInitialEvent to false.
• If the value of customName attribute of the InitialEventSelector object is null, then
the custom name variable is not selected.
The event delivery priority of an SBB entity is an integer in the range of -128 through 127, inclusive. -128
is the lowest priority and 127 is the highest priority. The following guidelines for assigning event delivery
priorities should be followed by the SBB Developer and/or Service Deployer to convey an SBB’s sensitiv-
ity to execution order and priority relative to its siblings.
• 100 to 127 for highest event delivery priority.
Child SBB entities of the same parent SBB entity with the highest event delivery priority should
receive the event first.
• 31 to 99 for high event delivery priority.
Child SBB entities of the same parent SBB entity with the high event delivery priority should re-
ceive events earlier than child SBB entities of the same parent SBB entity with standard event de-
livery priority.
• -30 to 30 for standard event delivery priority.
Child SBB entities of the same parent SBB entity with the standard event delivery priority should
receive events earlier than child SBB entities of the same parent SBB entity with low event deliv-
ery priority.
• -99 to –31 for low event delivery priority.
Child SBB entities of the same parent SBB entity with the low event delivery priority should re-
ceive the event later than child SBB entities of the same parent SBB entity with standard event de-
livery priority.
• -128 to -100 for lowest priority.
Child SBB entities of the same parent SBB entity with the lowest event delivery priority should
receive the event last.
o An SBB entity that received the event in the past but became detached and then re-
attached will receive the event again if it remains attached and the event is not masked.
of the received event types of the SBB entity. An optimized SLEE implementation may expand
the SLEE’s event set to include only the events of the received event types of the SBB entity that
could be fired by the underlying Activity object of the Activity Context.
• Detaching an SBB entity from an Activity Context.
This occurs implicitly after the SLEE delivers an Activity End Event to an SBB entity (see Section
7.3.3), when the SBB entity is removed (see Section 2.2.6), or explicitly when the detach
method is invoked (see Section 7.4.3). When this occurs, the SLEE may have to contract the
SLEE’s received event set to exclude events of the received event types of the SBB entity.
• Modifying an SBB entity’s event mask on an Activity Context.
This occurs implicitly when an SBB entity invokes the maskEvent method with a different set
of masked event types. When this occurs, the SLEE may have to contract the SLEE’s received
event set if more events types are masked, or the SLEE may have to expand the SLEE’s received
event set if fewer event types are masked.
The SLEE actively modifies affected event filters when the SLEE’s received event set changes.
import javax.slee.FactoryException;
import javax.slee.TransactionRequiredLocalException;
• As this method takes no arguments, it is the responsibility of the SLEE to provide an appropriate
implementation for the SBBs in each Service. The implementation must return a ServiceAc-
tivity object for the Service the invoking SBB entity exists in.
JAIN SLEE 1.0 Specification, Final Release Page 120
Chapter 8
Events
import javax.slee.ActivityContextInterface;
import javax.slee.FactoryException;
import javax.slee.UnrecognizedActivityException;
import javax.slee.TransactionRequiredLocalException;
• See Section 7.6.1 for a general description on Activity Context Interface Factories, the transac-
tional semantics, and the common exceptions thrown by a getActivityContext-
Interface method.
Chapter 9 Transactions
The previous chapters described the desired behavior of the SLEE and the desired behavior of the comp o-
nents hosted by the SLEE during normal failure -free execution. However, a SLEE running in a real world
environment will encounter failures, such as Java Virtual Machine failures, process failures, host failures,
and resource failures. This chapter defines how the SLEE applies well -established transaction concepts to
address unexpected failures during execution.
All SLEEs must implement the transactional semantics defined in this specification.
Although a SLEE vendor may implement the specified transactional semantics using transactions as de-
fined in the Java Transaction Architecture (JTA), not all SLEE vendors are required to use JTA as the un-
derlying implementation technology. The SLEE specification does not mandate JTA.
9.1 Benefits
Transactions are a proven technique for simplifying application development. The SLEE’s transactional
semantics free the application developer from dealing with many of the issues of failure-recovery and con-
current execution. It allows the developer to design an application as if it were run in an environment that
executes units of work serially with a defined failure model.
9.2 Atomicity
When a transaction executes, it may read and modify execution state directly and may invoke methods that
directly or indirectly read and modify the execution state of the SLEE. The execution state is further parti-
tioned into transactional execution state and non-transactional execution state. Transactional execution
state is state that is associated with a particular transaction and is part of any commit or rollback of the
transaction. Non-transactional execution state is state that is not directly associated with a particular trans-
action. An example of transactional execution state is SBB CMP attributes. An example of non -
transactional execution state is a variable on a thread’s stack.
Atomicity guarantees that when a transaction completes, all changes to the transactional execution state are
applied (committed) or the transactional execution state is restored to its previous value (the transaction is
rolled back). This is often referred to as “all or none” semantics.
The mechanism by which a compliant SLEE implementation provides atomicity guarantees is not defined
by this specification.
9.3 Isolation
All transactions are isolated from each other at the serializable isolation level. This allows multiple units of
work to be executed in parallel provided the end state is guaranteed to be reachable from at least one serial
execution order. This also means changes to the transactional execution state of one transaction are not
vis ible to other concurrently executing transactions.
There are cases where it may be impossible to maintain an isolation guarantee. These cases are covered by
Section 9.11.
The mechanism by which a compliant SLEE implementation provides the isolation guarantee is not defined
by this specification. Examples include the use of an underlying relational database that provides support
for the required isolation, or a local lock manager to serialize access to transactional execution state. These
examples are illustrative rather than prescriptive.
Mark for
Active rollback only Marked for
Rollback
Rollback
Commit Rollback
the commit succeeds the transaction either transitions to the end state or, if heuristics are present, transi-
tions to the Co mmitted state. Otherwise, it enters the Rolled Back state.
actional state changes caused by child SBB entity creation and removal are viewed as having
taken effect within the calling transaction and only take effect if the calling transaction commits.
• SbbContext interface setRollbackOnly and getRollbackOnly methods.
• ActivityContextInterface interface attach and detach methods.
The effects of these methods are considered transactional, and the state changes caused by these
methods are part of the transaction they are invoked within.
• SbbContext interface maskEvent and getEventMask methods.
The effects of these methods are considered transactional, and take effect as part of the successful
commit of the transaction they are invoked within. Regardless of whether the underlying resource
adaptor entity that fires the specified event types is transactional, the SLEE and the resource adap-
tor entity must collaborate to maintain the atomicity guarantee of the transactional programming
model.
• SbbContext interface getActivities and getSbbLocalObject methods.
• Generic ActivityContextInterface interface methods.
• SBB Activity Context Interface interface attribute get and set accessor methods.
Activity Context attributes are part of the transactional execution state.
• NullActivity interface methods.
When a NullActivity object’s endActivity method is invoked to end the NullActiv-
ity object, this method invocation executes within the current transaction. It only takes effect
when the transaction that the endActivity method is invoked from commits successfully. See
Section 7.10 for details on ending NullActivity objects.
• NullActivityFactory interface methods.
• ServiceActivityFactory interface methods.
• All Activity Context Interface Factory interface methods.
• ActivityContextNamingFacility interface methods.
Bindings/unbindings made via the ActivityContextNamingFacility are transactional,
and take effect as part of the successful commit of the transaction they execute within.
• Transactional methods of transactional resources (see Section 9.9).
If a required transactional method is called from a method that does not have an associated transaction and
the newly created transaction fails to commit, the calling method receives a javax.slee.Tran-
sactionRolledbackLocalException.
• When a logical cascading removal method is invoked, the method invocation may cause additional
transactional methods to be invoked. These additional method invocations are always considered
to be non-SLEE originated method invocations. The transactional methods that may be invoked
include the life cycle methods of the SBB entities in the SBB entity tree or the SBB entity sub-tree
being re moved.
A logical cascading removal method invocation may be a SLEE originated method invocation or a non-
SLEE originated method invocation.
• A SLEE originated logical cascading removal method invocation is initiated by the SLEE to re-
claim an SBB entity tree after the attachment count of the root SBB entity of the SBB entity tree
decreases to zero. When the method invocation completes, an entire SBB entity tree should be re-
moved.
The SLEE specification does not specify whether or not the SLEE invokes the logical cascading
removal method in the same transaction that decreases the attachment count of the root SBB to
zero. Thus, a SLEE may implement eager and/or lazy reclamation o f SBB entity trees. If the cas-
cading re moval operation does not occur in the same transaction (i.e. eager reclamation), the
SLEE must behave as if the SBB entity tree has become non-existent. It must remove any conver-
gence name associated with the root SBB entity of the SBB entity tree, i.e. the same convergence
name may cause the SLEE to instantiate a new root SBB entity. It must also not deliver events to
SBB entities in the “non-existent” SBB entity tree.
• A non-SLEE originated logical cascading removal method invocation is initiated by an SBB to
remove an SBB entity tree by invoking the remove method on an SBB local object, or invoking
one of the remove methods on a ChildRelation object.
In summary, the only SLEE originated method invocation in a cascading removal operation is the SLEE
invoking a logical cascading removal method to remove an SBB entity tree after the attachment count of
the root SBB entity of the SBB entity decreases to zero. Non-SLEE originated logical cascading removal
method invocations and all additional transactional methods invoked within a SLEE or a non-SLEE origi-
nated cascading removal method invocation are considered to be non-SLEE originated method invocations.
o The target SBB entity of a Remove Only SLEE originated invocation is the root SBB en-
tity of the SBB entity tree being removed. There is no target SBB object in a Remove
Only SLEE originated invocation.
• Op Only.
o The possible SLEE originated method invocations within a SLEE originated invocation
of this type are as follows:
§ zero or more mandatory t ransactional life cycle method invocations, followed by
§ an invocation of either an event handler method or a sbbRolledBack
method, fo llowed by
§ zero or more mandatory t ransactional life cycle method invocations, followed by
§ at most one sbbExceptionThrown method invocation.
o Within a SLEE originated invocation, these methods must be invoked on the same SBB
object, also known as the target SBB object of the SLEE originated invocation.
o If the SBB object enters the Ready state, then the target SBB entity of the SLEE origi-
nated invocation is the SBB entity represented by the SBB object.
o The SBB object must enter the Ready state for the SLEE to invoke its event handler
method or its sbbRolledBack method .
• Op And Remove.
o The possible SLEE originated method invocations within a SLEE originated invocation
of this type are as follows:
§ zero or more mandatory transactional life cycle method invocations, followed by
§ an invocation of either an event handler method or a sbbRolledBack
method, fo llowed by
§ zero or more mandatory transactional life cycle method invocations, followed by
§ at most one sbbExceptionThrown method invocation, followed by
§ a logical cascading removal method invocation.
o Within a SLEE originated invocation, these methods, except the logical cascading re-
moval method invocation, must be invoked on the same SBB object, also known as the
target SBB object of the SLEE originated invocation. The SBB o b ject must be in the
Ready state when its event handler method or its sbbRolledBack method is invoked.
o The target SBB entity of a SLEE originated invocation of this type is the SBB entity rep-
resented by the target SBB object.
The target SBB entity is always known since the target SBB object must be in the Ready
state.
o The SBB entity tree or SBB entity sub-tree to be removed by the logical cascading re-
moval method invocation within a SLEE originated invocation of this type must be the
SBB entity tree or SBB entity sub-tree rooted by the target SBB entity.
If any of the methods (except the sbbExceptionThrown method) invoked on the target SBB object of a
SLEE originated invocation returns by throwing a RuntimeException, then the SLEE invokes the
sbbExceptionThrown method of the target SBB object of the transaction within the same transaction.
There is at most one sbbExceptionThrown method invocation in each of the above SLEE originated
invocation types since the SLEE will move the target SBB object of the SLEE originated invocation to the
Does Not Exist state after invoking the sbbExceptionThrown method once on the SBB object. The
SLEE will not invoke any oth er methods on the SBB object once it enters the Does Not Exist state.
Each of the SLEE originated mandatory transactional method invocations may in turn invoke other meth-
ods.
• If an invoked method is a transactional method (mandatory or required), then the invoked method
run in the same transaction as the SLEE originated mandatory transactional method invocation.
• If an invoked method is a non-transactional method, then the invoked method does not run in the
same transaction as the SLEE originated mandatory transactional method invocation. The invoked
method runs with an unspecified transaction context (see Section 9.7.1).
begin( )
sbbCreate( )
sbbPostCreate( )
onFooEvent( )
sbbStore( )
commit( )
Errors related to SLEE originated or non-SLEE originated method invocations may occur outside of invo-
cation itself. Resource failures may cause these errors. These errors may also cause transactions to roll
back.
begin( )
onBarEvent( )
sbbExceptionThrown( )
rollback( )
begin( )
sbbActivate( )
sbbLoad( )
sbbRolledBack is called on a new SBB
sbbRolledBack( ) object (a') that has the same CMP state
as SBB object a
sbbStore( )
commit( )
10.1 Introduction
When developing an SBB, the SBB Developer may define zero or more Profile Specifications. Each Profile
Specification specifies a kind of provisioned data required by the SBB to perform its function. The Profile
Specification describes the schema of Profile Tables created from the Profile Specification by the Adminis -
trator. More precisely, it defines the set of attributes of every Profile Table created from the Profile Specifi-
cation. Every Profile in these Profile Tables has the same attributes.
The SBB Developer defines a Profile Specification through a set of Java interfaces, classes, and a deploy-
ment descriptor. These interfaces, classes, and deployment descriptor define the three views of a Profile.
The three views are the SBB Developer’s SBB object view (see Section 10.5.1), the SBB Developer’s man-
agement view (see Section 10.5.2), and the Administrator’s view (see Section 10.5.3).
The SBB Developer packages these Java class files and the deployment descriptor into a Profile Specifica-
tion jar file. The Service Deployer packages the Profile Specification into a deployable unit. The Adminis-
trator deploys this deployable unit into the SLEE. Once the Profile Specification is deployed, the Adminis-
trator can create Profile Tables of the Profile Specification. Each Profile Table has a name, known as the
Profile Table name. Once a Profile Table has been created, the Administrator may add Profiles to the Pro-
file Table. Each Profile within a Profile Table must have a unique name within the Profile Table. This
name is known as the Profile name. The Profile Table name and Profile name together uniquely identify a
Profile within the SLEE. This is known as the Profile identifier.
10.1.1 Relationships
Profile Specifications, Profile Tables, and Profiles participate in the following relationships:
• Profile Specifications and Profile Tables: 1-to-many
The Administrator may create multiple Profile Tables from the same Profile Specification. How-
ever, each Profile Table is created to conform to exactly one Profile Specification.
• Profile Tables and Profiles: 1-to-many
Each Profile may belong to only one Profile Table. A Profile Table may contain zero or more Pro-
files.
• Profiles and Profiles: many-to-many
Each Profile may reference another Profile or itself (see Section 10.6.1). The SLEE does not im-
pose any restrictions on the Profile references.
• Address Profile Tables and Services: 1-to-many
Each Service may optionally reference an Address Profile Table. The same Address Profile Table
may be referenced by more than one Service (see Section 10.13.2).
• Resource Info Profile Tables and Services: 1-to-many
Each Service may optionally reference a Resource Info Profile Table. The same Resource Info
Profile Table may be referenced by more than one Service (see Section 10.13.1).
import java.io.Serializable;
import javax.slee.Address;
import javax.slee.Address;
import javax.slee.Address;
import javax.slee.Address;
o The Java type of the Profile CMP object is the Profile CMP interface defined by Profile
Specification of the Profile Table identified by the Profile identifier returned by the get-
Profile method. Therefore, Java typecast can be used to narrow the returned object to
the Profile CMP interface or a base interface of the Profile CMP interface.
o The values in the attributes of the Profile CMP object are the values present in the Profile
immediately before the Profile was removed from the Profile Table. These values may be
different from the attribute values in the Profile obtained from the Profiler identifier re -
turned by the getProfile method (if the Profile identifier identifies a Profile). The
values may be different if the Profile identified by the Profile identifier has been added
after the previous Profile identified by the Profile identifier was re moved.
o The Profile CMP object returned by an invocation of this method is only valid within the
same transaction that the invocation occurred in. (The same event may be re-fired and
processed in a new transaction, if this method is invoked to obtain another Profile CMP
object, this new Profile CMP object will only be valid within the new transaction.)
o This method may return null if the relevant profile specification implementation classes
for the profile are not available in the classloader of an SBB which receives this event.
This may occur, for example, if an SBB entity attaches to the Profile Table Activity of a
profile table for which the SBB of the SBB entity has not declared a profile-spec-
ref entry in its deployment descriptor for the profile specification of the profile table.
import javax.slee.ActivityContextInterface;
import javax.slee.FactoryException;
import javax.slee.UnrecognizedActivityException;
import javax.slee.TransactionRequiredLocalException;
• See Section 7.6.1 for a general description on Activity Context Interface Factories, the transac-
tional semantics, and the common exceptions thrown by a getActivityContext-
Interface method.
vides the implementations of these methods in a concrete subclass of the Profile Management ab-
stract class.
• Management methods.
These methods are not declared in the Profile CMP interface. These management methods may for
example update a set of Profile attributes in one go or return some result computed from the values
of a set of attributes. The SBB Developer must provide the implementations of these methods in
the Profile Management a bstract class.
The optional Profile Management abstract class implements the following:
• The Profile Management class implements the management methods defined in the Profile Man-
agement interface. If the Profile Management declares any management methods, the SBB Devel-
oper must provide a Profile Management abstract class.
• The Profile Management class also implements the life cycle callback methods that are declared in
the SLEE specification defined ProfileManagement interface. For example, the life cycle
callback methods allow initial values for Profile attributes to be set when the default Profile is cre-
ated, or to perform verification checks on Profile attribute values when the Administrator selects
to commit changes made to a Profile.
Since the management view is dependent on the existence of an SBB object view (if an SBB object view
does not exist there is effectively no Profile attributes to manage for the Profile), the SBB Developer may
only define a management view if an SBB object view is defined. More precisely, a Profile Specification
cannot include a Profile Management interface and/or a Profile Management abstract class if it does not
include a Profile CMP interface. The following table illustrates the allowed combinations.
o Attribute names must be valid Java identifiers. The first letter of the attribute name in a
get and set accessor method must be capitalized, as determined by
java.lang.Character.isUpperCase. This means that getFoo is legal, while
getfoo is not.
o Each attribute must have both a get and set accessor method defined, and the correspond-
ing types used in the get and set accessor methods must be the same.
o Attribute types must conform to the require ments specified in Section 10.12.
o Neither get nor set accessor methods are permitted to include a throws clause.
• The Profile CMP interface may have super-interfaces, however all super-interfaces are also sub-
ject to the rules for definition of Profile CMP interfaces.
While the Profile CMP interface defines both get and set accessor methods, the current SLEE specification
does not allow an SBB object to change Profile attribute values using the set accessor methods. An SBB
object that attempts to invoke set accessor methods in the Profile CMP interface should expect to receive a
java.lang.UnsupportedOperationException.
• The Profile Management interface may extend the Profile CMP interface.
If the Profile Management interface extends the Profile CMP interface, management clients will
be able to invoke the get and set accessor methods defined in the Profile CMP interface to read
and modify all the attributes defined by the Profile CMP interface.
• The Profile Management interface may declare attribute get and set accessor methods.
These methods must be declared in the Profile CMP interface, i.e. the method name, argument and
return types must be the same as declared in the Profile CMP interface and must not have a
throws clause.
• The Profile Management interface may declare management methods.
The following rules apply to management methods:
o Management methods may have any name, but
§ the name must not be the same as any method defined in the javax.sl-
ee.profile.ProfileMBean interface (see Section 10.15.3) or the Profile
CMP interface unless these methods are overloaded, i.e. have different input ar-
guments,
§ the name must not begin with “profile”,
§ the name should not be one of the method names defined in JMX interfaces such
as javax,management,DynamicMBean and javax.management.M-
BeanRegistration.
o Method argument and return types must conform to the requirements specified in Section
10.12.
o Methods may define an arbitrary throws clause.
• The Profile Management interface may have super-interfaces, however all super-interfaces are
also subject to the rules for definition of Profile Management interfaces.
import javax.slee.SLEEException;
tribute would become visible in Profile MBean interface as a read-only attribute. If only the set accessor
method of an attribute is visible, then the attribute would become write-only in the Profile MBean interface.
10.10.1 Uses
For example, the SBB Developer may hide the CMP field accessor methods of a date attribute and define
alternate methods in the Profile Management interface to read and modify the date attribute. For example,
the date attribute may store a date as the number of days since January 1st , 1970. This date format is not
human Administrator friendly. The SBB Developer can hide the CMP field accessor methods of this attrib-
ute from the Profile MBean interface. It can define a set of new accessor methods in the Profile Manage-
ment interface with date formats that are more human Administrator friendly, such as “MM/DD/YYYY”.
import javax.slee.profile.ProfileID;
import javax.slee.profile.ProfileID;
import javax.slee.profile.ProfileManagement;
import javax.slee.profile.ProfileVerificationException;
Service’s Resource Info Profile Table changes (add a Profile, remove a Profile, or Profile updated), the
SLEE should notify the resource adaptor entities of this change.
Each resource adaptor entity should parse this information and act accordingly if it understands the infor-
mation. For example, the resource adaptor entity may modify event filters or modify its operational behav-
ior.
A Resource Info Profile has a single info attribute. The Java type of this attribute is Java.lang.Str-
ing. Since the format of the information in the info attribute and the resource adaptor entity contract is
not specified in this version of the SLEE specification, the information stored in this attribute is unlikely to
be portable across resource adaptor and SLEE implementations. The Administrator will have to customize
the information stored in Resource Info Profile Tables to the deployment environment.
Note: Two Services may specify incompatible or conflicting information in their Resource Info Profile Ta-
ble. This version of the SLEE specification does not specify how the SLEE or the resource adaptors should
handle this situation.
The Profile CMP interface of the Resource Info Profile Specification is as fo llows:
package javax.slee.profile;
• The addresses attribute must be indexed and unique . This is specified using a profile-
index ele ment in the Profile Specification’s deployment descriptor (see example in Section
10.13.2.2). In addition, the unique attribute of the profile-index element must be “True”.
It is used to enforce the uniqueness of addresses stored in the Address Profile Table.
Future releases of the SLEE specification are likely to relax the uniqueness requirement of the
addresses attribute.
Typically, each Address Profile in a Service’s Address Profile Table represents a subscriber of the Service.
The addresses attribute contains the subscriber’s address(es).
See how the SLEE uses the Address Profile Table to establish event filters in Section 8.6.1 and to deter-
mine whether new root SBB entities of the Service should be instantiated to handle an event in Section 8.5.
import javax.slee.Address;
import javax.slee.Address;
import javax.slee.profile.AddressProfileCMP;
import javax.slee.profile.ProfileID;
import javax.slee.profile.ProfileManagement;
import javax.slee.profile.ProfileVerificationException;
o The SLEE must implement the set accessor methods inherited from the Profile CMP in-
terface to return by throwing a javax.slee.profile.Read OnlyProfileEx-
ception if the set accessor methods are invoked on an Profile Management object from
a Profile MBean object that is in a read-only state (see Section 10.16.2), or to set the
value of the dirty flag of a Profile Management object to true if any of the CMP fields
of the Profile Management object have been successfully updated using the set accessor
methods.
o The SLEE implements a Profile MBean class (see Section 10.15).
• The Profile MBean class implements a standard MBean, a dynamic MBean, or a model MBean
but must present the Profile MBean interface that is constructed using the rules specified in Sec-
tion 10.15.1 to the MBean Server.
• The Profile MBean class must expose get and set accessor methods that follow the design pattern
for managed attributes as attributes, i.e. they must be accessible via both the invoke, getAt-
tribute (for get accessor methods) and setAttribute (for write accessor methods) methods
of the MBean Server.
• The Profile MBean class must implement all the methods defined in the javax.slee.pro-
file.ProfileMBean interface. Section 10.15.3 describes each of these methods.
• The Profile MBean class must support the Profile MBean object life cycle defined in Section
10.16.2. If invocation of a set accessor method or a management method results in javax.sl-
ee.profile.ProfileReadOnlyException being thrown by the Profile Management ob-
ject (for exa mple, because a write operation is attempted on a Profile MBean object that is in the
read-only state), the SLEE translates the exception to a javax.slee.InvalidStateEx-
ception before throwing it to the invoking management client.
• The Profile MBean class must implement all the methods that are included in the Profile MBean
interface. The method implementations may delegate invocations to appropriate methods in the
Profile Management implementation class.
• If the implementation of a management method provided by an SBB Developer throws an excep-
tion, the exception must be wrapped in a javax.slee.profile.Profile Implementa-
tionException and re-thrown to the invoking management client.
• The Profile MBean class may use javax.slee.management.ManagementException to
report errors to the management client when an attempt to access or update persistent CMP fields
fails due to a system-level problem.
import javax.slee.InvalidStateException;
import javax.slee.management.ManagementException;
• The implementation of this method should start a new transaction for the editing session, or per-
form the equivalent function.
• If a system-level failure is encountered during the execution of this method or a concurrent edit of
the same Profile is attempted on a SLEE implementation that does not support concurrent edits
(see Section 10.17.2), the implementation should throw a javax.slee.management.Ma-
nagementException to report the exceptional situation to the A dministrator.
• If the Profile MBean object is already in the read-write state when this method is invoked, this
method has no further effect and returns silently.
• The execution of this method must begin in the same transaction context as that begun by the
createProfile or editProfile invocation that initiated the editing session, but must roll
back the transaction before returning.
• The restoreProfile method must throw a javax.slee.InvalidStateException if
the Profile MBean object is not in the read-write state.
Exists
XXXProvisioningMBean.addProfile XXXProvisioning.removeProfile
(tableName, uniqueProfileKey) (tableName, uniqueProfileKey)
Exists
• If the restoreProfile method is invoked on the Profile MBean object, any changes that have
been made to the Profile Management object that caches the persistent state of the Profile since the
Profile MBean object entered the read-write state must be discarded.
• If instead the commitProfile method is invoked on the Profile MBean object, the profile-
Verify callback method is invoked on the Profile Management object that caches the persistent
data of the Profile. If the verification callback returns without throwing an exception and the Pro-
file MBean object passes additional SLEE implemented verification (such as checking for unique-
ness of “unique” indexed attributes), the changes made to the Profile Management object are
committed and the Profile MBean object moves to the read-only state. If an exception is thrown by
the verification callback, the Profile MBean object remains in the read-write state.
• The SLEE may invoke the profileLoad and profileStore callback methods at any time to
synchronize the transient state held in the Profile Management object with the persistent state
cached in CMP fields. If the Profile MBean object is in the read-write state, then the SLEE in-
vokes the profileLoad and profileStore methods with the same transaction context as
management methods of the Profile Management objects.
Figure 15 illustrates the life cycle of a Profile MBean object. Transitions marked by asterisks (*) are im-
plementation specific and undefined by this specification.
* *
• This interface is optional. If the SBB does not declare any usage parameter names, the SBB De-
veloper does not have to provide an SBB Usage Parameters interface.
The usage parameter names of the counter-type usage parameters are “firstCount” and “secondCount”. The
usage parameter names of the sample-type usage parameters are “timeBetweenNewConnections” and
“timeBetweenErrors”.
<sbb>
…
<sbb-classes>
…
<sbb-usage-parameters-interface>
<description> … </description>
<sbb-usage-parameters-interface-name>
com.foobar.FooSbbUsageParameter
</sbb-usage-parameters-interface-name>
</sbb-usage-parameters-interface>
…
</sbb-classes>
…
</sbb>
• A SLEE component must not attempt to create a class loader; obtain the current class loader; set
the context class loader; set security manager; create a new security manager; stop the JVM; or
change the input, output, and error streams.
These functions are reserved for the SLEE. Allowing the SLEE component to use these functions
could compromise security and decrease the SLEE’s ability to properly manage the runtime envi-
ronment.
• A SLEE component must not attempt to set the socket factory used by ServerSocket, Socket, or
the stream handler factory used by URL.
These networking functions are reserved for the SLEE. Allowing the SLEE components to use
these functions could compromise security and decrease the SLEE’s ability to properly manage
the runtime environment.
• A SLEE component must not attempt to manage threads. The SLEE component must not attempt
to start, stop, suspend, or resume a thread; or to change a thread’s priority or name. The SLEE
component must not attempt to manage thread groups.
These functions are reserved for the SLEE. Allowing the SLEE component to manage threads
would decrease the SLEE’s ability to properly manage the runtime environment.
• A SLEE component must not attempt to directly read or write a file descriptor.
Allowing the SLEE component to read and write file descriptors directly could compromise secu-
rity.
• A SLEE component must not attempt to obtain the security policy information for a particular
code source.
Allowing the SLEE component to access the security policy information would create a security
hole.
• A SLEE component must not attempt to load a native library.
This function is reserved for the SLEE. Allowing the SLEE component to load native code would
create a security hole.
• A SLEE component must not attempt to gain access to packages and classes that the usual rules of
the Java programming language make unavailable to the SLEE comp onent.
This function is reserved for the SLEE. Allowing the SLEE component to perform this function
would create a security hole.
• A SLEE component must not attempt to define a class in the javax.slee namespace.
This function is reserved for the SLEE. Allowing the SLEE component to perform this function
would create a security hole.
• A SLEE component must not attempt to access or modify the security configuration objects (Pol-
icy, Security, Provider, Signer, and Identity).
These functions are reserved for the SLEE. Allowing the SLEE component to use these functions
could compromise security.
• A SLEE component must not attempt to use the subclass and object substitution features of the
Java Serialization Protocol.
Allowing the SLEE component to use these functions could compromise security.
• A SLEE component must not attempt to pass this as an argument or method result. Instead of
writing code that uses the this reference and callback methods, an SBB Developer should attach
to Activity Contexts to receive events.
• An SBB component must not modify event objects passed to its event handler methods and must
not hold a reference to the event object, directly or indirectly, after the event handler method re-
turns.
• An SBB component must not modify event objects passed to its fire event methods.
To guarantee portability of the SLEE component’s implementation across all compliant SLEEs, the SLEE
components should be tested using a SLEE with the security settings defined in Section 12.1.1. This table
defines the minimal functionality that a compliant SLEE must provide to the SLEE components at runtime.
Chapter 13 Facilities
Facilit ies are standard functional components provided by the SLEE. The SLEE specification defines the
following standard Facilities:
• Timer Facility (see Section 13.1)
• Alarm Facility (see Section 13.2)
• Trace Facility (see Section 13.4 )
• Activity Context Naming Facility (see Section 13.5)
• Profile Facility (see Section 13.6)
import javax.slee.Address;
import javax.slee.ActivityContextInterface;
import javax.slee.TransactionRolledbackLocalException;
// integer representation
public static final int PRESERVE_NONE …;
public static final int PRESERVE_ALL …;
public static final int PRESERVE_LAST …;
// methods
public boolean isNone() { … }
public boolean isAll() { … }
public boolean isLast() { … }
• The fromInt and toInt methods allow conversion between the TimerPreserveMissed
object form and numeric form.
• The fromInt method throws a java.lang.IllegalArgumentException if the op-
tion argument is not one of the three integer representations.
The Timer Facility should adjust timeout values that are smaller than the current timer resolution to the
current timer resolution, or the specified period (for periodic timers only), whichever is less. This avoids
dropping Timer Events as a result of insufficient timer resolution (see Section 13.1.6).
The TimerOptions class will throw a java.lang.IllegalArgumentException if a negative
timeout value is provided to its setTimeout or constructor methods. Furthermore, if the timeout value
specified by the options argument to a setTimer method is more than the period argument of the
setTimer method, the Timer Facility will also throw an IllegalArgumentException.
o For a non-periodic timer or the first Timer Event of a periodic timer, the scheduled time
of the Timer Event is the start time specified by the startTime argument of the set-
Timer method.
o For subsequent Timer Events of a periodic timer, the scheduled time of the Timer Event
is the scheduled time of the previous repetition plus the period of the timer (as specified
by the period argument of the setTimer method).
• An expiryTime attribute.
This attribute contains the time that the SLEE Timer Facility actually fired the Timer Event, also
known as the actual expiry time of the Timer Event. This is the time at which the SLEE considers
the event ready to enqueue the Timer Event into the SLEE’s event queue.10
o The Timer Facility provides an estimate of the expected maximum difference between
scheduled and actual expiry times via the getResolution method of the Timer-
Facility interface. This estimate may change over time to reflect current SLEE be-
havior.
• A period attribute.
This attribute contains the repetition period, as specified by the period argument of the set-
Timer method used to create the timer. A non-periodic timer has a period of Long.MAX_VA-
LUE.
• A numRepetitions attribute.
This attribute contains the number of repetitions requested, as specified by numRepetitions
argument of the setTimer method used to create the timer. Its value is zero (0) for a periodic
timer that repeats infinitely and one (1) for a non-repeating timer.
• A remainingRepetitions attribute.
This attribute contains the number of outstanding repetitions, i.e. the potential n umber of Timer
Events that the Timer Facility will fire in the future for this timer. Its value is Long.MAX_VALUE
for an infinitely repeating periodic timer and zero (0) for a non-periodic timer. Otherwise, its value
is numRepetitions minus the repetition number of this Timer Event for a finite repeating pe-
riodic timer.
• A missedRepetitions attribute.
This attribute contains the number of missed repetitions between the last Timer Event and this
Timer Event.
13.1.6 Desired Timer Facility behavior and Timer Facility pseudo code
The Timer Facility implementation must implement the behavior described below.
• The Timer Facility should aim to fire Timer Events with an actual expiry time as close as the
scheduled time as practical.
• The Timer Facility may fire Timer Events with an actual expiry time that is before the scheduled
time. However it should not fire timer events with an actual expiry time that is less than (sched-
uled time – timer resolution11 ). As timer resolution may change over time, users of the Timer Fa-
cility cannot rely on this behavior being strictly followed.
• The Timer Facility must consider all Timer Events where actual expiry time is greater than
(scheduled time + timeout 12 ) as late when timeout is greater than timer resolution. Late Timer
10
The Timer Facility may not actually enqueue the Timer Event if it is marked as late or discarded under the TimerPreserve-
Missed.NONE or TimerPreserveMissed.LAST options.
11
The getResolution method of the TimerFacility interface returns the timer resolution.
12
The timeout value is specified by the timeout attribute of the TimerOptions object originally passed to the setTimer
method.
JAIN SLEE 1.0 Specification, Final Release Page 178
Chapter 13
Facilities
Events are handled according to the preserveMissed option in the TimerOptions object
originally passed to the setTimer method.
The following pseudo code illustrates the desired behavior of the Timer Facility. The following pseudo
code is periodically executed for each active timer.
// timer is the timer object currently being examined.
// timer.scheduleTime is time that the Timer Event is scheduled to fire.
// timer.timeout is timeout for this timer (from TimerOptions).
// timer.numRepetitions is the total repetitions for this timer, 0 if infinite,
// 1 if non-periodic.
// timer.remainingRepetiton is the remaining repetition count, initially Long.MAX_VALUE
// for infinite periodic timers, timer.numRepetitions
// otherwise.
// timer.period is the timer period (Long.MAX_VALUE if non-periodic).
// timer.missed is the counter of undelivered late events.
//
// Tres is the current timer resolution.
// Tsys is the current system time.
// Tdto is the current default time out
// Tfire is the "fire before" time; all Timer Events scheduled
// before this time are candidates for firing.
//
// Tsys <= Tfire <= Tsys + Tres
// Tres <= Tdto
//
// Timer Events fired are given with scheduled and actual expiry times, and for periodic
// timers, number of missed repetitions. Other attributes of the Timer Event can
// be inferred from current timer state.
endif
timer.scheduleTime += timer.period
endwhile
// Fire the last missed event preserved above (if any) and
// any on-time events.
while timer.scheduleTime < Tfire and timer.remainingRepetitions > 0 do
fire event with (
event.scheduled = timer.scheduleTime,
event.expiryTime = Tsys,
event.missedRepetitions = timer.missed)
timer.missed = 0
if timer.numRepetitions != 0 then
timer.remainingRepetitions -= 1
endif
timer.scheduleTime += timer.period
endwhile
endif
endif
if timer.numRepetitions != 0 and timer.remainingRepetitions == 0 then
cancel timer
endif
import javax.slee.ComponentID;
import javax.slee.UnrecognizedComponentException;
// integer representation
public static final int LEVEL_FINEST …;
public static final int LEVEL_FINER …;
public static final int LEVEL_FINE …;
public static final int LEVEL_CONFIG …;
public static final int LEVEL_INFO …;
public static final int LEVEL_WARNING …;
public static final int LEVEL_SEVERE …;
public static final int LEVEL_OFF …;
// methods
public boolean isFinest() { … }
public boolean isFiner() { … }
public boolean isFine() { … }
public boolean isConfig() { … }
public boolean isInfo() { … }
public boolean isWarning() { … }
public boolean isSevere() { … }
public boolean isOff() { … }
• The external management interface of the Trace Facility provides a method to set the trace filter
level for a Service or an SBB. Only trace messages that are emitted for a component (Service or
SBB) with an equal or higher trace level than the component’s trace filter level will be accepted
and transmitted by the Trace Facility. The management client can use this management interface
to set the trace filter levels for various Services or SBBs. SBB objects can obtain the trace filter
level set by the management client from the Trace Facility. This allows these SBB objects to not
generate trace messages whose trace level is below the trace filter level set by the management cli-
ent.
• The management client can optionally use filters to filter trace messages so that only the trace
messages that the management client would like to receive are transmitted to the management cli-
ent. These filters reduce trace message related network traffic and the processing that the ma n-
agement client has to perform to filter unwanted trace messages.
The external management interface of the Trace Facility is defined by the TraceMBean interface. Each
trace message transmitted by the Trace Facility is emitted through a TraceMBean object as a TraceNo-
tification object. See Section 14.13 for detailed description of the TraceMBean interface and the
TraceNotification class.
The Trace Facility may be used by other entities within the SLEE to generate trace messages. These entities
include the various subsystems and Facilities of the SLEE, and resource adaptors. The SLEE specification
does not define the interface that these entities use to emit trace messages. However, each trace message is
emitted through the same TraceMBean object and as a TraceNotification object.
import javax.slee.ComponentID;
import javax.slee.UnrecognizedComponentException;
• All methods of the TraceFacility interface are non-transactional methods. The effects of op-
erations invoked on this facility occur irregardless of the state or outcome of any enclosing trans-
action.
These methods are non-transactional because trace messages emitted from within a transaction
should not be “discarded” if the transaction aborts. In fact, SBBs should use trace messages to
document any unexpected occurrences, including the occurrences that lead to transaction roll-
backs.
• The SLEE provides the concrete implementation class of a TraceFacility object. This im-
plementation class implements the TraceFacility interface.
• The methods of this interface throw the javax.slee.facilities.FacilityException
if the requested operation cannot be completed because of a system-level failure.
import javax.slee.ActivityContextInterface;
import javax.slee.TransactionRequiredLocalException;
The Activity Context Naming Facility allows Foo Conference SBB entities to locate a “shared” Activity
Context that represents a conference session, and to maintain shared state relating to the conference ses-
sions, such as the total number of callers on the conference session and other similar statistics.
import javax.slee.TransactionRolledbackLocalException;
• An Iterator object can be obtained from the Collection object that can be used to iterate
over the Profile identifiers (i.e. the next method of the Iterator object returns a ProfileID
object) of the Profiles in the Profile Table.
• If the profileTableName argument does not identify a Profile Table recognized by the SLEE,
the method throws a javax.slee.profile.UnrecognizedProfileTableName-
Exception. If the attributeName argument does not identify an attribute of the Profile Ta-
ble, then the method throws a javax.slee.profile.UnrecognizedAttribute-
Exception. If the attributeName argument identifies an attribute that is not indexed, then
the method throws a javax.slee.profile.AttributeNotIndexedException. If any
of the method’s arguments are null, the method throws a java.lang.NullPointer-
Exception.
• The Collection object, its Iterator objects, and the Profile identifiers obtained from these
objects are only valid within the transaction that returned the Collection object.
Chapter 14 Management
The JAIN SLEE specification provides management capabilities for deployment units, Services, Profile
Tables, Profiles, the Alarm Facility, and the Trace Facility.
A management client manages the SLEE by interacting with a set of SLEE specification defined MBean
objects, as defined by the Java Management Extension (JMX) specification. The SLEE specification de-
fines the MBean interface of these MBean objects and the requirements for the MBean classes that imple-
ment these MBean interfaces.
is accessible and/or updateable via both the invoke and getAttribute / setAttribute
methods of the MBean Server. This is the default behavior of a standard MBean. The attribute
name as passed to getAttribute / setAttribute is case sensitive, and must match the
get/set method(s). e.g. for getState , the attribute name is “State”.
• If a method defined in a SLEE MBean interface returns one or more Object Names of other SLEE
MBean objects, the implementation of the method must make sure that the respective MBean ob-
jects are registered with the SLEE’s MBean Server before returning.
• If the SLEE MBean class generates notifications, it must implement the JMX javax.manage-
ment.NotificationBroadcaster interface. The SLEE MBean interface itself does not ex-
tend this interface directly as the addNotificationListener and removeNotifi-
cationListener methods of the NotificationBroadcaster interface should not be
exposed as management operations that can be invoked by the management client. Notification lis-
teners should be added or removed via the MBean Server.
The implementation classes of the following SLEE MBean interfaces emit notifications and must
implement the NotificationBroadcaster interface:
o The SleeManagementMBean interface.
A SleeManagementMBean object generates SLEE state change notifications.
o The AlarmMBean interface.
An AlarmMBean object generates alarm notifications.
o The TraceMBean interface.
A TraceMBean object generates emits trace notifications.
o The SBB Usage MBean interface (see Section 14.10).
An SBB Usage MBean object generates usage notifications.
Each of these implementation classes must implement the notification broadcaster semantics de-
fined by the JMX specification. This includes the filtering semantics defined by the JMX No ti-
ficationBroadcaster and NotificationFilter interfaces.
aptation layer between the SLEE management operations and the management client’s front end. The
management client MLet can use any proprietary mechanism in order to communicate requests and re-
sponses from the front end to the SLEE’s MBean Server.
The requirements of the management client MLet MBean are:
• The MLet must be implemented in accordance with the JMX 1.0 specification for MBeans.
• The MLet can be implemented as a standard MBean, a dynamic MBean, or a model MBean.
• The MLet should implement the javax.management.MBeanRegistration interface.
The preRegister method defined in this interface provides the MLet with the MBean Server
instance that the SLEE MBean objects are registered with.
• A suitable MLet text file that provides the necessary codebase and instantiation class information
should be provided with the MLet distribution.
AlarmMBean
object
Deployment-
MBean
object
TraceMBean
object
Profile-
Provisioning- NamesMBean
MBean objects
object
import javax.management.ObjectName;
Starting
start( ) *
Stopped * Running
shutdown()
stop( )
*
Stopping
ated for Services whose persistent state say they should be active, and a Service Started
Event is are fired on each of these ServiceActivity objects .
Starting to Stopping: The SLEE has no operations to execute.
• Running state.
“Active” resource adaptor entities (and the SLEE) are actively firing events as conditions dictate.
The event router is instantiating SBB entities and delivering events to them as required.
o Transitions:
Running to Stopping: Any ServiceActivity objects or ProfileTableActiv-
ity objects that exist are ended by the SLEE, and an Activity End Event is fired on each
of them.
• Stopping state.
This state is identical to the Running state except no new Activity objects are accepted from re-
source adaptor entities or created by the SLEE. Existing Activity objects are allowed to end (sub-
ject to an arbitrary vendor-specified timeout). The SLEE spontaneously moves out of this state
when all Activity objects have ended. If this state is reached from the Starting state, there will be
no existing Activity objects and transition to the Stopped state should immediately occur.
o Transitions:
Stopping to Stopped: Any resource adaptor entities that were active are deactivated so
they do not produce any further events. If the event router had been started, it is stopped.
The implementation of a SLEE must ensure that shutdown cannot fail. For example, if a
resource adaptor entity fails to deactivate properly, the SLEE should just ignore any fur-
ther events it produces.
The Stopped and Running states are stable, in that spontaneous transitions to other states do not occur. The
Starting and Stopping states are transitional hence spontaneously move to another state as conditions dic-
tate.
import javax.management.ObjectName;
import javax.slee.InvalidStateException;
// get the Object Names of the other SLEE MBean objects made accessible
// by this SleeManagementMBean object
public ObjectName getDeploymentMBean();
public ObjectName getServiceManagementMBean();
public ObjectName getProfileProvisioningMBean();
public ObjectName getTraceMBean();
public ObjectName getAlarmMBean();
}
• The getState method.
This method returns a SleeState object that indicates the current operational state of the SLEE.
o It throws a javax.slee.management.Management Exception if the current
operational state of the SLEE cannot be obtained due to a system-level failure.
• Methods that change the operational state of the SLEE, i.e. start and stop.
o The start method.
This method can only be called when the SLEE is in the Stopped state, and causes propa-
gation to the Starting state
§ Conditions:
Pre: SleeManagementMBean.getState() == SleeState.STOPPED
Post: SleeManagementMBean.getState() == SleeState.START-
ING
o The stop method.
This method can only be called when the SLEE is in the Running state, and causes
propagation to the Stopping state.
§ Conditions:
Pre: SleeManagementMBean.getState() == SleeState. RUNNING
Post: SleeManagementMBean.getState() == SleeState.STOP-
PING
o The shutdown method.
This method can only be called when the SLEE is in the Stopped state, and causes all
SLEE processes running under the same server image to shutdown and terminate in a
graceful manner.
§ Conditions:
Pre: SleeManagementMBean.getState() == SleeState.STOPPED
Post: SLEE server processes no longer exist for the respective server image.
The start and stop methods should not block. The operations the SLEE needs to perform in
the transitional states, and further transitions to stable states, should be performed in a separate
thread of execution to the thread that invoked the start or stop management operation.
The shutdown method should never return, i.e. System.exit() should be invoked before
control is returned to the caller.
o The above methods may throw the following exceptions:
§ javax.slee.InvalidStateException.
This exception is thrown if a requested change to the operational state of the
SLEE is not permitted from the current operational state.
§ javax.slee.management.ManagementException.
If the requested operation cannot be performed due to a system-level failure,
then the method throws a ManagementException. The requested operation
may be valid but the SLEE cannot perform the requested operation due to a sys-
tem-level failure, or the SLEE cannot determine whether the requested operation
is valid due to a system-level failure.
• Methods that get the Object Names of the SLEE MBean objects made accessible by this Slee-
ManagementMBean object.
o The getDeploymentMBean method
o The getServiceManagementMBean method
o The getProfileProvisioningMBean method.
o The getTraceMBean method
o The getAlarmMBean method
The implementation of these methods must make sure that the requested MBean Object Name is
registered with the SLEE MBean Server before returning.
// integer representation
public static final int SLEE_STOPPED …;
// methods
public boolean isStopped() { … }
public boolean isStarting(){ … }
public boolean isRunning() { … }
public boolean isStopping() { … }
import javax.management.Notification;
import javax.slee.ComponentID;
is immutable while the component is installed in the SLEE. Two components of the same type that have the
same component identity cannot be installed simultaneously in the SLEE.
• SBB component identity.
An SBB’s name, vendor, and version determine the SBB’s component identity.
• Event type component identity.
An event type’s name, vendor, and version determine the event type’s component identity.
• Profile Specification component identity.
A Profile Specification’s name, vendor, and version determine the Profile Specification’s comp o-
nent identity.
• Service component identity.
A Service’s name, vendor, and version determine the Service’s component identity.
• Resource adaptor type component identity.
A resource adaptor type’s name, vendor, and version determine the resource adaptor type’s com-
ponent identity.
• Resource adaptor component identity.
A resource adaptor’s name, vendor, and version determine the resource adaptor’s component iden-
tity.
The concrete implementation class of a component identifier should provide an appropriate implementation
of the equals, hashCode, and toString methods.
• The equals method.
This method indicates whether the specified object (specified by the obj argument) is equal to
this component identifier. The specified object is equal to this component identifier if the specified
object is a component identifier and has the same type and identity.
• The hashCode method.
The implementation of this method should provide a reasonable hash code value for the comp o-
nent identifier.
• The toString method.
The implementation of this method should provide a reasonable string representation for the com-
ponent identifier.
import javax.slee.ComponentID;
import javax.slee.EventTypeID;
import javax.slee.SbbID;
import javax.slee.profile.ProfileSpecificationID;
import javax.slee.resource.ResourceAdaptorID;
import javax.slee.resource.ResourceAdaptorTypeID;
import java.net.MalformedURLException
import javax.slee.EventTypeID;
import javax.slee.InvalidStateException;
import javax.slee.SbbID;
import javax.slee.ServiceID;
import javax.slee.UnrecognizedComponentException;
import javax.slee.profile.ProfileSpecificationID;
import javax.slee.resource.ResourceAdaptorID;
import javax.slee.resource.ResourceAdaptorTypeID;
ManagementException;
public void uninstall(DeployableUnitID id)
throws NullPointerException,
UnrecognizedDeployableUnitException,
DependencyException,
InvalidStateException,
ManagementException;
public DeployableUnitID getDeployableUnit(String url)
throws NullPointerException,
UnrecognizedDeployableUnitException,
ManagementException;
public DeployableUnitID[] getDeployableUnits()
throws ManagementException;
public SbbID[] getSbbs()
throws ManagementException;
public EventTypeID[] getEventTypes()
throws ManagementException;
public ProfileSpecificationID[] getProfileSpecifications()
throws ManagementException;
public ServiceID[] getServices()
throws ManagementException;
public ResourceAdaptorTypeID[] getResourceAdaptorTypes()
throws ManagementException;
public ResourceAdaptorID[] getResourceAdaptors()
throws ManagementException;
public ComponentID[] getReferringComponents(ComponentID id)
throws NullPointerException,
UnrecognizedComponentException,
ManagementException;
public DeployableUnitDescriptor getDescriptor(DeployableUnitID id)
throws NullPointerException,
UnrecognizedDeployableUnitException,
ManagementException;
public DeployableUnitDescriptor[] getDescriptors(DeployableID[] ids)
throws NullPointerException,
ManagementException;
public boolean isInstalled(DeployableUnitID id)
throws NullPointerException,
ManagementException;
public ComponentDescriptor getDescriptor(ComponentID id)
throws NullPointerException,
UnrecognizedComponentException,
ManagementException;
public ComponentDescriptor[] getDescriptors(ComponentID[] ids)
throws NullPointerException,
ManagementException;
public boolean isInstalled(ComponentID id)
throws NullPointerException,
ManagementException;
}
• The install method.
This method installs the deployable unit jar file identified by the url argument. Each component
jar file contained in the deployable unit is installed by the SLEE. If all these components install
successfully, the SLEE then installs any Services contained in the deployable unit jar file. The de-
ployable unit is only successfully installed if all its included component jars and Services install
successfully. If an installation attempt fails, any components in the deployable unit that were suc-
cessfully installed must be uninstalled again before the install method returns.
A component cannot be installed if it has the same identity as a component of the same type al-
ready installed in the SLEE. Additionally, the SLEE must make other considerations depending on
the type of the component being installed.
o An SBB jar file.
An SBB contained in an SBB jar file may have references to other SBBs, event types,
Profile Specifications, resource adaptor types. These other components must be installed
before the SBB jar file can be successfully installed.
o An event jar file.
An event jar file contains one or more event types. An event jar file cannot be installed
successfully if one or more of the event types defined in the event jar file have the same
identity as an event already known to the SLEE, regardless who defined the existing
event type or the new event type. An SBB developer, a resource, a resource adaptor type,
a SLEE vendor, or the SLEE specification may have defined the existing event type.
o A Profile Specification jar file.
No special considerations need to be made by the SLEE when installing a Profile Specifi-
cation jar file.
o A Service XML file.
A Service described in a Service XML file can only be installed if its root SBB is already
installed.
o A resource adaptor type jar file.
A resource adaptor type jar file contains one or more resource adaptor types. A resource
adaptor type may have references to event types. These event types must be installed be-
fore the resource adaptor type jar file can be successfully installed.
o A resource adaptor file.
A resource adaptor jar file can only be installed if the resource adaptor types referenced
by the resource adaptors in t he resource adaptor jar file are already installed.
The install method may throw the following exceptions.
o MalformedURLException.
This exception is thrown if the url parameter is not a properly formatted URL.
o javax.slee.management.AlreadyDeployedException.
If the deployable unit contains a component with the same component identity as a com-
ponent of the same type that is already installed in the SLEE, an AlreadyDe-
ployedException exception is thrown.
o javax.slee.management.DeploymentException.
This exception is thrown if a component could not be installed due to a problem directly
related to it or its contents. For example a contained component may fail a SLEE compli-
ance check, a referenced component may not be installed, or a required class file might
be missing from the jar.
• The uninstall method.
This method uninstalls the deployable unit specified by the id argument. Uninstalling a deploy-
able unit causes all the components in the deployable unit to be uninstalled. A deployable unit
cannot be uninstalled if any component contained in any other deployable unit depends on a com-
ponent contained in the deployable unit being uninstalled.
o An SBB jar file cannot be uninstalled while the SBB defined in the SBB jar file is refe r-
enced by other SBBs or Services installed in the SLEE. The getReferringCompon-
ents method may be used to determine the set of SBBs and Services that reference an
SBB.
o An event jar file cannot be uninstalled while any of the event types defined in the event
jar file are referenced by SBBs or resource adaptor types installed in the SLEE. The
getReferringComponents method may be used to determine the set of SBBs and
resource adaptor types that reference an event type.
o A Profile Specification jar file cannot be uninstalled while SBBs that depend on it are in-
stalled. The getReferringComponents method may be used to determine the set of
SBBs that reference a Profile Specification.
o No special considerations need to be made by the SLEE when uninstalling a Service
XML file.
o A resource adaptor type jar file cannot be uninstalled while SBBs or resource adaptors
that depend on it are installed. The getReferringComponents method may be used
to determine the set of SBBs and resource adaptors that reference a resource adaptor type.
o A resource adaptor jar file cannot be uninstalled while SBBs that depend on it are in-
stalled. The getReferringComponents method may be used to determine the set of
SBBs that reference a resource.
This method may throw the following exceptions.
o javax.slee.management.UnrecognizedDeployableUnitException.
This exception is thrown if the deployable unit identifier passed in as an argument is not
recognized by the SLEE as a valid identifier.
o javax.slee.management.DependencyException.
This exception is thrown if one or more of the components included in the deployable
unit are being referenced by a component in another installed deployable unit.
o javax.slee.InvalidStateException.
This exception is thrown if one or more of the components included in the deployable
unit cannot be uninstalled because the component is in a state that does not allow the
component to be uninstalled. For example, a Service cannot be uninstalled while it is in
the “ACTIVE” state.
• The getDeployableUnit method.
This method returns a DeployableUnitID object when provided with the URL of a deploy-
able unit installed in the SLEE.
This method may throw the following exception.
o javax.slee.management.UnrecognizedDeployableUnitException.
This exception is thrown if the URL passed as an argument does not correspond to a de-
ployable unit installed in the SLEE.
• The getDeployableUnits method.
This method returns an array of DeployableUnitID objects containing the identifiers of all
the deployable units installed in the SLEE.
• The getSbbs method.
This method returns an array of SbbID objects containing the identifiers of all the SBBs installed
in the SLEE.
• The getEventTypes method.
This method returns an array of EventTypeID objects containing the identifiers of all the event
types installed in the SLEE.
• The getProfileSpecifications method.
This method returns an array of ProfileSpecificationID objects containing the identifiers
of all the Profile Specifications installed in the SLEE.
• The getServices method.
This method returns an array of ServiceID objects containing the identifiers of all the Services
installed in the SLEE.
ognized by the SLEE, the returned array contains a null value at the corresponding array index
position.
• The isInstalled(ComponentID id) method.
This method determines if the component identified by the id argument is currently installed in
the SLEE. It returns true if the component is currently installed in the SLEE, otherwise, it re-
turns false.
• The above methods may also throw the following exceptions:
o javax.slee.management.ManagementException.
If the requested operation cannot be performed due to a system-level failure, then the
method throws a ManagementException. The requested operation may be valid but
the SLEE cannot perform the requested operation due to a system-level failure, or the
SLEE cannot determine whether the requested operation is valid due to a system-level
failure.
o java.lang.NullPointerException.
If any of a method’s arguments are null, the method throws a NullPointer-
Exception.
import javax.management.ObjectName;
import javax.slee.InvalidStateException;
import javax.slee.ServiceID;
import javax.slee.UnrecognizedServiceException;
InvalidArgumentException,
InvalidStateException,
UnrecognizedServiceException,
ManagementException;
public void deactivateAndActivate(ServiceID deactivateId,
ServiceID activateId)
throws NullPointerException,
InvalidArgumentException,
InvalidStateException,
UnrecognizedServiceException,
ManagementException;
public void deactivateAndActivate(ServiceID deactivateIds[],
ServiceID activateIds[])
throws NullPointerException,
InvalidArgumentException,
InvalidStateException,
UnrecognizedServiceException,
ManagementException;
public ObjectName getServiceUsageMBean(ServiceID id)
throws NullPointerException,
UnrecognizedServiceException,
ManagementException;
}
• The getState method.
This method returns the current operational state of the Service specified by the id argument.
• The getServices method.
This method returns an array of ServiceID objects that represent Services that are in the opera-
tional state specified by the state argument.
• The activate methods.
These methods activate the Service or Services specified by the method argument.
o It can only be invoked when the specified Service or Services are in the Inactive state.
o If it returns successfully, the specified Service or Services have transitioned to the Active
state.
These methods may throw the following exceptions.
o javax.slee.InvalidArgumentException.
This exception is thrown by the array-argument form of the method if the array parameter
is zero length or contains null or duplicate elements.
o javax.slee.InvalidStateException.
This exception is thrown if any of the specified Services are not in the Inactive state.
• The deactivate methods.
These methods deactivate the Service or Services specified by the method argument.
o It can only be invoked when the specified Service or Services are in the Active state.
o If it returns successfully, the specified Service or Services have transitioned to the Stop-
ping state. Eventually each deactivated Service will transition to the Inactive state after
all SBB entities executing for the Service have completed processing (see Section
2.2.17).
These methods may throw the following exceptions.
o javax.slee.InvalidArgumentException.
This exception is thrown by the array-argument form of the method if the array parameter
is zero length or contains null or duplicate elements.
o javax.slee.InvalidStateException.
This exception is thrown if the any of the specified Services are not in the Active state.
// integer representation
public static final int SERVICE_INACTIVE …;
public static final int SERVICE_ACTIVE …;
public static final int SERVICE_STOPPING …;
// methods
public boolean isInactive() { … }
public boolean isActive() { … }
public boolean isStopping() { … }
• Each of the is<State> methods determines if this ServiceState object represents the
<State> operational state, and is equivalent to (this == <STATE>). For example, the is-
Active method determines if this ServiceState object represents the Active operational
state and is equivalent to (this == ACTIVE).
• The fromInt and toInt methods allow conversion between the ServiceState object form
and numeric form.
• The fromInt method throws a java.lang.IllegalArgumentException if the state
argument is not one of the three integer state representations.
import javax.slee.SbbID;
import javax.slee.ServiceID;
import javax.slee.InvalidSArgumentException;
import javax.slee.UnrecognizedSbbException;
import javax.slee.management.ManagementException;
import javax.slee.usage.UnrecognizedSbbParameterSetNameException;
set name (see Section 0) or the SBB specified by the sbbId argument identifies an SBB
installed in the SLEE and is member of the Service presented by the ServiceUsageM-
Bean object but the SBB does not define an SBB Usage Parameters interface.
• The removeUsageParameterSet method.
Remove the named SBB usage parameter set that belongs to the SBB specified by the sbbID ar-
gument and the Service represented by the ServiceUsageMBean object with the name speci-
fied by the name argument.
This method may throw the following exception.
o javax.slee.usage.UnrecognizedUsageParameterSetNameException.
This exception is thrown if the SBB usage parameter set identified by name does not cor-
respond to an SBB usage parameter set that exists for the SBB specified by the sbbId
parameter.
• The getUsageParameterSets method.
This method returns a list containing the names of the named SBB usage parameter sets that be-
long to the SBB specified by the sbbID argument and the Service represented by the Ser-
viceUsageMBean object.
• The getSbbUsageMBean methods.
These methods return the Object Name of an SBB Usage MBean object. The one-argument form
of this method returns an SBB Usage MBean object that provides management access to the de-
fault SBB usage parameter set for the SBB specified by the sbbID argument (within the Service
represented by the ServiceUsageMBean object). The two-argument form of this method re-
turns an SBB Usage MBean object that provides management access to the specified named SBB
usage parameter set.
These method may throw the following exception.
o javax.slee.usage.UnrecognizedUsageParameterSetNameException.
This exception is thrown by the two -argument form of this method if the SBB usage pa-
rameter set identified by name does not correspond to an SBB usage parameter set that
exists for the SBB specified by the sbbId parameter.
• The resetAllUsageParameters methods.
These methods reset all usage parameters in the default SBB usage parameter set and all named
SBB usage parameters sets. The one-argument form of this method resets the usage parameters of
only the SBB specified by the sbbID argument argument (within the Service represented by the
ServiceUsageMBean object). The zero-argument form of this method resets the usage pa-
rameters of all SBBs within the Service represented by the ServiceUsageMBean object. The
SLEE sets counter-type usage parameters to zero and removes all samples from sample-type usage
parameters.
• The close method.
A management client invokes this method to tell the SLEE that the ServiceUsageMBean ob-
ject is no longer required. The implementation of this method is free to deregister the Service Us-
age MBean object from the MBean Server. The management client must assume that the Object
Name it had for this Service Usage MBean object is no longer valid.
• The above methods may throw the following exceptions:
o javax.slee.UnrecognizedSbbException.
The method throws this exception if the sbbID argument does not identify an SBB in-
stalled in the SLEE or the SBB is not a member of the Service that is represented by the
ServiceUsageMBean object.
o javax.slee.InvalidArgumentException.
The method throws this exception if the sbbID argument identifies an SBB installed in
the SLEE that is a member of the Service that is represented by the ServiceUsageM-
Bean object but does not define an SBB Usage Parameters interface.
o javax.slee.management.ManagementException.
If the requested operation cannot be performed due to a system-level failure, then the
method throws a ManagementException. The requested operation may be valid but
the SLEE cannot perform the requested operation due to a system-level failure, or the
SLEE cannot determine whether the requested operation is valid due to a system-level
failure.
o java.lang.NullPointerException.
If any of a method’s arguments are null, the method throws a NullPointer-
Exception.
• The SBB Usage MBean interface must include in its definition all the methods defined in the in-
terface javax.slee.usage.SbbUsageMBean, either by directly or indirectly inheriting
from SbbUsageMBean interface or by including the operations defined in the SbbUsageM-
Bean interface in its dynamic interface.
• There is corresponding usage parameter accessor method in the SBB Usage MBean interface for
each usage parameter name defined in the SBB Usage Parameters interface (see Section 14.10.2).
The following are the requirements for each usage parameter accessor method.
• There is a usage parameter accessor method for each usage parameter name declared in the SBB
Usage Parameters interface of the SBB.
• The method name of the this accessor method is the lowest-level usage parameter name with the
first letter uppercased and prefixed by “get”.
• The return type of this accessor method depends on the usage parameter type associated with the
usage parameter name.
o The return type is long if the usage parameter name is associated with counter-type us-
age parameters.
o The return type is javax.slee.usage.SampleStatistics if the usage parame-
ter name is associated with sample -type usage parameters.
• The accessor method returns the current value of the usage parameter. The value is a number for a
counter-type usage parameter and a SampleStatistics object for a sample -type usage pa-
rameter.
• If the reset argument is true, the SLEE will reset the usage parameter value before the requested
operation returns. The returned result is always the pre-reset value of the usage parameter. The
SLEE should implement this method as an atomic operation (with respect to concurrent access and
updates to the usage parameter being reset.)
• This method may throw a java x.slee.management.ManagementException if the re-
quested operation cannot be completed successfully.
import javax.slee.InvalidStateException;
import javax.slee.management.ManagementException;
import javax.slee.SbbID;
import javax.slee.ServiceID;
import javax.management.Notification;
The UsageNotification class inherits all the attributes of the base Notification class and adds
the following attributes specific to usage notifications.
• The service attribute.
This attribute specifies the Service identifier of the Service named by the top most level scoped
name of the usage parameter that caused this usage notification to the emitted.
• The sbb attribute.
This attribute specifies the SBB identifier of the SBB named by the second level scoped name of
the usage parameter that caused this usage notification to the emitted.
• The usageParameterSetName attribute.
This attribute specifies the name of the SBB parameter set containing the usage parameter that
caused this usage notification to the emitted. If the usage parameter resides in the default SBB us-
age parameter set of an SBB, this method returns null.
• The usageParameterName attribute.
This attribute specified the name of the usage parameter that was updated.
• The counter attribute.
This boolean attributes indicates whether the usage parameter that caused the usage notification to
the emitted is a counter-type usage parameter (if counter is true) or a sample -type usage pa-
rameter (if counter is false).
• The value attribute.
If counter is true, this attribute provides the accummulated value of the counter-type usage
parameter that caused this usage notification to be emitted. If counter is false, this attribute
provides the the sample value of the sample -type usage parameter that caused this usage notifica-
tion to be emitted.
The semantics of the equals and hashCode methods are as follows:
• The equals method.
Two UsageNotification objects are equivalent, i.e. usageOne.equals(usageTwo), if
their service, sbb, usageParameterSetName, usageParameterName, and counter
attributes are equal, as determined by their corresponding equals methods.
• The hashCode method.
This method returns the exclusive or’ed hash codes of the service, sbb, usageParameter-
SetName, and usageParameterName attributes.
import javax.management.Notification;
import javax.management.NotificationFilter;
import javax.slee.SbbID;
import javax.slee.ServiceID;
import javax.management.Notification;
import javax.management.NotificationFilter;
import javax.slee.SbbID;
import javax.slee.ServiceID;
import javax.management.Notification;
import javax.management.NotificationFilter;
import javax.slee.SbbID;
import javax.slee.ServiceID;
• Obtain the JMX Object Name of the default Profile for a Profile Table.
• Get the names of all Profile Tables in the SLEE.
• Get the names of all Profiles in a specific Profile Table.
• Obtain the JMX Object Name of a specific Profile within a Profile Table using the unique name of
the Profile.
• Obtain the JMX Object Names of a set of Profiles within a Profile Table using an indexed attrib-
ute.
The ProfileProvisioningMBean interface is as follows:
package javax.slee.management;
import javax.slee.InvalidArgumentException;
import javax.slee.profile.AttributeNotIndexedException;
import javax.slee.profile.AttributeTypeMismatchException;
import javax.slee.profile.ProfileAlreadyExistsException;
import javax.slee.profile.ProfileSpecificationID;
import javax.slee.profile.ProfileTableAlreadyExistsException;
import javax.slee.profile.UnrecognizedProfileNameException;
import javax.slee.profile.UnrecognizedProfileSpecificationException;
import javax.slee.profile.UnrecognizedProfileTableNameException;
import javax.management.ObjectName;
UnrecognizedProfileNameException,
ManagementException;
public Collection getProfileTables()
throws ManagementException;
public Collection getProfiles(String profileTableName)
throws NullPointerException,
UnrecognizedProfileTableNameException,
ManagementException;
public Collection getProfilesByIndexedAttribute(String profileTableName,
String attributeName, Object attributeValue)
throws NullPointerException,
UnrecognizedProfileTableNameException,
UnrecognizedAttributeException,
AttributeNotIndexedException,
AttributeTypeMismatchException,
ManagementException;
}
• The createProfileTable method.
This method creates a Profile Table with the name specified by the newProfileTableName
argument from the Profile Specification specified by the profileSpecID argument.
• The removeProfileTable method.
This method deletes the Profile Table identified by the profileTableName argument.
• The renameProfileTable method.
This method renames the Profile Table identified by the profileTableName argument to the
name specified by the newProfileTableName argu ment.
• The getProfileSpecification method.
This method returns a ProfileSpecificationID object that identifies the Profile Specifica-
tion of the Profile Table specified by the profileTableName argument.
• The getDefaultProfile method.
This method gets the JMX Object Name of a Profile MBean object for the default Profile of the
Profile Table specified by the profileTableName argument. There will always be a default
Profile for a Profile Table.
• The createProfile method.
This method gets the JMX Object Name of a modifiable Profile MBean object. When the Profile
MBean object commits successfully, the SLEE creates and adds a Profile with the name specified
by the newProfileName argument to the Profile Table specified by the profileTableName
argument. Before the Profile MBean object commits, the Profile name specifed by the newPro-
fileName argument does not exist and cannot be accessed by SBBs or through the Pro-
fileProvisioningMBean interface.
• The removeProfile method.
This method removes the Profile specified by the profileName argument from the Profile Ta-
ble specified by the profileTableName argument.
• The getProfile method.
This method gets the JMX Object Name of a Profile MBean object for the Profile identified by the
profileName argument in the Profile Table specified by the profileTableName argument.
This method does not provide access to a Profile that is in the process of being created before the
Profile MBean object returned by the createProfile method corresponding to the Profile
commits.
• The getProfileTables method.
This method returns a Collection object that contains all the names of the Profile Tables that
are installed in the SLEE.
This exception may also be thrown if there is an attempt to create a new Profile Table
with a new Profile Table name that is also referenced by an installed Service and the Pro-
file Specification of the create request is different from the Address Profile Specification
specified by the root SBB of the Service.
Similarly, this exception may also be thrown if there is an attempt to rename an existing
Profile Table to a new Profile Table name that is also referenced by an installed Service
and the Profile Specification of the rename request is different from the Address Profile
Specification specified by the root SBB of the Service.
o javax.slee.profile.UnrecognizedProfileSpecificationExceptio
n.
If the profileSpecID argument does not identify a Profile Specification recognized
by the SLEE, the method throws an UnrecognizedProfileSpecification-
Exception.
o javax.slee.profile.UnrecognizedProfileTableNameException.
If the profileTableName argument does not identify a Profile Table recognized by
the SLEE, the method throws an UnrecognizedProfileTableNameException.
o javax.slee.profile.UnrecognizedProfileNameException.
If the profileTableName argument identifies a valid Profile Table and the pro-
fileName argument does not identify a Profile in the identified Profile Table, then the
method throws an UnrecognizedProfileNameException.
o javax.slee.profile.UnrecognizedAttributeException.
If the attributeName argument does not identify an attribute of the Profile Table
specified by the profileTableName argument, then the method throws an Unre-
cognizedAttributeException.
o javax.slee.profile.ProfileTableAlreadyExistsException.
If the newProfileTableName argument identifies a Profile Table that is already in -
stalled in the SLEE, the method throws a ProfileTableAlreadyExistsExcep-
tion.
o javax.slee.profile.ProfileAlreadyExistsException.
If the newProfileName argument identifies a Profile that already exists in the Profile
Table identified by the profileTableName argument, then the method throws a
ProfileAlreadyExistsException.
o javax.slee.profile.AttributeNotIndexedException.
If the attributeName argument identifies an attribute that is not indexed, then the
method throws an AttributeNotIndexedException.
o javax.slee.management.ManagementException.
If the requested operation cannot be performed due to a system-level failure, then the
method throws a ManagementException. The requested operation may be valid but
the SLEE cannot perform the requested operation due to a system-level failure, or the
SLEE cannot determine whether the requested operation is valid due to a system-level
failure.
o java.lang.NullPointerException.
If any of a method’s arguments are null, the method throws a NullPointer-
Exception.
The SLEE specification does not specify whether the Collection object returned by one of these meth-
ods are mutable. If there are mutations, these mutations have no effect on the SLEE, i.e. the SLEE does not
add or remove Profile Tables or Profiles when these Collection objects are modified.
The SLEE specification does not specify whether the Collection object returned by one of these meth-
ods and the Iterator objects obtained from the Collection object remain consistent across concurrent
modifications to the Profile database that hold the names. For example, if the Profile database is modified
after a Collection object has been obtained , then the Collection object may contain a different set
of names than in the Profile database.
Furthermore, if the SLEE implementation does not support concurrent modification, then an Iterator
object may throw a ConcurrentModificationException. An example of when this exception
may be thrown is as fo llows:
1. Invoke getProfileTables to get a Collection object containing all Profile Table names.
2. Invoke iterator on the Collection object to obtain an Iterator object.
3. Invoke removeProfileTable to remove a Profile Table.
4. Invoke next to get the next name on the Iterator object. If concurrent modification is not
supported, nextName may throw a ConcurrentModificationException.
The cycle also restarts when the time period from the first notification expires without a notifica-
tion being sent.
The Object Name of an AlarmMBean object may be obtained invoking the getAlarmMBean method on
a SleeManagementMBean object (see Section 14.6).
import javax.management.Notification;
import javax.slee.facilities.Level;
that generates the alarm notification provides the values for the notification’s type, source and se-
quenceNumber attributes. (The AlarmNotification class inherits the type, message and
timeStamp attributes from the base Notification interface.)
The semantics of the equals and hashCode methods are as follows:
• The equals method.
Two AlarmNotification objects are equivalent, i.e. alarmOne.equals(alarmTwo), if
their alarmType, alarmSource, level , and message attributes are equal, as determined
by their corresponding equals methods.
• The hashCode method.
This method returns the has h code of the message attribute.
import javax.management.Notification;
import javax.management.NotificationFilter;
import javax.slee.facilities.Level;
import javax.management.Notification;
import javax.management.NotificationFilter;
the filter notes the current time and remembers the notification. If a further five equivalent alarm notifica-
tions are observed by the filter within the 500ms timeout period, the last notification is passed on to the
notification listener and the original notification is forgotten. If the 500ms time period expires without the
five equivalent notifications being observed, the original notification is forgotten and the cycle restarts.
This filter will suppress alarm notifications until at least six equivalent alarm notifications are observed
The public interface of the AlarmThresholdFilter class is as follows:
package javax.slee.management;
import javax.management.Notification;
import javax.management.NotificationFilter;
import javax.slee.Address;
import javax.slee.UnrecognizedComponentException;
import javax.slee.facilities.Level;
import javax.management.Notification;
import javax.slee.facilities.Level;
import javax.management.Notification;
import javax.management.NotificationFilter;
import javax.slee.facilities.Level;
14.14 Security
Administrators acting in many different roles may manage the SLEE. For example, an Administrator may
be a Service Administrator, a Profile Table Administrator, or a SLEE Administrator. Access to the man-
agement operations of the SLEE must be carefully controlled while taking into consideration the different
roles of an Administrator. Diffe rent permissions can be granted to each role and the Administrator must be
authenticated within a role before they can be authorized to invoke the methods associated with that role.
The SLEE specification does not define any security roles, security access protocol, or security mecha-
nisms. It is the responsibility of the SLEE vendor to define a secure environment, either by defining a ven-
dor specific mechanism, or by utilizing a standard mechanism such as Java Authentication and Authoriza-
tion Service (JAAS). It is the responsibility of management client MLets to pass to the SLEE the relevant
authentication principals. A management client should expect to receive SecurityExceptions from
the SLEE if the Administrator does not have the appropriate permissions to execute a particular manage-
ment operation.
13
The resource adaptor entity that is respon sible for this Activity object is an instance of a resource adaptor that belongs to this
resource adaptor type.
JAIN SLEE 1.0 Specification, Final Release Page 239
Chapter 15
Resource Adaptors
• Class files of the resource adaptors specified by the resource-adaptor elements of the re-
source-adaptor-jar element.
o The resource adaptor jar file must contain, either by inclusion or by reference, the class
files of the resource adaptors.
o The resource adaptor jar file must also contain, either by inclusion or by reference, the
class files for all the classes and interfaces that the Java types of the resource adaptors
depend on, except J2SE classes, SLEE classes, classes contained in the resource adaptor
type jar files of the resource adaptor types of the resource adaptors, classes contained in
the event jar files of the event types referenced by the resource a daptor types of the re-
source adaptors. This includes their superclasses and superinterfaces, dependent classes,
and the classes and interfaces used as method parameters, results, and exceptions.
<resource-adaptor-entity-binding>
<description>
This SBB expects a JCC 1.1 resource that has the
following properties to be bound to the JNDI name
specified below.
1. …
2. …
</description>
<resource-adaptor-object-name>
slee/resources/jcc/1.1/jcc_1
</resource-adaptor-object-name>
<resource-adaptor-entity-link>
FooBarJCC
</resource-adaptor-entity-link>
</resource-adaptor-entity-binding>
…
<resource-adaptor-entity-binding>
<description>
This SBB expects a JCC 1.1 resource that has the
following properties to be bound to the JNDI name
specified below.
1. …
2. …
3. …
4. …
</description>
<resource-adaptor-object-name>
slee/resources/jcc/1.1/jcc_2
</resource-adaptor-object-name>
<resource-adaptor-entity-link>
CuckooJCC
</resource-adaptor-entity-link>
</resource-adaptor-entity-binding>
</resource-adaptor-type-binding>
…
</sbb>
The SBB code that accesses the resource adaptor objects, the Activity Context Interface Factory object of
these resource adaptor type of these resource adaptor entities, and obtains an SBB Activity Context Inter-
face object from a generic Activity Context Interface object is as follows.
…
// obtain the SBB component environment naming context.
Context initCtx = new InitialContext();
Context myEnv = (Context)initCtx.lookup("java:comp/env");
…
// get first JCC resource adaptor object
JccProvider jcc1 = (JccProvider) myEnv.lookup("slee/resources/jcc/1.0b/jcc_1");
…
// get second JCC resource adaptor object
JccProvider jcc2 = (JccProvider) myEnv.lookup("slee/resources/jcc/1.0b/jcc_2");
…
// create a call on jcc1
JccCall call = jcc1.createCall();
…
// get ActivityContectInterfaceFactory object for JCC
JccActivityContextInterfaceFactory jccACIFactory =
(JccActivityContextInterfaceFactory)
myEnv.lookup("slee/resources/jcc/1.1/activitycontextinterfacefactory");
…
// get generic Activity Context Interface object for call
ActivityContextInterface ac = jccACIFactory.getActivityContext(call);
…
the initial event types of the root SBB of the Service is delivered to the SLEE. Similarly, the SLEE, its re-
sources and resource adaptor entities must collaborate to update event filters and triggers when SBB enti-
ties attach and detach from A ctivity Contexts, mask and unmask events, … etc.
A.2 Definitions
A.2.1 Events
Let EventType be the set of event types and let Event be the set of events. An event e is an ordered triple,
( e1 , e2 , e3 , e4 ) ∈ Z × EventType× ActivityContext × Address ,
where e1 is the identity of the event, e2 is the type of event, e3 is the Activity Context14 on which the event
was fired, and e4 is the SLEE-determined address for the event.
14
ActivityContext is defined in Section A.2.7.
15
SBBComponent is defined in Section A.2.3.
JAIN SLEE 1.0 Specification, Final Release Page 249
Appendix A
Event Router Formal Model
where c1 is the set of child relations of the SBB component, c2 is the set of initial event types of the SBB
component, c3 is the set of received event types of the SBB component, c4 is the set of mask-on-attach
event types of the SBB component, and c5 is the set of mask-on-attach event names of the SBB comp o-
nent. For a given SBB component c,
c 2 , c4 ⊆ c3 .
where x1 is the identity of the SBB entity, x 2 is the type of the SBB entity, and x3 is a set containing the
convergence name 17 of the SBB entity.
We define
ExistingSBB(t ) : R α P( SBBEntity)
as a relation which defines the set of SBB entities that are said to ‘exist’ at time t. For each SBB entity
x ∈ ExistingSBB (t ) , there are relations
priorityx (t) : R α Z
childrenx (t ) : R α P( ExistingSBB( t))
child _ o bjectsx ( t) : R α P(ChildRelationObjects( t))
parentx ( t) : R α P( ExistingSBB(t))
activitiesx (t ) : R α P( ExistingContext(t ))
attachment_ countx ( t) : R α Z
event _ typex ( name, t ) : EventName × R α EventType
describing the priority, children, child relation objects, parent, Activity Contexts18, and event type mapping
for that SBB entity at time t.
{ }
The image of parentx (t ) is the set x ∈ P( ExistingSBB (t )) : x ≤ 1 , i.e. the elements of
P( ExistingSBB(t )) that are sets containing at most one element, and an SBB entity x that is a root SBB
entity for a Service will have parentx ( t ) = {} . (For a time t’ such that x ∉ ExistingSBB(t ' ) , the above rela-
tions are undefined.) We let
16
SBB entities are discussed in Section A.2.5.
17
Convergence names are discussed in Section A.3.2.
18
ExistingContext(t) is defined in Section A.2.7.
JAIN SLEE 1.0 Specification, Final Release Page 250
Appendix A
Event Router Formal Model
SleeSBB= Υ ExistingSBB(t)
t ∈R
be the set of all SBB entities that exist during the lifetime of the SLEE.
A.2.6 Services
Let Service be the set of all Services. A Service v is a 4-tuple,
( v1 , v2 , v3 , v 4 ) ∈ Z × Z × SBBComponent × ChildRelationObject ,
where v1 is the identity of the Service, v 2 is the default priority of the Service, v3 is the root SBB comp o-
nent for the Service, and v4 is the child relation object for the Service. SleeService(t) is a relation which
specifies the set of Services that are known to the SLEE at time t:
SleeService(t ) : R α P (Service)
Let next _ sbbeac ( e, t ) be the set consisting of the SBB entity attached to the Activity Context ac at time t
that will be next to receive the event e.
next _ sbbeac ( e, t ) contains at most one SBB entity,
Definition of next _ sbbeac ( e, t ) : If there are no deliverable SBB entities for the event on the Activity Con-
text, then next _ sbbeac ( e, t ) is the empty set:
deliverableac (e, t ) = {} ⇒ next _ sbbeac (e, t ) = {} .
childrenz (t ) − stack ≠ {} ,
add
y =z ∈ children
min arg
z (t ) − stack
priorityz (t)
to end of stack .
that associates each event in the queue with a time such that
∀ e i , e j ∈ Q , i < j ⇔ event _ time( ei ) < event _ time (e j ).
Description: If the SBB entity is already attached to the Activity Context, no action is taken. Other-
wise, the SBB entity is attached to the Activity Context, the Activity Context is added to
the SBB entity’s set of Activity Contexts, the event type mask for the SBB entity with
respect to the Activity Context is set to the corresponding SBB component’s mask-on-
attach event types and the event name mask for the SBB entity with respect to the Activ-
ity Context is set to the corresponding SBB component’s mask-on-attach event names.
If the SBB entity is in the Activity Context’s delivered set, it is removed from this set.
Description: If the SBB entity is not attached to the Activity Context, no action is taken. Otherwise,
the SBB entity is removed from the Activity Context, the Activity Context is removed
from the SBB entity’s set of Activity Contexts, the event type mask for the SBB entity
with respect to the Activity Context is cleared and the event name mask for the SBB en-
tity with respect to the Activity Context is cleared.
A.5.3 Mask the events ( names ⊆ EventNames ) for an SBB entity (sbbe) on n
Activity Context (ac)
Pre: none
type _ mask ac ( sbbe , t 2 ) = event _ typesbbe ( names)
Post:
name _ mask ac ( sbbe , t 2 ) = names
Description: The event name mask for the SBB entity with respect to the Activity Context is set to
given event names, and the event type mask for the SBB entity with respect to the Ac-
tivity Context is set to the corresponding event types.
A.5.4 Remove an SBB entity (sbbe) from a parent SBB entity (p)
Pre: parentsbbe (t1) = {p}
sbbe ∉ ExistingSBB (t 2 )
ac ∈ activitiessbbe (t 1 ) ⇒ sbbe ∉ attachedac (t 2 )
s ∈ descendentssbbe (t 1 )
Post:
⇒ s ∉ ExistingSBB (t 2 )
∀ s ∈ descendentssbbe (t 1 ),
ac ∈ activitiess (t 1 ) ⇒ s ∉ attachedac (t 2 )
Description: The SBB entity is removed from the set of existing SBB entities, and the SBB entity is
detached from each Activity Context in the SBB entity’s set of Activity Contexts. Each
descendent SBB entity is removed from the set of existing SBB entities, and is detached
from each Activity Context in its set of Activity Contexts.
A.5.5 Create a root SBB entity (sbbe) based on a child relation object (cro)
belonging to a Service
Pre: name is the convergence name for the SBB entity computed by the SLEE
sbbe ∈ ExistingSBB (t 2 )
sbbe ∈ cro 2
sbbe2 = (cro1 ) 2
sbbe3 = {name}
Post:
parentsbbe (t 2 ) = {}
prioritysbbe (t 2 ) = (cro1 ) 1
child _ objectssbbe (t 2 ) = {}
activitiessbbe ( t 2 ) = { }
Description: The SBB entity is added to the set of existing SBB entities and the set of child SBB enti-
ties for the child relation object. The SBB component for the SBB entity is the SBB
component of the child relation for the child relation object. The SBB entity’s parent re-
lation maps to the empty set. The priority of the SBB entity is the priority of the child
relation for the child relation object.
A.5.6 Create a non-root SBB entity (sbbe) based on a child relation object
(cro) belonging to an SBB entity (p)
Pre: none
sbbe ∈ ExistingSBB(t 2 )
sbbe ∈ cro2
sbbe2 = ( cro1 ) 2
sbbe3 = { }
Post:
parentsbbe (t 2 ) = {p}
prioritysbbe (t 2 ) = ( cro1 ) 1
child _ objectssbbe (t 2 ) = {}
activitiessbbe (t 2 ) = {}
Description: The SBB entity is added to the set of existing SBB entities and the set of child SBB enti-
ties for the child relation object. The SBB component for the SBB entity is the SBB
component of the child relation for the child relation object. The SBB entity’s parent re-
lation maps to the SBB entity that the child relation object belongs to. The priority of the
SBB entity is the priority of the child relation for the child relation object.
Description: The event is delivered to the SBB entity with the highest priority (as defined in Section
A.3.5). After delivery, the SBB entity (if it remained attached to the Activity Context,
i.e. did not detach and re-attach) is in the delivered set for the Activity Context with re-
spect to the event.
Description: All SBB entities are detached from the Activity Context. After the termination, no exist-
ing SBB entities have the Activity Context in their activities set.
B.1 Definitions
// Conventions:
// XXX is a set.
// XXX[y] is a member of set XXX.
// XXX[y].ZZZ is an attribute of XXX[y].
// SVC[v] is a Service.
// A Service has a default event delivery priority and a root SBB.
// SVC[v].PRIORITY is the default event delivery priority of the Service.
// SVC[v].SBB is the root SBB of the Service.
// SVC[v].CHILDOBJ is the set of the child relation object of the Service.
// This child relation object contains the root SBB entities that have
// been created for this Service.
// SBB[0] is reserved to represent the SLEE as the logical parent of all root SBBs.
// This means:
// SBB[0].CHILD[v].PRIORITY is always the same as SVC[v].PRIORITY
// SBB[0].CHILD[v].SBB is always the same as SVC[v].SBB
// SBBE[0] is the SLEE as the logical parent SBB entity of all root SBB entities.
// A[a] is the Activity object of Activity Context AC[a] and vice versa,
// i.e. there is a one-to-one mapping between Activity Contexts and
// Activity objects.
// Each SBB entity attached to an Activity Context has its own event name mask
// and event type mask.
// ENM(SBBE[b],AC[a]) is the set of received event names of SBBE[b].SBB that
// SBBE[b] would like to mask from AC[a].
// ETM(SBBE[b],AC[a]) is the set of received event types of SBBE[b].SBB that
// SBBE[b] would like to mask from AC[a].
SUBROUTINE sbbe.remove()
// sbbe is a member of SBBE.
for each childRelationObj in sbbe.PARENT.CHILDOBJ do
if sbbe is a member of childRelationObj.SBBE then
sbbe.removeInternal(childRelationObj)
break
endif
endfor
END SUBROUTINE
SUBROUTINE processInitialEvents(svc, q)
// svc is a member of SVC.
// q is a member of Q.
SUBROUTINE routeEvent(q)
// q is a member of Q
// Iterate through each Service that has the event type as an initial event type.
for each svc in SVC do
if q.ET is a member of (svc.SBB).IET then
processInitialEvents(svc,q);
endif
endfor
// Deliver event to SBB entities attached to the Activity Context
(q.AC).DELIVERED = {}
for ever do
// Find the highest priority SBB entity attached to the
// Activity Context that the event has not been delivered to.
highestPrioritySBBE = null;
for each sbbe in (q.AC).SBBE do
if q.ET is a member of sbbe.SBB.RET and
sbbe is not a member of (q.AC).DELIVERED then
if highestPrioritySBBE == null then
highestPrioritySBBE = sbbe
else
highestPrioritySBBE =
higherPrioritySBBE(sbbe,
highestPrioritySBBE)
endif
endif
endif
// If no such SBB entity is found, then event routing for this event
// is complete.
if highestPrioritySBBE is null then
break;
add highestPrioritySBBE to (q.AC).DELIVERED
// Check event mask and invoke appropriate event handler method
if q.ET is not a member ETM(highestPrioritySBBE,q.AC) then
invoke event handler method for q.ET on an SBB object
that represents highestPrioritySBBE with arguments
(q.EO, q.AC)
// If event is Activity End Event, then detach the SBB entity
// from the Activity Context.
if q.ET is Activity Event Event then
(q.AC).detach(sbbe)
endif
// If root SBB entity of SBB entity’s SBB entity tree
// has attachment count of 0, then delete the SBB entity tree
if (sbbe.ROOT).ACOUNT is 0 then
remove sbbe.ROOT
endif
endif
endfor
// If event is Activity End Event, then detach all remaining SBB entities from the
// Activity Context.
if q.ET is Activity Event Event then
for each sbbe in (q.AC).SBBE do
(q.AC).detach(sbbe)
SUBROUTINE eventRouterThread()
while (…) do
q = item removed from the head of the event queue Q
routeEvent(q);
endwhile
END SUBROUTINE
C.3 Events
The following table lists the events emitted by a JCC resource and its Activity objects.
Event Activity Object
(JccEvents with different JCC event IDs are different
event types) JccConnection JccCall Remarks
CALL_ACTIVE X
CALL_CREATED X
CALL_EVENT_TRANSMISSION_ENDED X 1.
CALL_INVALID X
CALL_SUPERVISE_END X
CALL_SUPERVISE_START X
CONNECTION_ALERTING X
CONNECTION_CONNECTED X
CONNECTION_CREATED X
CONNECTION_DISCONNECTED X 2.
CONNECTION_FAILED X
CONNECTION_ADDRESS_ANALYZE X
CONNECTION_ADDRESS_COLLECT X
CONNECTION_AUTHORIZE_CALL_ATTEMPT X
CONNECTION_CALL_DELIVERY X
CONNECTION_MID_CALL X
1. After this event there are no more events on the JccCall object. The JCC resource adaptor
entity responsible for JccCall object should indicate to the SLEE that this Activity object has
ended. This event should only be delivered to the SLEE after the JCC resource adaptor entity
has indicated to the SLEE that all the JccConnection Activity objects of the JccCall ob-
ject have also ended.
2. After this event there are no more events on the JccConnection object. The JCC resource
adaptor entity responsible for the JccConnection object should indicate to the SLEE that
this Activity object has ended.
C.6 Restrictions
The following restrictions apply:
• Only the SLEE can add itself as a listener. The JCC resource or its resource adaptor should not al-
low any other objects to add themselves as listeners. An attempt to do so should be rejected by
throwing a SecurityException.
D.3 Events
The following table lists the events emitted by a JAIN SIP resource and its Activity objects. The event
definitions can be found in the RequestEvent and ResponseEvent interfaces in the javax.sip
package.
Events Activity Object
(SipEvents consist of messages which are either Server Client
responses or requests) Transaction Transaction Remarks
RequestEvent.Request.INVITE X 1.
RequestEvent.Request.ACK X
RequestEvent.Request.CANCEL X 2.
RequestEvent.Request.OPTIONS X
RequestEvent.Request.REGISTER X
RequestEvent.Request.BYE X 2.
RequestEvent.Request.PRACK X
RequestEvent.Request.NOTIFY X
RequestEvent.Request.SUBSCRIBE X
RequestEvent.Request.INFO X
RequestEvent.Request.MESSAGE X
RequestEvent.Request.UPDATE X
ResponseEvent.Response.INFORMATIONAL (1xx) X
ResponseEvent.Response.SUCCESS (2xx) X
ResponseEvent.Response.REDIRECTION (3xx) X
ResponseEvent.Response.CLIENT_ERROR (4xx) X
ResponseEvent.Response.SERVER_ERROR (5xx) X
ResponseEvent.Response.GLOBAL_FAILURE (6xx) X
TimeoutEvent.TRANSACTION_TIMEOUT X X
TimeoutEvent.TRANSACTION_EXPIRED X X 3.
1. This event may or may not represent a new dialog in the underlying JAIN SIP resource.
2. This event signals that an application wants to end the dialog in the underlying resource adaptor.
3. This event signals that the underlying transaction failed due to receiving no response to a re-
quest before the maximum number of retransmissions of that request. The JAIN SIP resource
adapter entity that represents the JAIN SIP resource should signal to the SLEE that the Activity
object for this call has ended.
public ActivityContextInterface
getActivityContextInterface(ServerTransaction serverTransaction)
throws NullPointerException,
UnrecognizedActivityException,
FactoryException;
import javax.sip.SipProvider;
import javax.sip.address.AddressFactory;
import javax.sip.header.HeaderFactory;
import javax.sip.message.MessageFactory;
This object can be made available using the RA type's resource-adaptor-interface-name ele -
ment, and bound into the SBB's component environment using the resource-adaptor-entity-
binding element in the SBB deployment descriptor.
D.6 Restrictions
The following restrictions apply:
• Only the SLEE can add itself as a listener. The JAIN SIP resource or its resource adaptor should
not allow any other objects to add themselves as listeners. An attempt to do so may be rejected by
throwing a SecurityException.
E.3 Events
The following table lists the events emitted by a JAIN TCAP resource and its Activity objects.
java.lang.Integer
Events containing dialogueId Remarks
DIALOGUE EVENTS
BeginIndEvent X 1.
ContinueIndEvent X
EndIndEvent X 2.
NoticeIndEvent X
ProviderAbortIndEvent X 3.
UnidirectionalIndEvent X 4.
UserAbortIndEvent X 5.
COMPONENT EVENTS
InvokeIndEvent X
ResultIndEvent X
ErrorIndEvent X
RejectIndEvent X
LocalCancelIndEvent X
1. This event represents a new dialogue in the underlying JAIN TCAP resource (or Activity object
in the JAIN TCAP resource adaptor entity) initiated by the remote user, which is represented as
a new Activity Context within the SLEE.
2. This event signals that there are no more events on the dialogue identified by the dialogueId
attribute of the event object. An EndReqEvent event alerts the JAIN TCAP resource that the
dialogue (or Activity object) has ended. The resource adaptor entity that represents the JAIN
TCAP resource should signal to the SLEE that the Activity object has ended on receipt of an
EndIndEvent event.
3. This event signals that the underlying JAIN TCAP resource has abruptly ended the specified
dialogue. The dialogue has been terminated by the JainTcapProvider in reaction to a
transaction abort by the transaction sub-layer. Any pending components on the Activity object
are not transmitted. The resource adaptor entity that represents the JAIN TCAP resource should
signal to the SLEE that the Activity object has ended on receipt of a ProviderAbortIndE-
vent event.
E.6 Restrictions
The following restrictions apply:
• Only the SLEE can add itself as a listener. The JAIN TCAP resource or its resource adaptor
should not allow any other objects to add themselves as listeners. An attempt to do so may be re -
jected by thro wing a SecurityException.
The connection factory instance gained by an EJB component will implement the javax.slee.con-
nection.SleeConnectionFactory interface. This interface allows EJB components to obtain
javax.slee.connection.SleeConnection instances representing connections to an external
SLEE as needed via the SleeConnectionFactory.getConnection method.
A SleeConnection instance allows an EJB component to create external activity handles, retrieve
SLEE event type identifiers, and fire events to the SLEE. Each SleeConnection remains open until
explicitly closed via the SleeConnection.close method.
To ensure that the SLEE can correctly identify and deserialize events sent via the SleeConnection in-
terface, each event fired has an associated event type obtained via the SleeConnec-
tion.getEventTypeID method that identifies the event type by name, vendor, and version. The class
of the event type specified should be compatible with the actual type of the event object fired.
Events fired via the SleeConnection interface are delivered to Null Activities. The creation of these
activities is managed by the SLEE in response to external event firing, and they are subject to the normal
null activity garbage-collection rules.
EJB components create one or more external activity handles via the SleeConnec-
tion.createActivityHandle method. The ExternalActivityHandle interface represents
these handles. External activity handles can be used to fire events via the SleeConnection that created
them; the visibility of the created handles to other SleeConnection instances is implementation-
defined.
The mapping between external activity handles and null activities is implementation-specific, but must
have the following characteristics:
• Firing an event with an external activity handle that is not mapped to an existing null activity will
cause the creation of a new null activity associated with the external activity handle.
• Subsequent events with the same handle are delivered to the same activity, while the activity exists.
• When a null activity ends, any association with an external activity handle is cleared. If a subsequent
event is fired using this handle, it is treated as though there is no mapping (i.e. a new activity will be
created).
The SleeConnection.createActivityHandle, SleeConnection.getEventTypeID, and
SleeConnection.close methods do not have transactional behavior.
The SleeConnection.fireEvent method has required transactional behavior. If a transaction is in
progress when this method is called, processing of the fired event is deferred until this transaction is known
to have committed. Failure to fire the event is not required to cause rollback of the enclosing transaction.
Within a transaction, delivery order of fired events is preserved.
A successful commit of a transaction that fires events does not guarantee that the fired events will be proc-
essed by the SLEE. EJB and SBB developers should accommodate the possibility of event loss (for exa m-
ple, via timers).
A SLEE implementation is not required to provide an implementation of these interfaces.
try {
// Locate the event types for two different events
EventTypeID eventTypeOne = connection.getEventTypeID("MyEventOne","MyVendor","0.1");
EventTypeID eventTypeTwo = connection.getEventTypeID("MyEventTwo","MyVendor","0.1");
• It promotes stronger decoupling or isolation of the event producer from the event consumer. This
facilitates modularity and fault isolation, i.e. an error in the event producer is less likely to propa-
gate to the event consumer and vice versa.
While the JavaBeans listener model has certain advantages, the SLEE expert group felt that the pub-
lish/subscribe model allows the SLEE to provide more value-add to event oriented applications.
When application code calls application code it is common for the caller to know about the set of excep-
tions that the callee can throw. In this case the caller is responsible for performing the appropriate action
based on the exception that was thrown.
This is the case for SbbLocalObject invocations, i.e. when one SBB invokes another SBB through a
SbbLocalObject contract.
When the SLEE invokes an SBB, there is no caller that knows how to perform the appropriate action if the
exception was thrown. For example the SLEE does not know how to play an announcement on a telephone
call (assuming a telephone call is the activity). Such error handling logic is application specific. Therefore
when the SLEE calls an SBB and something goes wrong, the SLEE delegates the problem back to the SBB.
This could be viewed as a circular design, but it allows the SBB developer to put their application logic in
one place (the sbbExceptionThrown method) and if the SBB developer does not like such an approach they
are free to place all event handling code in a try { ... } catch (Throwable t) { .. } statement.
SLEE always delivers events to SBBs in the context of a transaction. It is possible that the transaction rolls
back without the SBB knowing that the transaction will rollback when it is handling an event. For example
the SBB event handler method returns, and at is point of return the getRolledBackOnly() returns false. As
the SLEE attempts to commit the transaction the transaction manager refuses to commit the transaction,
because a resource involved in the transaction indicates some sort of error. In this case the environment had
a problem that the application is unaware of. Typically in call control applications transactions are used to
demarcate points in the applications state machine within a well understood failure model, and the applica-
tion is written such that if a transaction does not commit, that the application stops taking an active roll in
the call. In order to support the application stop taking an active roll in the call, the SBB developer can de-
tach from an activity or perform some other transacted operation in its sbbRolledBack callback.
The SBB developer should write their rolled back handler methods to cope with a transaction that contains
an event handler only, a remove only, or an event handler and remove rolling back. This can be done by
using the following approach:
if ( ctx.getEvent() != null ){
// do any event handling cleanup necessary
if( ctx.isRemoveRolledBack() {
// do any cleanup necessary to handle a remove that didnt commit
}
It should be noted that whether or not any cleanup needs to be performed if a transaction committed or not
is application specific.
Glossary
Activity Context Interface object An Activity Context Interface object is a Java object that implements the
SLEE specification defined ActivityContextInterface interface
and may optionally implement an extended SBB Developer defined SBB
Activity Context Interface interface. It provides an Activity Context with
a Java object that SBB objects can invoke. An Activity Context Interface
object can be either a generic Activity Context Interface object or an SBB
Activity Context Interface object.
Activity object An Activity object is a Java object that provides an Activity with a visible
Java API that can be invoked. Activity objects are defined, created and
owned by resources, resource adaptor entities or SLEE Facilities. The
getActivity method defined in the generic Activity Context Interface
interface returns an Activity object when invoked. Furthermore, an Activ -
ity object may be passed to an Activity Context Interface Factory object
to obtain a generic Activity Context Interface object that represents the
Activity Context of the Activity object.
ActivityContextInter- An ActivityContextInterface interface is a Java interface that is
face interface defined by the SLEE specification. It defines the operations that all SBB
objects can perform on an Activity Context. It does not declare any share-
able Activity Context attributes.
address An address is a unique identifier for an entity in a network. A common
address today is a telephone number or an IP address.
Address Profile An Address Profile is a Profile that has at least an addresses attribute
that holds an array of Address objects.
Address Profile Table An Address Profile Table contains Address Profiles and is created from
an Address Profile Specification. The Address Profile Table of a Service
contains provisioned addresses that may cause new root SBB entities of
the Service to be instantiated.
Address Profile Specification An Address Profile Specification specifies the attributes of the Address
Profile Tables created from the Address Profile Specification. One of
these attributes must be an addresses attribute. The Java type of this
attribute must be an Address object array.
Address object An Address object represents an address and is an instance of the Ad-
dress class.
Administrator An Administrator manages the SLEE and the services running in the
SLEE through the SLEE’s management interfaces. An Administrator may
be a management client, such as a network management application, net-
work management console, or a person using a management client to
manage the SLEE.
attachment count The attachment count of a parent SBB entity is the sum of the attachment
counts of all its child SBB entities and the number of Activity Contexts
that the parent SBB entity is directly attached to.
child relation A child relation relates a child SBB to a parent SBB. It also specifies the
(in the context of SBBs) default event delivery priority for the child SBB entities created on this
child relation.
child relation A child relation relates a child SBB entity to a parent SBB entity. It also
(in the context of SBB entities) specifies the event delivery priority of child SBB entity.
custom event type A custom event type is an event type introduced by an SBB Developer.
default event delivery priority The default event delivery priority of a child relation specifies the initial
event delivery priority of an SBB entity created on the child relation.
default Profile The default Profile of a Profile Table provides the initial values for the
attributes of new Profiles of the same Profile Table.
deployable unit A deployable unit is a jar file that can be installed in the SLEE. A deploy-
able unit may contain Services, SBB jar files, event jar files, Profile
Specification jar files, resource adaptor type jar files, and resource adap-
tor jar files. Each of these jar files contain the Java class files and the de-
ployment descriptors of one or more of these components.
event An event represents an occurrence of significance that has occurred. An
event is represented in the SLEE by an event type and an event object.
event class The event class of an event object is the publicly declared Java class or
interface of the event object. The event class may not be the concrete im-
plementation class of the event object.
event delivery priority The event delivery priority of an SBB entity determines when the SBB
entity will receive an event relative to the other SBB entities that can also
receive the event.
event name An event name is an SBB scoped local name that refers to an event type.
This name must conform to the naming requirements for Java method
names. The event name of the event type is specified by the event-
name element of the event element in the SBB’s deployment descrip-
tor.
event object An event object is a Java object that represents the event and carries in-
formation to be conveyed. It cannot be a primitive Java type.
event type The event type of an event completely determines how the SLEE will
route the event, i.e. which SBB entities will receive the event, and which
event handler methods will be invoked to process the event. All events
with the same event type are represented by event objects of the same
event class.
generic Activity Context Inter- A generic Activity Context Interface object is a Java object that imple-
face object ments the generic ActivityContextInterface interface but does
not implement an extended SBB Developer defined SBB Activity Con-
text Interface interface. It can only be used to access the underlying Ac-
tivity object of an Activity Context, attach and detach SBB entities to the
underlying Activity Context.
initial event An initial event is the event that caused the SLEE to instantiate a new
root SBB entity. This initial event is known as the initial event of the SBB
entity.
management client A management client is a program that manages the SLEE and the appli-
cations running in the SLEE through the SLEE’s management interfaces.
For example, a management client may be a network management appli-
cation or a network management console.
Object Name An Object Name is the name used to identify a specific JMX MBean ob-
ject registered with a JMX MBean Server.
Profile A Profile contains a set of attributes that hold data provisioned by the
Administrator at runtime via a management interface and is accessible by
SBB objects running in the SLEE. It exists in a Profile Table. The Profile
Specification of its Profile Table specifies its attributes and the manage-
ment interface used to provision the Profile.
Profile CMP interface A Profile CMP interface defines the attributes of each Profile in the Pro-
file Tables created from the Profile Specification that defines the Profile
CMP interface. The SBB Developer declares each attribute using a pair of
get and set accessor methods in this interface.
Profile Management abstract A Profile Management abstract class is a Java class that implements the
class Profile Management interface of the Profile Specification. It provides the
implementation of the methods declared in the SLEE specification de-
fined Profile Management interface.
Profile Management interface A Profile Management interface is a Java interface that defines the man-
agement operations (and may include the CMP field get and set accessor
methods declared in the Profile CMP interface) that interact and manipu-
late the attributes of a Profile that conforms to the Profile Specification
that defines the Profile Management interface and should be exposed
through the management interface of the Profile Specification.
Profile Management object A Profile Management object is either a Java object that is an instance of
a concrete class that extends the Profile Management abstract class if one
is provided, or a Java object that is an instance of a concrete class that
implements the Profile CMP interface and the javax.slee.pro-
file.ProfileManagement interface. It caches the persistent state of
a Profile in its CMP fields and instance variables.
Profile MBean class A Profile MBean class is a SLEE implemented class that implements the
corresponding Profile MBean interface.
Profile MBean interface A Profile MBean interface is the external management interface that is
visible to external management clients that interact with the Profiles
specified by the Profile Specification. It is generated by the SLEE upon
Profile Specification deployment from the methods defined in the Profile
CMP interface if no Profile Management interface is provided or the Pro-
file Management interface if the Profile Management interface is pro-
vided, and the SLEE specification defined javax.slee.pro-
file.ProfileMBean interface.
Profile MBean object A Profile MBean object is an instance of a Profile MBean class.
Profile Specification A Profile Specification defines the interfaces, classes, and deployment
descriptor elements needed to define the attributes of Profiles in Profile
Tables created from the Profile Specification and the interfaces used to
provision and access a Profile of the Profile Specification.
ProfileManagement inter- The ProfileManagement interface is a SLEE specification defined
face interface that declares the life cycle methods of a Profile Management
object.
ProfileMBean interface The ProfileMBean interface is a SLEE specification defined interface
that declares the life cycle methods of a Profile MBean object.
resource adaptor A resource adaptor is an implementation of a resource adaptor type. It
mainly consists of Java classes that implements the function of adapting a
resource to the requirements of the SLEE. An Administrator installs re-
source adaptors in the SLEE.
resource adaptor entity A resource adaptor entity is an instance of a resource adaptor. Typically,
a resource adaptor. An Administrator instantiates resource adaptor entities
from resource adaptors.
resource adaptor type A resource adaptor type declares the common characteristics of a set of
resource adaptors. For example, it defines the Activity objects, the event
types, the resource adaptor interface, and the Activity Context Interface
Factory interface that are common to these resource adaptors.
Resource Info Profile Table The Resource Info Profile Table of a Service contains Service specific
information that should be passed to resource adaptors when the Service
is in the Active state.
root SBB A root SBB is an SBB that may be instantiated by the SLEE to process
events.
root SBB entity A root SBB entity is the root node in an SBB entity tree and is an instance
of a root SBB. It is instantiated by the SLEE to process its initial event.
SBB Same as SBB component.
SBB abstract class An SBB abstract class is a part of an SBB component. It contains the core
application logic of the SBB component, including how events should be
processed and the implementations of the methods declared in its SBB
local interface. It also defines the CMP fields of the SBB abstract class.
SBB Activity Context Interface An SBB Activity Context Interface interface is a part of an SBB comp o-
interface nent. It e xtends the generic SLEE specification defined Activity-
ContextInterface interface and defines a set of get and set accessor
methods for each Activity Context attribute accessed by the SBB comp o-
nent.
SBB Activity Context Interface An SBB Activity Context Interface object is a Java object that imple-
object ments the SBB Activity Context Interface interface of an SBB comp o-
nent. It provides an Activity Context with a Java object that SBB objects
can use to access the Activity Context attributes that are defined in the
SBB Activity Context Interface interface of the SBB comp onent and
stored in the Activity Context.
SBB component An SBB component consists of a set of Java classes and interfaces, and a
deployment descriptor that describes the SBB component. These classes
and interfaces contain the SBB component’s application code.
SBB component identifier An SBB component identifier is a Java object that uniquely identifies an
SBB component.
SBB Developer An SBB Developer is a person who creates SBB components.
SBB entity An SBB entity is an instance of an SBB component. It represents the per-
s istent per-instance state of an instance of the SBB component as defined
by the CMP fields in the SBB abstract class of the SBB component.
SBB entity sub-tree. An SBB entity sub-tree is an SBB entity tree whose root is not the root
SBB entity of the SBB entity tree.
SBB entity tree An SBB entity tree is a directed acyclic graph that represents the child
relations between SBB entities. A node in this tree represents an SBB
entity. A directed edge represents the child relation from a parent SBB
entity to a child SBB entity. The label on the directed edge indicates the
event delivery priority of the child SBB entity relative to the child’s sib-
lings. The root node of this tree must be a root SBB entity.
SBB graph An SBB graph is a graph that illustrates the child relations among SBBs.
An SBB is a node in this graph and a child relation is a directed edge
from the node of the parent SBB to the node of the child SBB. Each edge
has a label that indicates the default event delivery priority of the child
relation.
SBB local interface An SBB local interface declares the methods of the SBB component that
may be invoked synchronously. The SBB Developer provides the imple-
mentation of these methods in the SBB abstract class.
SBB local object An SBB local object is an instance of a SLEE generated concrete class
that implements the SBB local interface of an SBB. This SBB local ob ject
represents an SBB entity. When invoked, it delegates the invocation to an
SBB object assigned to the SBB entity.
SBB object An SBB object is an instance of an SBB abstract class. It has a life cycle.
When an SBB object is in the Ready state, the SBB object has been as-
signed to an SBB entity. It executes on behalf of the SBB entity and it can
access the persistent state of the SBB entity.
SbbContext object The SbbContext object of an SBB object gives the SBB object access
to the SBB object’s context maintained by the SLEE, allows the SBB
object to invoke functions provided by the SLEE. It also allows the SBB
object to obtain runtime information about the SBB entity assigned to the
SBB object.
Service Same as Service component.
Service component A Service component specifies a child relation from the SLEE (as the
logical parent of all root SBBs) to a root SBB, the default event delivery
priority of the Service, and provides other information needed by the
SLEE to instantiate root SBB entities of the Service, such as the Service’s
Address Profile Table and Resource Info Profile Table.
Service Deployer A Service Deployer is a person who customizes SBBs and Services for
deployment into the target operational environment.
Service component identifier A Service component identifier is a Java object that uniquely identifies a
Service component.
subscriber A subscriber is an entity; it may be a person, business etc.