Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.2)

Part Number E27170-01

weblogic.management.runtime
Interface ServerLifeCycleRuntimeMBean

All Superinterfaces:
DynamicMBean, MBeanRegistration, NotificationBroadcaster, RuntimeMBean, ServerStates, WebLogicMBean

public interface ServerLifeCycleRuntimeMBean
extends RuntimeMBean, ServerStates

Provides methods that transition servers from one state to another. This class is instantiated only on the Administration Server, but you can use it to transition the states of Managed Servers as well as Administration Servers.

You cannot use it to start an Administration Server, and if you want to use it to start Managed Servers, you must first set up a Node Manager on each Managed Server's host machine.

If you want to use the methods that transition a server into the ADMIN state, you must first set up an administration channel for that server.

Access limited to the following security roles:
Operator

Field Summary
 
Fields inherited from interface weblogic.server.ServerStates
ACTIVATE_LATER, ADMIN, FAILED, FAILED_NOT_RESTARTABLE, FAILED_RESTARTING, FORCE_SHUTTING_DOWN, FORCE_SUSPENDING, RESUMING, RUNNING, SHUTDOWN, SHUTDOWN_IN_PROCESS, SHUTDOWN_PENDING, SHUTTING_DOWN, STANDBY, STARTING, SUSPENDING, UNKNOWN
 
Method Summary
 ServerLifeCycleTaskRuntimeMBean forceShutdown()
          Immediately transitions a server to the SHUTDOWN state.
 ServerLifeCycleTaskRuntimeMBean forceSuspend()
          Transitions the server from RUNNING to ADMIN state forcefully cancelling inflight work.
 String getIPv4URL(String protocol)
          The IPv4 URL that clients use when connecting to this server using the specified protocol.
 String getIPv6URL(String protocol)
          The IPv6 URL that clients use when connecting to this server using the specified protocol.
 String getMiddlewareHome()
          The Oracle Middleware installation directory.
 int getNodeManagerRestartCount()
          Number of times the server has been restarted using the NodeManager since creation.
 String getState()
          The current state of the server.
 ServerLifeCycleTaskRuntimeMBean[] getTasks()
          Get preexisting Server Lifecycle Tasks
 String getWeblogicHome()
          The directory where the WebLogic Server instance (server) is installed, without the trailing "/server".
 ServerLifeCycleTaskRuntimeMBean resume()
          Transitions the server from ADMIN to RUNNING state.
 ServerLifeCycleTaskRuntimeMBean shutdown()
          Gracefully transitions a server to the SHUTDOWN state.
 ServerLifeCycleTaskRuntimeMBean shutdown(int timeout, boolean ignoreSessions)
          Gracefully shutdown the server after handling inflight work.
 ServerLifeCycleTaskRuntimeMBean start()
          Uses the Node Manager to start a Managed Server.
 ServerLifeCycleTaskRuntimeMBean suspend()
          Gracefully suspends server to ADMIN state.
 ServerLifeCycleTaskRuntimeMBean suspend(int timeout, boolean ignoreSessions)
          Transitions the server from RUNNING to ADMIN state gracefully.
 
Methods inherited from interface weblogic.management.WebLogicMBean
getMBeanInfo, getName, getObjectName, getParent, getType, isCachingDisabled, isRegistered, setParent
 
Methods inherited from interface javax.management.DynamicMBean
getAttribute, getAttributes, invoke, setAttribute, setAttributes
 
Methods inherited from interface javax.management.MBeanRegistration
postDeregister, postRegister, preDeregister, preRegister
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 

Method Detail

start

ServerLifeCycleTaskRuntimeMBean start()
                                      throws ServerLifecycleException

Uses the Node Manager to start a Managed Server.

Throws:
ServerLifecycleException - If start operation fails

resume

ServerLifeCycleTaskRuntimeMBean resume()
                                       throws ServerLifecycleException

Transitions the server from ADMIN to RUNNING state.

Throws:
ServerLifecycleException - If the resume operation fails

suspend

ServerLifeCycleTaskRuntimeMBean suspend()
                                        throws ServerLifecycleException

Gracefully suspends server to ADMIN state. New requests are rejected and inflight work is allowed to complete.

Throws:
ServerLifecycleException - If the operation fails
See Also:
ServerLifeCycleRuntimeMBean.suspend(int, boolean)

suspend

ServerLifeCycleTaskRuntimeMBean suspend(int timeout,
                                        boolean ignoreSessions)
                                        throws ServerLifecycleException

Transitions the server from RUNNING to ADMIN state gracefully.

Applications are in admin mode. Inflight work is completed.

Parameters:
timeout - Seconds to wait for server to transition gracefully. The server calls ServerLifeCycleRuntimeMBean.forceSuspend() after timeout.
ignoreSessions - drop inflight HTTP sessions during graceful suspend
Throws:
ServerLifecycleException - server failed to suspend gracefully. A ServerLifeCycleRuntimeMBean.forceSuspend() or a ServerLifeCycleRuntimeMBean.forceShutdown() operation can be invoked.

forceSuspend

ServerLifeCycleTaskRuntimeMBean forceSuspend()
                                             throws ServerLifecycleException

Transitions the server from RUNNING to ADMIN state forcefully cancelling inflight work.

Work that cannot be cancelled is dropped. Applications are brought into the admin mode forcefully.

Throws:
ServerLifecycleException - server failed to force suspend. A ServerLifeCycleRuntimeMBean.forceShutdown() operation can be invoked.

shutdown

ServerLifeCycleTaskRuntimeMBean shutdown()
                                         throws ServerLifecycleException

Gracefully transitions a server to the SHUTDOWN state. The server completes all current work before it shuts down.

Throws:
ServerLifecycleException - If the server fails to gracefully shutdown. A ServerLifeCycleRuntimeMBean.forceShutdown() operation can be invoked.

shutdown

ServerLifeCycleTaskRuntimeMBean shutdown(int timeout,
                                         boolean ignoreSessions)
                                         throws ServerLifecycleException

Gracefully shutdown the server after handling inflight work. The following inflight work is handled :

Parameters:
timeout - Number of seconds to wait before aborting inflight work and force shutting down the server.
ignoreSessions - Set to true to ignore pending HTTP sessions during inflight work handling.
Throws:
ServerLifecycleException - If the server fails to gracefully shutdown. A ServerLifeCycleRuntimeMBean.forceShutdown() operation can be invoked.

forceShutdown

ServerLifeCycleTaskRuntimeMBean forceShutdown()
                                              throws ServerLifecycleException

Immediately transitions a server to the SHUTDOWN state. The server immediately terminates all current work, moves through the SHUTTING_DOWN state, and ends in the SHUTDOWN state.

You can forcefully shut down a server from any state except UNKNOWN.

Throws:
ServerLifecycleException - If force shutdown fails. The server process will exit after ServerMBean.ServerLifeCycleTimeoutVal() seconds.

getTasks

ServerLifeCycleTaskRuntimeMBean[] getTasks()
Get preexisting Server Lifecycle Tasks

Returns:
a list of all completed or pending server lifecycle tasks.

getState

String getState()

The current state of the server.

Server states are described in

Returns:
The state value

getNodeManagerRestartCount

int getNodeManagerRestartCount()
Number of times the server has been restarted using the NodeManager since creation. The first start does not count. The count is valid only if the NodeManager is used to start and restart the server everytime.

Returns:
Number of server restarts using the NodeManager

getWeblogicHome

String getWeblogicHome()

The directory where the WebLogic Server instance (server) is installed, without the trailing "/server".

Returns:
The weblogic server directory

getMiddlewareHome

String getMiddlewareHome()

The Oracle Middleware installation directory.

Returns:
The Oracle Middleware installation directory

getIPv4URL

String getIPv4URL(String protocol)

The IPv4 URL that clients use when connecting to this server using the specified protocol.

Parameters:
protocol - the desired protocol
Returns:
The IPv4 URL as a string

getIPv6URL

String getIPv6URL(String protocol)

The IPv6 URL that clients use when connecting to this server using the specified protocol.

Parameters:
protocol - the desired protocol
Returns:
The IPv6 URL as a string

Copyright 1996, 2013, 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.1.2)

Part Number E27170-01