public interface ActivityContextNamingFacility
This facility is transactional in nature. Naming operations only take effect once the enclosing transaction commits.
An SBB obtains access to an ActivityContextNamingFacility
object
via its JNDI environment. The Activity Context Naming Facility is bound into
JNDI using the name specified by JNDI_NAME
.
Modifier and Type | Field and Description |
---|---|
static String |
JNDI_NAME
Constant declaring the JNDI name where an
ActivityContextNamingFacility
object is bound into an SBB's JNDI environment. |
Modifier and Type | Method and Description |
---|---|
void |
bind(ActivityContextInterface aci,
String name)
Bind an Activity Context to a name.
|
ActivityContextInterface |
lookup(String name)
Get a reference to the Activity Context bound to a particular name.
|
void |
unbind(String name)
Unbind a bound name.
|
static final String JNDI_NAME
ActivityContextNamingFacility
object is bound into an SBB's JNDI environment.
The value of this constant is "java:comp/env/slee/facilities/activitycontextnaming".
void bind(ActivityContextInterface aci, String name) throws NullPointerException, IllegalArgumentException, TransactionRequiredLocalException, NameAlreadyBoundException, FacilityException
This method is a mandatory transactional method.
aci
- an ActivityContextInterface
object that encapsulates
the Activity Context to bind.name
- the name to bind the Activity Context to.NullPointerException
- if any argument is null
.IllegalArgumentException
- if name
is zero-length.TransactionRequiredLocalException
- if this method is invoked without a
valid transaction context.NameAlreadyBoundException
- if the specified name is already bound to
some Activity Context.FacilityException
- if the activity context could not be bound due to
a system-level failure.void unbind(String name) throws NullPointerException, TransactionRequiredLocalException, NameNotBoundException, FacilityException
This method is a mandatory transactional method.
name
- the name that should be unbound.NullPointerException
- if name
is null
.TransactionRequiredLocalException
- if this method is invoked without a
valid transaction context.NameNotBoundException
- if the specified name is not currently bound
to an Activity Context.FacilityException
- if the name could not be unbound due to a
system-level failure.ActivityContextInterface lookup(String name) throws NullPointerException, TransactionRequiredLocalException, FacilityException
This method is a mandatory transactional method.
name
- the name the Activity Context is bound to.ActivityContextInterface
object that encapsulates
the Activity Context bound to the specified name. If no Activity
Context is bound to the name, this method returns null
.NullPointerException
- if name
is null
.TransactionRequiredLocalException
- if this method is invoked without a
valid transaction context.FacilityException
- if the lookup failed due to a system-level failure.