javax.slee.profile
Interface ProfileManagement


public interface ProfileManagement

This interface must be implemented by a Profile Management Abstract Class if a profile specification includes such a class.


Method Summary
 boolean isProfileDirty()
          Determine if the profile has been dirtied by an uncommitted change to its state.
 boolean isProfileValid(ProfileID id)
          Determine if the profile referenced by a specified profile identifier currently exists.
 void markProfileDirty()
          Mark the profile as being dirty, that is, that it has been modified since it was last committed.
 void profileInitialize()
          The SLEE invokes this operation once the persistence representation for the profile has been created.
 void profileLoad()
          The SLEE invokes this method on a profile when the state of the profile object needs to be synchronized with the state in the underlying data source.
 void profileStore()
          The SLEE invokes this operation when the state of the underlying data source needs to be synchronized with the state of the profile.
 void profileVerify()
          The SLEE invokes this operation in response to a request by the Administrator to commit any changes made to the profile.
 

Method Detail

profileInitialize

public void profileInitialize()
The SLEE invokes this operation once the persistence representation for the profile has been created. The profile may initialize its transient or CMP fields during this method. This method is only invoked once for each profile table that is created, and provides the initial values for the profile table's default profile.

This method is invoked with an active transaction context. The SLEE follows a call to this method with a call to profileStore() and profileVerify() in the same transaction.


profileLoad

public void profileLoad()
The SLEE invokes this method on a profile when the state of the profile object needs to be synchronized with the state in the underlying data source. The profile object should reload from CMP fields any transient state that depends on the state stored in those CMP fields.

This method is invoked with an active transaction context.


profileStore

public void profileStore()
The SLEE invokes this operation when the state of the underlying data source needs to be synchronized with the state of the profile. The profile object should store into CMP fields any transient state that depends on the state stored in those CMP fields.

This method is invoked with an active transaction context.


profileVerify

public void profileVerify()
                   throws ProfileVerificationException
The SLEE invokes this operation in response to a request by the Administrator to commit any changes made to the profile. The profile object should verify that the contents of its CMP fields at exit from this method form a valid configuration for SBB instances. If not, a ProfileVerificationException should be thrown.
Throws:
ProfileVerificationException - if the profile fails any verification check.

markProfileDirty

public void markProfileDirty()
Mark the profile as being dirty, that is, that it has been modified since it was last committed. Modifying a CMP field automatically flags the profile as being dirty, so this method only needs to be called, for example, if transient state changes.

An SBB Developer must not implement this operation. It is implemented by the SLEE at deployment time.

This method must be invoked with a valid transaction context.


isProfileDirty

public boolean isProfileDirty()
Determine if the profile has been dirtied by an uncommitted change to its state.

An SBB Developer must not implement this operation. It is implemented by the SLEE at deployment time.

This method must be invoked with a valid transaction context.

Returns:
true if the profile has been modified since last being committed, false otherwise.

isProfileValid

public boolean isProfileValid(ProfileID id)
                       throws java.lang.NullPointerException,
                              SLEEException
Determine if the profile referenced by a specified profile identifier currently exists.

An SBB Developer must not implement this operation. It is implemented by the SLEE at deployment time.

This method must be invoked with a valid transaction context.

Parameters:
id - the profile identifier.
Returns:
true if the profile referenced by the profile identifier currently exists, false otherwise.
Throws:
java.lang.NullPointerException - if id is null.
SLEEException - if the profile identifier could not be validated due to a system-level failure.