RRPersistenceHelperpublic class RRPersistenceHelper extends Object Restart event Helper - class providing support for informing
server(s) to set its(their) restart required state to true or false. |
Fields Summary |
---|
private static final Logger | _logger |
Constructors Summary |
---|
public RRPersistenceHelper()
|
Methods Summary |
---|
public void | setRestartRequired(java.lang.String inst, boolean restart)Set the restart required status in the given instance name
try {
RMIClient client = AdminChannel.getRMIClient(inst);
if (client == null) {
_logger.log(Level.INFO, "event.rmi_client_not_found");
} else {
client.setRestartNeeded(restart);
}
} catch (Throwable t) {
_logger.log(Level.INFO,
"event.exception_during_restart_reset", t);
}
| public void | setRestartRequired(boolean restart)Set the restart required status in the current instance.
Server Runtime MBean calls this method to set the restart
required state from DAS.
String inst = null;
ServerContext svrCtx = ApplicationServer.getServerContext();
if (svrCtx !=null) {
inst = svrCtx.getInstanceName();
}
setRestartRequired(inst, restart);
| public void | setRestartRequiredForServer(com.sun.enterprise.admin.event.AdminEvent event, com.sun.enterprise.admin.event.AdminEventResult result)Set the restart required status in the given instance name
if the result code is not success
if (AdminService.getAdminService() == null) {
// This instance does not have admin service return null
return;
}
String resCode = null;
// the follows tests this is server or DAS
try {
if (result != null) {
resCode = result.getResultCode();
}
if ((resCode == null) ||
(!resCode.equals(AdminEventResult.SUCCESS)) ){
if (event != null) {
setRestartRequired( event.getInstanceName(), true);
}
}
} catch (Throwable t) {
_logger.log(Level.INFO, "event.exception_during_restart_reset",t);
}
|
|