|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.container.JContainer3
public class JContainer3
Defines an EJB3 container.
Field Summary | |
---|---|
private boolean |
available
Container available. |
private java.lang.ClassLoader |
classLoader
Classloader use to manage this archive. |
private EZBContainerConfig |
configuration
JContainer Configuration. |
private Deployment |
deployment
Deployment for the managed archive. |
private IEJBJarInfo |
ejbJarInfo
Info on an ejb-jar file. |
private java.util.Map<java.lang.String,Factory> |
factories
Map of managed ejb3 factories. |
private java.lang.String |
id
Id of this container. |
private static JLog |
logger
Logger. |
private EZBPermissionManager |
permissionManager
PermissionManager for the security permissions. |
private EZBPersistenceUnitManager |
persistenceUnitManager
Persistence manager object which manages all persistence-unit associated to this container. |
Constructor Summary | |
---|---|
protected |
JContainer3()
Default constructor. |
|
JContainer3(EZBContainerConfig config)
Build a new container on the given archive. |
Method Summary | |
---|---|
private void |
bindLocalHome(java.lang.String itf,
java.lang.Integer embeddedId,
java.lang.String containerID,
java.lang.String factoryName,
ClassAnnotationMetadata bean)
Bind into registry the EJB Local Home. |
private void |
bindLocalItf(java.lang.String itf,
java.lang.Integer embeddedId,
java.lang.String containerID,
java.lang.String factoryName,
ClassAnnotationMetadata bean)
Bind into registry interfaces for a bean making them available from clients. |
private void |
bindRemoteHome(java.lang.String remoteHome,
java.lang.String containerID,
java.lang.String factoryName,
ClassAnnotationMetadata bean)
Bind into registry the home interface for a bean making it available from clients. |
private void |
bindRemoteItf(java.lang.String itf,
java.lang.String containerID,
java.lang.String factoryName,
ClassAnnotationMetadata bean)
Bind into registry interfaces for a bean making them available from clients. |
private void |
createBeanFactories()
Create the factories of the beans (session and MDB). |
private Factory |
createMessageDrivenBeanFactory(ClassAnnotationMetadata messageDrivenBean)
Creates the given message driven bean factory. |
private Factory |
createSessionBeanFactory(ClassAnnotationMetadata sessionBean)
Creates the given session bean and bind it. |
EZBArchive |
getArchive()
Gets the archive used by this container. |
private java.util.List<EZBContainerLifeCycleCallback> |
getCallbacksLifeCycle()
|
java.lang.ClassLoader |
getClassLoader()
Gets the classloader. |
EZBContainerConfig |
getConfiguration()
|
private EZBContainerCallbackInfo |
getContainer3CallbackInfo()
Gets information on the container that can be given to container callbacks. |
EZBServer |
getEmbedded()
Gets the parent EZBServer instance. |
java.util.Collection<Factory> |
getFactories()
|
Factory |
getFactory(java.lang.String factoryName)
Gets a factory with its given name. |
java.lang.String |
getId()
Gets the id of this container. |
java.lang.String |
getName()
Gets the name of this container. |
EZBPermissionManager |
getPermissionManager()
Gets the permission manager (that manages EJB permissions). |
EZBPersistenceUnitManager |
getPersistenceUnitManager()
Gets the persistence manager object which manages all persistence-unit associated to this container. |
boolean |
isAvailable()
Check if the container is available or not. |
static java.lang.String |
jndiNameEncode(java.lang.String beanClassName,
java.lang.String itfName,
java.lang.String mode)
Encode a given name by prefixing it with given mode. |
void |
setClassLoader(java.lang.ClassLoader classLoader)
Sets the classloader. |
protected void |
setContainerConfig(EZBContainerConfig config)
Configure ths JConatiner. |
void |
setPermissionManager(EZBPermissionManager ezbPermissionManager)
Sets the permission manager (that manages EJB permissions). |
void |
setPersistenceUnitManager(EZBPersistenceUnitManager persistenceUnitManager)
Sets the persistence manager object which manages all persistence-unit associated to this container. |
void |
start()
Start this container. |
void |
stop()
Stop this container. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static JLog logger
private java.lang.String id
private java.lang.ClassLoader classLoader
private Deployment deployment
private boolean available
private java.util.Map<java.lang.String,Factory> factories
private EZBPersistenceUnitManager persistenceUnitManager
private EZBContainerConfig configuration
private EZBPermissionManager permissionManager
private IEJBJarInfo ejbJarInfo
Constructor Detail |
---|
public JContainer3(EZBContainerConfig config)
config
- The JContainer configuration storing the archive (jar file
or exploded).protected JContainer3()
Method Detail |
---|
protected void setContainerConfig(EZBContainerConfig config)
config
- ContainerConfiguration instance.public java.lang.String getId()
getId
in interface EZBManageableContainer
public void start() throws EZBContainerException
start
in interface EZBManageableContainer
EZBContainerException
- if starting fails.private void createBeanFactories() throws EZBContainerException
EZBContainerException
- if binding fails.private Factory createMessageDrivenBeanFactory(ClassAnnotationMetadata messageDrivenBean) throws EZBContainerException
messageDrivenBean
- the message driven bean class metadata.
EZBContainerException
- if the message driven bean cannot be
created.private Factory createSessionBeanFactory(ClassAnnotationMetadata sessionBean) throws EZBContainerException
sessionBean
- the session bean class metadata.
EZBContainerException
- if the session bean cannot be createdpublic void stop()
stop
in interface EZBManageableContainer
private EZBContainerCallbackInfo getContainer3CallbackInfo()
private void bindRemoteHome(java.lang.String remoteHome, java.lang.String containerID, java.lang.String factoryName, ClassAnnotationMetadata bean) throws EZBContainerException
remoteHome
- the name of the remote home interface that object will have.containerID
- the ID of the container.factoryName
- the name of the factory.bean
- the bean class associated to given interface.
EZBContainerException
- if interface cannot be loaded or if the
bind failsprivate void bindLocalHome(java.lang.String itf, java.lang.Integer embeddedId, java.lang.String containerID, java.lang.String factoryName, ClassAnnotationMetadata bean) throws EZBContainerException
itf
- the name of the interface that object will have.embeddedId
- the ID of the embedded server.containerID
- the ID of the container.factoryName
- the name of the factory.bean
- the bean class associated to given interface.
EZBContainerException
- if interface cannot be loaded or if the
bind failsprivate void bindLocalItf(java.lang.String itf, java.lang.Integer embeddedId, java.lang.String containerID, java.lang.String factoryName, ClassAnnotationMetadata bean) throws EZBContainerException
itf
- the name of the interface that object will have.embeddedId
- the ID of the embedded server.containerID
- the ID of the container.factoryName
- the name of the factory.bean
- the bean class associated to given interface.
EZBContainerException
- if interface cannot be loaded or if the
bind failsprivate void bindRemoteItf(java.lang.String itf, java.lang.String containerID, java.lang.String factoryName, ClassAnnotationMetadata bean) throws EZBContainerException
itf
- the name of the interface that object will have.containerID
- the ID of the container.factoryName
- the name of the factory.bean
- the bean class associated to given interface.
EZBContainerException
- if interface cannot be loaded or if the
bind failspublic Factory getFactory(java.lang.String factoryName)
getFactory
in interface EZBContainer
factoryName
- the factory name.
public java.util.Collection<Factory> getFactories()
public java.lang.String getName()
getName
in interface EZBManageableContainer
public java.lang.ClassLoader getClassLoader()
getClassLoader
in interface EZBContainer
public EZBArchive getArchive()
getArchive
in interface EZBManageableContainer
public EZBServer getEmbedded()
private java.util.List<EZBContainerLifeCycleCallback> getCallbacksLifeCycle()
public boolean isAvailable()
isAvailable
in interface EZBManageableContainer
public EZBPersistenceUnitManager getPersistenceUnitManager()
getPersistenceUnitManager
in interface EZBContainer
public static java.lang.String jndiNameEncode(java.lang.String beanClassName, java.lang.String itfName, java.lang.String mode)
beanClassName
- name of the bean class.itfName
- name of the interface.mode
- local/remote, etc
public void setClassLoader(java.lang.ClassLoader classLoader)
setClassLoader
in interface EZBContainer
classLoader
- to be used by the containerpublic void setPersistenceUnitManager(EZBPersistenceUnitManager persistenceUnitManager)
setPersistenceUnitManager
in interface EZBContainer
persistenceUnitManager
- persistence unit manager object to set.public EZBContainerConfig getConfiguration()
getConfiguration
in interface EZBContainer
public EZBPermissionManager getPermissionManager()
getPermissionManager
in interface EZBContainer
public void setPermissionManager(EZBPermissionManager ezbPermissionManager)
setPermissionManager
in interface EZBContainer
ezbPermissionManager
- the EasyBeans permission manager.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |