Methods Summary |
---|
public void | applicationDeployed(com.sun.enterprise.admin.event.ApplicationDeployEvent deployEvent)
String deployedAppName = deployEvent.getApplicationName();
_logger.finest("applicationDeployed:" + deployedAppName);
String key = "App_" + deployedAppName;
boolean deployedRecently = checkDeployHistoryEntry(key, "deployed");
setDeployHistoryEntry(key, "deployed", System.currentTimeMillis());
if (deployedRecently) {
_logger.finest("Returning from MIDDLE of applicationDeployed");
return;
}
|
public void | applicationDisabled(com.sun.enterprise.admin.event.ApplicationDeployEvent deployEvent)
|
public void | applicationEnabled(com.sun.enterprise.admin.event.ApplicationDeployEvent deployEvent)
|
public void | applicationRedeployed(com.sun.enterprise.admin.event.ApplicationDeployEvent deployEvent)
String deployedAppName = deployEvent.getApplicationName();
_logger.finest("applicationRedeployed:" + deployedAppName);
String key = "App_" + deployedAppName;
boolean redeployedRecently = checkDeployHistoryEntry(key, "redeployed");
setDeployHistoryEntry(key, "redeployed", System.currentTimeMillis());
if (redeployedRecently) {
_logger.finest("Returning from MIDDLE of applicationRedeployed");
return;
}
|
public void | applicationUndeployed(com.sun.enterprise.admin.event.ApplicationDeployEvent deployEvent)
String deployedAppName = deployEvent.getApplicationName();
_logger.finest("applicationUndeployed:" + deployedAppName);
String key = "App_" + deployedAppName;
boolean undeployedRecently = checkDeployHistoryEntry(key, "undeployed");
setDeployHistoryEntry(key, "undeployed", System.currentTimeMillis());
if (undeployedRecently) {
_logger.finest("Returning from MIDDLE of applicationUndeployed");
return;
}
|
private boolean | checkDeployHistoryEntry(java.lang.String key, java.lang.String deployStatus)This method returns true if the application/module is attempted to be
undeployed even though it was already undeployed, or is attempted to be
(re)deployed when it was (re)deployed within the last 1 minute (60000 ms)
DeployHistoryEntry entry = (DeployHistoryEntry) _deployHistory.get(key);
if (entry == null) {
return false;
}
String val = entry.value;
if (val.equals(deployStatus)) {
/*if (deployStatus.equals("undeployed")) {
return true; // no need to check timestamp
}*/
if (( System.currentTimeMillis() - entry.lat ) < 60000) {
return true;
}
}
return false;
|
public void | init(EmbeddedWebContainer embedded)
_embedded = embedded;
|
public void | moduleDeployed(com.sun.enterprise.admin.event.ModuleDeployEvent deployEvent)
String deployedModuleName = deployEvent.getModuleName();
_logger.finest("moduleDeployed:" + deployedModuleName);
String key = "Mod_" + deployedModuleName;
boolean deployedRecently = checkDeployHistoryEntry(key, "deployed");
setDeployHistoryEntry(key, "deployed", System.currentTimeMillis());
if (deployedRecently) {
_logger.finest("Returning from MIDDLE of moduleDeployed");
return;
}
ConnectionShutdownUtil shutdownUtil = new ConnectionShutdownUtil(_embedded);
shutdownUtil.runCloseAllConnections();
System.gc();
|
public void | moduleDisabled(com.sun.enterprise.admin.event.ModuleDeployEvent deployEvent)
|
public void | moduleEnabled(com.sun.enterprise.admin.event.ModuleDeployEvent deployEvent)
|
public void | moduleRedeployed(com.sun.enterprise.admin.event.ModuleDeployEvent deployEvent)
String deployedModuleName = deployEvent.getModuleName();
_logger.finest("moduleRedeployed:" + deployedModuleName);
String key = "Mod_" + deployedModuleName;
boolean redeployedRecently = checkDeployHistoryEntry(key, "redeployed");
setDeployHistoryEntry(key, "redeployed", System.currentTimeMillis());
if (redeployedRecently) {
_logger.finest("Returning from MIDDLE of moduleRedeployed");
return;
}
ConnectionShutdownUtil shutdownUtil = new ConnectionShutdownUtil(_embedded);
shutdownUtil.runCloseAllConnections();
System.gc();
|
public void | moduleUndeployed(com.sun.enterprise.admin.event.ModuleDeployEvent deployEvent)
String deployedModuleName = deployEvent.getModuleName();
_logger.finest("moduleUndeployed:" + deployedModuleName);
String key = "Mod_" + deployedModuleName;
boolean undeployedRecently = checkDeployHistoryEntry(key, "undeployed");
setDeployHistoryEntry(key, "undeployed", System.currentTimeMillis());
if (undeployedRecently) {
_logger.finest("Returning from MIDDLE of moduleUndeployed");
return;
}
ConnectionShutdownUtil shutdownUtil = new ConnectionShutdownUtil(_embedded);
System.out.println("IN WebContainer>>moduleUndeployed: "
+ deployedModuleName + "about to close all connections");
shutdownUtil.runCloseAllConnections();
System.gc();
|
private void | setDeployHistoryEntry(java.lang.String key, java.lang.String value, long lat)set a deploy history entry
DeployHistoryEntry entry = (DeployHistoryEntry) _deployHistory.get(key); if (entry == null)
_deployHistory.put(key, new DeployHistoryEntry(value, lat));
else {
entry.value = value;
entry.lat = lat;
}
|