org.objectweb.jonas.server
Class Server

java.lang.Object
  extended by org.objectweb.jonas.server.Server

public class Server
extends Object

This class implements an JOnAS Server.

Author:
Philippe Coq, Philippe Durieux, Jeff Mesnil, Regis Le Brettevillois - Libelis / JOnAS team - evidian Service as org.objectweb.jonas.service.Service 02/04/25, Sebastien Chassande-Barrioz sebastien.chassande@inrialpes.fr Monolog for traces, Adriana Danes 03/01/20: -Highlight configuration properties 03/03/..: -Force jmx service startup -Create and register the JOnAS configuration MBean. This MBean manages JOnAS persistent 04/04/07 - Refactor MBean registration / unregistration

Method Summary
static Server getInstance()
          Get the unique instance.
 J2EEDomain getJ2EEDomain()
          Gets J2EEDomain
 String initCarol(JProp props, String serverName)
          Initialize interception and carol
static boolean isStarted()
           
static String jvmInfos()
           
 void kill()
          Stop the server and stop the JVM (MBean method)
static void main(String[] args)
          Server main routine.
 void start()
          Start the server
 void stop()
          Stop the server without stopping the JVM
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Server getInstance()
Get the unique instance. Create it at first call.

Returns:
unique instance.

main

public static void main(String[] args)
                 throws Exception
Server main routine. No args.

Parameters:
args - the arguments of the server
Throws:
Exception - can not start server

getJ2EEDomain

public J2EEDomain getJ2EEDomain()
Gets J2EEDomain

Returns:
J2EEDomain

initCarol

public String initCarol(JProp props,
                        String serverName)
                 throws Exception
Initialize interception and carol

Parameters:
props - the JOnAS properties
serverName - the name of the server for creating mbeans
Returns:
list of protocols
Throws:
Exception - if carol init failed

kill

public void kill()
          throws Exception
Stop the server and stop the JVM (MBean method)

Throws:
Exception - if the server can't be destroyed

start

public void start()
           throws Exception
Start the server

Throws:
Exception - if server can't be started

jvmInfos

public static String jvmInfos()
Returns:
information on JVM currently used

stop

public void stop()
          throws Exception
Stop the server without stopping the JVM

Throws:
Exception - if the server can't be stopped

isStarted

public static boolean isStarted()
Returns:
Returns the status of the server started or not.


Copyright © 2007 OW2 Consortium. All Rights Reserved.