Beispiel #1
0
 /**
  * Get the current server status
  *
  * @return The current server status
  * @throws AxisFault If an error occurs while getting the ConfigurationContext
  */
 public static String getCurrentStatus() {
   ConfigurationContext configCtx = CarbonConfigurationContextFactory.getConfigurationContext();
   String currentStatus = (String) configCtx.getProperty(CURRENT_SERVER_STATUS);
   if (currentStatus == null) {
     configCtx.setProperty(CURRENT_SERVER_STATUS, STATUS_RUNNING);
     return STATUS_RUNNING;
   }
   return currentStatus;
 }
Beispiel #2
0
 /**
  * Set server to maintenace mode
  *
  * @throws AxisFault If an error occurs while getting the ConfigurationContext
  */
 public static void setServerInMaintenance() throws AxisFault {
   ConfigurationContext configCtx = CarbonConfigurationContextFactory.getConfigurationContext();
   configCtx.setProperty(CURRENT_SERVER_STATUS, STATUS_IN_MAINTENANCE);
 }
Beispiel #3
0
 /**
  * Set server to restarting-down mode
  *
  * @throws AxisFault If an error occurs while getting the ConfigurationContext
  */
 public static void setServerRestarting() throws AxisFault {
   ConfigurationContext configCtx = CarbonConfigurationContextFactory.getConfigurationContext();
   configCtx.setProperty(CURRENT_SERVER_STATUS, STATUS_RESTARTING);
 }
Beispiel #4
0
 /**
  * Set server to shutting-down mode
  *
  * @throws AxisFault If an error occurs while getting the ConfigurationContext
  */
 public static void setServerShuttingDown() throws AxisFault {
   ConfigurationContext configCtx = CarbonConfigurationContextFactory.getConfigurationContext();
   configCtx.setProperty(CURRENT_SERVER_STATUS, STATUS_SHUTTING_DOWN);
 }