EJB 3.1 API 1.0.1.Final

javax.ejb.embeddable
Class EJBContainer

java.lang.Object
  extended by javax.ejb.embeddable.EJBContainer

public abstract class EJBContainer
extends Object

Used to execute an EJB application in an embeddable container.

Since:
3.1
Version:
$Revision: 107909 $
Author:
Carlo de Wolf

Field Summary
static String APP_NAME
           
static String MODULES
           
static String PROVIDER
           
 
Constructor Summary
EJBContainer()
           
 
Method Summary
abstract  void close()
          Shutdown an embeddable EJBContainer instance.
static EJBContainer createEJBContainer()
          Create and initialize an embeddable EJB container.
static EJBContainer createEJBContainer(Map<?,?> properties)
          Create and initialize an embeddable EJB container with an set of configuration properties and names of modules to be initialized.
abstract  Context getContext()
          Retrieve a naming context for looking up references to session beans executing in the embeddable container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APP_NAME

public static final String APP_NAME
See Also:
Constant Field Values

MODULES

public static final String MODULES
See Also:
Constant Field Values

PROVIDER

public static final String PROVIDER
See Also:
Constant Field Values
Constructor Detail

EJBContainer

public EJBContainer()
Method Detail

close

public abstract void close()
Shutdown an embeddable EJBContainer instance.


createEJBContainer

public static EJBContainer createEJBContainer()
                                       throws EJBException
Create and initialize an embeddable EJB container. JVM classpath is searched for all ejb-jars or exploded ejb-jars in directory format.

Returns:
EJBContainer instance
Throws:
EJBException - Thrown if the container or application could not be successfully initialized.

createEJBContainer

public static EJBContainer createEJBContainer(Map<?,?> properties)
                                       throws EJBException
Create and initialize an embeddable EJB container with an set of configuration properties and names of modules to be initialized.

Parameters:
properties - One or more spec-defined or vendor-specific properties. The spec reserves the prefix "javax.ejb." for spec-defined properties.
Returns:
EJBContainer instance
Throws:
EJBException - Thrown if the container or application could not be successfully initialized.

getContext

public abstract Context getContext()
Retrieve a naming context for looking up references to session beans executing in the embeddable container.

Returns:
The naming context.

EJB 3.1 API 1.0.1.Final

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.