org.objectweb.joram.client.jms.admin.server
Class ZeroconfJoramServer

java.lang.Object
  extended by org.objectweb.joram.client.jms.admin.server.ZeroconfJoramServer

public class ZeroconfJoramServer
extends java.lang.Object

This class starts a Joram server without almost any configuration. It just needs to know an existing Joram server (host, port) and the root login. The existing server is usually "s0" from the base configuration. These data are specified by 4 environment properties: ADMIN_HOST_NAME, ADMIN_PORT, ROOT_USER_NAME and ROOT_USER_PWD.

This server uses the current directory to store some data. You can specify another directory with the property BASE_DIR_PATH.

This new server is added into the first domain found in the Joram platform. If no domain exists, a first domain D0 is created. Notice that this bootstrap mechanism has been designed for a single domain platform. If you need to build more complex configuration with several domains you must use the raw Joram administration API.


Field Summary
static java.lang.String A3_SERVERS_XML
           
static java.lang.String ADMIN_HOST_NAME
           
static java.lang.String ADMIN_PORT
           
static java.lang.String BASE_DIR_PATH
           
private static java.io.File baseDir
           
private static java.lang.String baseDirPath
           
private static java.lang.String hostName
           
static java.lang.String JORAM_SERVER_DATA
           
static java.lang.String ROOT_USER_NAME
           
static java.lang.String ROOT_USER_PWD
           
static java.lang.String SERVER_ID
           
private static java.lang.String serverName
           
 
Constructor Summary
ZeroconfJoramServer()
           
 
Method Summary
private static void adminConnect()
           
static void destroy()
           
private static void init()
           
private static int loadServerId()
           
static void main(java.lang.String[] args)
          Starts a Joram server without any configuration.
private static int newServerId()
           
private static void saveServerId(int sid)
           
static void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASE_DIR_PATH

public static final java.lang.String BASE_DIR_PATH
See Also:
Constant Field Values

ADMIN_HOST_NAME

public static final java.lang.String ADMIN_HOST_NAME
See Also:
Constant Field Values

ADMIN_PORT

public static final java.lang.String ADMIN_PORT
See Also:
Constant Field Values

ROOT_USER_NAME

public static final java.lang.String ROOT_USER_NAME
See Also:
Constant Field Values

ROOT_USER_PWD

public static final java.lang.String ROOT_USER_PWD
See Also:
Constant Field Values

SERVER_ID

public static final java.lang.String SERVER_ID
See Also:
Constant Field Values

JORAM_SERVER_DATA

public static final java.lang.String JORAM_SERVER_DATA
See Also:
Constant Field Values

A3_SERVERS_XML

public static final java.lang.String A3_SERVERS_XML
See Also:
Constant Field Values

baseDirPath

private static java.lang.String baseDirPath

baseDir

private static java.io.File baseDir

hostName

private static java.lang.String hostName

serverName

private static java.lang.String serverName
Constructor Detail

ZeroconfJoramServer

public ZeroconfJoramServer()
Method Detail

init

private static void init()
                  throws java.lang.Exception
Throws:
java.lang.Exception

adminConnect

private static void adminConnect()
                          throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Starts a Joram server without any configuration.

Throws:
java.lang.Exception

newServerId

private static int newServerId()
                        throws java.lang.Exception
Throws:
java.lang.Exception

saveServerId

private static void saveServerId(int sid)
                          throws java.io.IOException
Throws:
java.io.IOException

loadServerId

private static int loadServerId()
                         throws java.io.IOException
Throws:
java.io.IOException

stop

public static void stop()

destroy

public static void destroy()
                    throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.