public interface Migratable
 When the instance is first deployed, the framework will call the 
 migratableInitialize() method.  When this 
 method returns, the instance is initialized but inactive.  Once an instance
 of the service has been deployed on each potential host, the framework 
 chooses one instance to activate and calls the Migratable.migratableActivate() 
 on that instance.  When this call returns that instance of the service is 
 active and all others are inactive.  When it is time to migrate an instance,
 the framework first calls Migratable.migratableDeactivate() on the active 
 instance.  It then calls Migratable.migratableActivate() on the new instance.  
 When the second call returns, migration is complete.
 
UNINITIALIZED | | initialize | deactivate V +------------->INACTIVE<----------+ | | | PREPARING_TO_DEACTIVATE | activate |deactivate ^ | | | V | +---------------ACTIVE------------+
An implementation must meet special requirements in order to function properly as a migratable service. Namely, it must guarantee that no service method called before the end of a lease will return after the lease has expired. This can be accomplished in one of two ways:
| Modifier and Type | Field and Description | 
|---|---|
static int | 
ACTIVATING  | 
static int | 
ACTIVE  | 
static int | 
DEFAULT_ORDER  | 
static int | 
EARLY_ORDER  | 
static int | 
FILESTORE_ORDER  | 
static int | 
INACTIVE  | 
static int | 
LATE_ORDER  | 
static int | 
MDB_ORDER  | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
getName()  | 
int | 
getOrder()
Returns the order value for this particular migratable
 object. 
 | 
void | 
migratableActivate()
Called to activate this instance of the migratable service. 
 | 
void | 
migratableDeactivate()
Called to deactivate this instance of the migratable service. 
 | 
void | 
migratableInitialize()
Called to initialize this instance of the migratable service. 
 | 
static final int INACTIVE
static final int ACTIVE
static final int ACTIVATING
static final int DEFAULT_ORDER
static final int EARLY_ORDER
static final int FILESTORE_ORDER
static final int LATE_ORDER
static final int MDB_ORDER
String getName()
void migratableInitialize()
                   throws MigrationException
MigrationExceptionvoid migratableActivate()
                 throws MigrationException
MigrationExceptionvoid migratableDeactivate()
                   throws MigrationException
A migratable can not depend on this method being called. It is only called in the case where the migration source is still healthy. For this reason, the migratable instance must be prepared for failure at all times. This method just provides this instance an opportunity to provide a more graceful migration when conditions permit.
MigrationExceptionint getOrder()