public class WseeEjbModuleExtension extends ModuleExtension implements UpdateListener
UpdateListener.Registration
Modifier and Type | Field and Description |
---|---|
private static weblogic.diagnostics.debug.DebugLogger |
debugLogger |
private java.lang.String |
moduleId |
private java.lang.String |
moduleURI |
private WSEEEjbModule |
wseeModule |
appCtx, extensibleModule, extensionCtx, modCtx
Constructor and Description |
---|
WseeEjbModuleExtension(ModuleExtensionContext modExtCtx,
ApplicationContextInternal appCtx,
Module extensibleModule) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptURI(java.lang.String uri)
Returns true if this UpdateListener recognizes this update uri
|
void |
activateUpdate(java.lang.String uri)
activateUpdate is called on Listener in the UPDATE PENDING state to
activate a dynamic update.
|
private static void |
debug(java.lang.String s) |
private static void |
debug(java.lang.String s,
java.lang.Throwable t) |
private boolean |
myExtModulesURI(java.lang.String uri) |
void |
postActivate()
Invoked after module has been
activated |
void |
postDeactivate()
Invoked after module has been
deactivated |
void |
postPrepare(UpdateListener.Registration reg)
Invoked after module has been
prepared |
void |
preActivate()
Invoked before module is
activated |
void |
prepareUpdate(java.lang.String uri)
prepareUpdate is called on Listener in the ACTIVE state to
perform a dynamic update.
|
void |
preUnprepare(UpdateListener.Registration reg)
Invoked before module is
unprepared |
void |
remove()
Invoked after module has been
removed |
void |
rollbackUpdate(java.lang.String uri)
rollbackUpdate is called on Listeners in the UPDATE
PENDING state to abort a pending dynamic update.
|
void |
start()
start is called on Module in the ACTIVATED state to
perform any post-deployment initialization.
|
java.lang.String |
toString() |
postAdminToProduction, postRefreshClassLoader, postUnprepare, preDeactivate, preForceProductionToAdmin, preGracefulProductionToAdmin, prePrepare, preRefreshClassLoader
private static final weblogic.diagnostics.debug.DebugLogger debugLogger
private final java.lang.String moduleId
private final java.lang.String moduleURI
private WSEEEjbModule wseeModule
public WseeEjbModuleExtension(ModuleExtensionContext modExtCtx, ApplicationContextInternal appCtx, Module extensibleModule)
public void postPrepare(UpdateListener.Registration reg) throws ModuleException
ModuleExtension
prepared
postPrepare
in class ModuleExtension
reg
- A module extension may register an update listener with reg
to hear for dynamic update eventsModuleException
public void preUnprepare(UpdateListener.Registration reg) throws ModuleException
ModuleExtension
unprepared
preUnprepare
in class ModuleExtension
reg
- Module extension must unregister an update listener with reg
if the listener was registered during postPrepareModuleException
public void preActivate() throws ModuleException
ModuleExtension
activated
preActivate
in class ModuleExtension
ModuleException
public void postActivate() throws ModuleException
ModuleExtension
activated
postActivate
in class ModuleExtension
ModuleException
public void postDeactivate() throws ModuleException
ModuleExtension
deactivated
postDeactivate
in class ModuleExtension
ModuleException
public void remove() throws ModuleException
ModuleExtension
removed
remove
in class ModuleExtension
ModuleException
public void start() throws ModuleException
ModuleExtension
If the start callback fails (by throwing a ModuleException
or unchecked exception), the module remains in the
ACTIVATED state and will then receive a
deactivate
callback
After start completes successfully, the module remains in the ACTIVATED state.
start callbacks should be used sparingly. If possible, module extensions should fail during the postPrepare callback rather than detecting errors in activate or start.
start
in class ModuleExtension
ModuleException
- when start fails. The Deployment
engine is responsible for logging this exception.public boolean acceptURI(java.lang.String uri)
UpdateListener
If the acceptURI returns true, the Application Container will call prepareUpdate and activateUpdate on this uri. If false is returned, the Application Container does not call this UpdateListener for this uri.
If no UpdateListener accepts this uri, the Application Container throws a DeploymentException indicating this update uri cannot be changed dynamically.
The uri is a relative path from the root of the application to some resource in the application. For EARs the uri is of the form, modulename/resource. Modulename must match the module's uri specified in the application.xml or weblogic-application.xml descriptor. For standalone modules the uri is just the resource path.
For XML modules such as JMS, JDBC and Interception modules, the resource must always be the module's descriptor. When app-scoped, the uri for the module is as specified in weblogic-application.xml.
For standalone XML modules the uri refers to the module's descriptor and may be ".", or the descriptor's path. The former case would imply an update operation involving a deployment plan. The latter case implies a partial redeploy, the provided path must resolve to the module descriptor specified in the application's AppDeploymentMBean.getSourcePath property.
acceptURI
in interface UpdateListener
public void prepareUpdate(java.lang.String uri) throws ModuleException
UpdateListener
If the prepareUpdate callback fails by throwing a ModuleException or an unchecked exception, the Listener is transitioned back to the ACTIVE state. The Listener implementation should clean-up any internal state with regards to this update before throwing the exception.
After prepareUpdate completes successfully, the listener is in the UPDATE PENDING state.
prepareUpdate
in interface UpdateListener
ModuleException
- when prepareUpdate fails. The Deployment
engine is responsible for logging this exception.public void activateUpdate(java.lang.String uri) throws ModuleException
UpdateListener
If the activateUpdate callback fails by throwing an unchecked exception, the application is unfortunately in a very bad state. The exception is propogated up the stack to the deployer and the application is taken down (undeployed).
After activateUpdate completes successfully, the listener is in the ACTIVE state.
activateUpdate
in interface UpdateListener
ModuleException
public void rollbackUpdate(java.lang.String uri)
UpdateListener
After rollbackUpdate completes successfully, the listener is in the ACTIVE state.
rollbackUpdate
in interface UpdateListener
public java.lang.String toString()
toString
in class java.lang.Object
private boolean myExtModulesURI(java.lang.String uri)
private static void debug(java.lang.String s)
private static void debug(java.lang.String s, java.lang.Throwable t)