| 
 | Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.1.3) Part Number E41849-02 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
@Contract public interface ServerService
Server services that need to hook into the servers lifecycle implement this
 interface. The implementation classname is then added to the 
 ServerServices. Please refer to the javadoc of 
 ServerServices for more information on when start,
 stop and halt are called.
| 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 | |
|---|---|
|  String | getName()Get the name of the server service. | 
|  String | getVersion()Get a comma separated list of specification versions that this server service implements. | 
|  void | halt()This method shuts down the service by cancelling or rolling back inflight work. | 
|  void | start()This method starts the service. | 
|  void | stop()This method gracefully shuts down the service completing inflight work and releasing resources. | 
| Method Detail | 
|---|
String getName()
String getVersion()
void start()
           throws ServiceFailureException
This method can be called more than once but not concurrently. Here are the conditions under which start() can be called:
ServiceFailureException - service is unable to start due to an 
 internal error condition. The service is not available if this exception 
 is thrown. The service should cleanup its state before throwing this 
 exception. No further callbacks will be issued after this exception is
 thrown.
void stop()
          throws ServiceFailureException
"work associated with state that will be lost if this service becomes unavailable. Remote and/or local users are relying on this state to complete their work. The user can be another ServerService, a remote EJB client, browser request etc. If the state is replicated to another cluster node or is persistent and available to other nodes then work accessing such state is not treated as inflight work. Note that work would be treated as inflight till replication or persistence is complete."
There is always a danger that completing inflight work can take forever. The caller of this method is expected to handle that condition. For e.g. graceful shutdown provides a timeout after which force shutdown begins.
Services should handle a halt() call even when stop() is executing.
This method can be called more than once but not concurrently. Here are the conditions under which stop() can be called:
ServiceFailureException - This exception is thrown to indicate that 
 stop quit without completing inflight work. This could happen due to an 
 internal error or if halt is already in progress. If stop fails due to 
 internal error, the service should guarantee that a subsequent halt call 
 will succeed.
void halt()
          throws ServiceFailureException
"Inflight work should be cancelled if possible and if the cancellation time is not dependent on user intervention or user configured timeout e.g. rollback of pending transactions. If cancellation cannot be done without user intervention or configuration (e.g. invalidation of servlet session in a non-clustered server) then it should be dropped. If the state is replicated to another cluster node or is persistent and available to other nodes then cancellation just means relinquishing control over that state and letting another cluster member takeover."
Services should handle a halt() call even when stop() is executing.
This method can be called more than once but not concurrently. Here are the conditions under which halt() can be called:
ServiceFailureException - service is unable to halt due to an 
 internal error condition. The service becomes unavailable if this 
 exception is thrown. halt() should throw this exception with an 
 appropriate message only when it cannot complete shutdown and the next 
 invocation of start() might fail because of this failure. Note that the 
 next invocation of start() can happen after server restart. In all other 
 cases, halt() should log a message and continue to completion.| 
 | Copyright 1996, 2014, 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.3) Part Number E41849-02 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||