org.openmdx.kernel.application.container.lightweight
Class LightweightContainer

java.lang.Object
  extended by org.openmdx.kernel.application.container.lightweight.LightweightContainer

public class LightweightContainer
extends Object

Lightweight Container

Note:

See Also:
DeploymentProperties.CONNECTOR_URLS, DeploymentProperties.APPLICATION_URLS

Method Summary
 Report[] deployApplication(URL applicationURL)
          Deploy an enterprise application without application clients or web applications.
 Runnable deployApplicationClient(String applicationURL, Map applicationClientEnvironment, String[] applicationClientArguments)
          Deploy an enterprise application including one application client but no web application.
 Report deployConnector(URL connectorURL)
          Deploy a connector
static Subprocess fork()
          Fork a lightweight container.
static Subprocess fork(String jre, String classpath, Map properties, OutputStream outputStream, OutputStream exceptionStream)
          Fork a lightweight container.
 Context getContainerContext()
          Get the Container Context
static LightweightContainer getInstance()
          Gets the Lightweight Container Singleton
static boolean hasInstance()
          Tests whether there is a Lightweight Container Singleton.
static void main(String[] arguments)
          The lightweight container's main method
protected static void server()
          The LightweightContainer is going to listen to RMI requests.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInstance

public static LightweightContainer getInstance()
Gets the Lightweight Container Singleton

Warning: This method must not be called in an either partially or fully compliant J2EE container due to the fact that the lightweight container installs its own InitialContextFactoryBuilder.

Returns:
the Lightweight Container Singleton
See Also:
InitialContextFactoryBuilder

hasInstance

public static boolean hasInstance()
Tests whether there is a Lightweight Container Singleton.

Returns:
if thre exists a lightweight container in this VM.

deployApplication

public Report[] deployApplication(URL applicationURL)
                           throws Exception
Deploy an enterprise application without application clients or web applications.

Parameters:
applicationURL - an enterprise application archive or directory to be deployed
Returns:
the configuration validation reports. The first element's success flag is true if and only if the whole deployment succeeded.
Throws:
Exception

deployApplicationClient

public Runnable deployApplicationClient(String applicationURL,
                                        Map applicationClientEnvironment,
                                        String[] applicationClientArguments)
                                 throws Exception
Deploy an enterprise application including one application client but no web application.

Parameters:
applicationURL - an enterprise application archive or directory to be deployed
applicationClientEnvironment - used to override the application clients environment entries
Returns:
the configuration validation reports. The first element's success flag is true if and only if the whole deployment succeeded.
Throws:
Exception

deployConnector

public Report deployConnector(URL connectorURL)
                       throws Exception
Deploy a connector

Parameters:
connectorURL - a resource adapter archive or directory to be deployed
Returns:
the configuration validation report Its success flag is true if and only if the deployment succeeded.
Throws:
Exception

getContainerContext

public Context getContainerContext()
Get the Container Context

Returns:
the Container Context

toString

public String toString()
Overrides:
toString in class Object

server

protected static void server()
The LightweightContainer is going to listen to RMI requests.


fork

public static Subprocess fork()
                       throws IOException,
                              InterruptedException
Fork a lightweight container.

Throws:
IOException
InterruptedException

fork

public static Subprocess fork(String jre,
                              String classpath,
                              Map properties,
                              OutputStream outputStream,
                              OutputStream exceptionStream)
                       throws IOException,
                              InterruptedException
Fork a lightweight container.

Parameters:
jre - the JRE directory. Optional, defaults to the "java.home" system property.
classpath - the class-path. Optional, defaults to the "java.class.path" system property.
properties - the system properties to be set. Optional, defaults to "org.openmdx.rmi.naming.service" and "org.openmdx.rmi.registry.port" retrieved from Contexts.
outputStream - The stream obtains data piped from the standard output stream of the forked Subprocess; or null to discard the data.
exceptionStream - The stream obtains data piped from the error output stream of the forked Subprocess; or null to discard the data.
Returns:
the LightweightContainer's Process
Throws:
IOException
InterruptedException

main

public static void main(String[] arguments)
The lightweight container's main method

Parameters:
arguments -


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.