public abstract class EJBContainer
extends java.lang.Object
implements java.lang.AutoCloseable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APP_NAME
Standard property name for specifying the application name of
the EJB modules executing within the embeddable container.
|
static java.lang.String |
MODULES
Standard property name for specifying the set of modules to be
initialized.
|
static java.lang.String |
PROVIDER
Standard property name for specifying the embeddable container implementation bootstrap
class.
|
Constructor and Description |
---|
EJBContainer() |
Modifier and Type | Method and Description |
---|---|
abstract void |
close()
Shutdown an embeddable EJBContainer instance.
|
static EJBContainer |
createEJBContainer()
Create and initialize an embeddable EJB container.
|
static EJBContainer |
createEJBContainer(java.util.Map<?,?> properties)
Create and initialize an embeddable EJB container with a
set of configuration properties.
|
abstract javax.naming.Context |
getContext()
Retrieve a naming context for looking up references to session beans
executing in the embeddable container.
|
public static final java.lang.String PROVIDER
public static final java.lang.String MODULES
public static final java.lang.String APP_NAME
<app-name>
portion of the portable
global JNDI name syntax. If this property is not specified, the
<app-name>
portion of the portable
global JNDI name syntax does not apply.public static EJBContainer createEJBContainer()
EJBException
- Thrown if the container or application
could not be successfully initialized.public static EJBContainer createEJBContainer(java.util.Map<?,?> properties)
properties
- Spec-defined and/or vendor-specific
properties. The spec reserves the prefix
"javax.ejb."
for spec-defined properties.EJBException
- Thrown if the container or application
could not be successfully initialized.public abstract javax.naming.Context getContext()
public abstract void close()
close()
in order to free up the resources
associated with the embeddable container.close
in interface java.lang.AutoCloseable