|
Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.2.1) Part Number E55141-01 P4 Change 1723563 on 2015/10/09 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Migratable
Every migratable service must implement the Migratable interface. This interface defines the methods that the migration framework will call to carry out migration. When a migratable service is deployed, an instance of the service class that implements this interface is installed on every potential host and registered with the local MigrationManager. The Migratable interface defines the methods used to manage the lifecycle of each instance.
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:
Field Summary | |
---|---|
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 |
Method Summary | |
---|---|
abstract String |
getName() |
abstract int |
getOrder() Returns the order value for this particular migratable object. |
abstract void |
migratableActivate() Called to activate this instance of the migratable service. |
abstract void |
migratableDeactivate() Called to deactivate this instance of the migratable service. |
abstract void |
migratableInitialize() Called to initialize this instance of the migratable service. |
Field Detail |
---|
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
Method Detail |
---|
String getName()
void migratableInitialize() throws MigrationException
MigrationException
void migratableActivate() throws MigrationException
MigrationException
void 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.
MigrationException
int getOrder()
|
Copyright 1996, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.2.1) Part Number E55141-01 P4 Change 1723563 on 2015/10/09 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |