- java.lang.Object
-
- javax.ejb.embeddable.EJBContainer
-
- All Implemented Interfaces:
- AutoCloseable
public abstract class EJBContainer extends Object implements AutoCloseable
Used to execute an EJB application in an embeddable container.- Since:
- EJB 3.1
-
-
Field Summary
Fields Modifier and Type Field and Description static String
APP_NAME
Standard property name for specifying the application name of the EJB modules executing within the embeddable container.static String
MODULES
Standard property name for specifying the set of modules to be initialized.static String
PROVIDER
Standard property name for specifying the embeddable container implementation bootstrap class.
-
Constructor Summary
Constructors Constructor and Description EJBContainer()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 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(Map<?,?> properties)
Create and initialize an embeddable EJB container with a set of configuration properties.abstract Context
getContext()
Retrieve a naming context for looking up references to session beans executing in the embeddable container.
-
-
-
Field Detail
-
PROVIDER
public static final String PROVIDER
Standard property name for specifying the embeddable container implementation bootstrap class. Property value is a fully-qualified class name.- See Also:
- Constant Field Values
-
MODULES
public static final String MODULES
Standard property name for specifying the set of modules to be initialized. Property value is one of the following :- a single module name String from the JVM classpath
- a String[] array of module names from the JVM classpath
- a java.io.File representing an ejb-jar or exploded ejb-jar directory
- a java.io.File array, each element of which represents an ejb-jar or exploded ejb-jar directory
- See Also:
- Constant Field Values
-
APP_NAME
public static final String APP_NAME
Standard property name for specifying the application name of the EJB modules executing within the embeddable container. If specified, the property value applies to the<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.- See Also:
- Constant Field Values
-
-
Method Detail
-
createEJBContainer
public static EJBContainer createEJBContainer()
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)
Create and initialize an embeddable EJB container with a set of configuration properties.- Parameters:
properties
- Spec-defined and/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:
- naming context
-
close
public abstract void close()
Shutdown an embeddable EJBContainer instance. Embeddable applications should always callclose()
in order to free up the resources associated with the embeddable container.- Specified by:
close
in interfaceAutoCloseable
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
21/08/2025 19:10:06 Cette version de la page est en cache (à la date du 21/08/2025 19:10:06) afin d'accélérer le traitement.Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.
Document créé le 11/06/2005, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/ejb/embeddable/ejbcontainer.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.