org.objectweb.jonas.server
Class Server

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

public class Server
extends java.lang.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, S. Ali Tokmen - Local JMX access don't create a remote connection anymore

Method Summary
static Server getInstance()
          Get the unique instance.
 J2EEDomain getJ2EEDomain()
          Gets J2EEDomain
 J2EEServer getJ2EEServer()
          Gets J2EEServer.
 java.lang.String initCarol(JProp props, java.lang.String serverName)
          Initialize interception and carol
static boolean isStarted()
           
static java.lang.String jvmInfos()
           
 void kill()
          Stop the server and stop the JVM (MBean method)
static void main(java.lang.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(java.lang.String[] args)
                 throws java.lang.Exception
Server main routine. No args.

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

getJ2EEDomain

public J2EEDomain getJ2EEDomain()
Gets J2EEDomain

Returns:
J2EEDomain

getJ2EEServer

public J2EEServer getJ2EEServer()
Gets J2EEServer.

Returns:
J2EEServer

initCarol

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

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

kill

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

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

start

public void start()
           throws java.lang.Exception
Start the server

Throws:
java.lang.Exception - if server can't be started

jvmInfos

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

stop

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

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

isStarted

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