|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jonas_ejb.container.JContainer
This class represents an EJB container. A container is where an enterprise Bean object lives. All beans from a same ejb-jar file are installed in a single container. For each EJB installed, the container provides a factory and makes it available in the JNDI name space. The JContainer basically manages a set of BeanFactory objects.
Field Summary | |
static java.lang.String |
DEFAULT_FACTORY_CLASS_NAME
This class is the default factory class name used for the Entity bean. |
java.lang.String |
fileName
|
java.lang.String |
myname
|
JStatefulPool |
statefulSessionPool
|
Constructor Summary | |
JContainer(java.lang.String name,
java.lang.String file,
java.lang.ClassLoader ld)
constructor |
Method Summary | |
BeanFactory |
addBean(BeanDesc dd)
Adds beans in container. |
protected void |
checkSecurity(java.lang.String ejbName,
java.lang.String methodSignature)
Check Security. |
BeanFactory |
getBeanFactory(java.lang.String ejbName)
Get the bean factory for the given bean. |
int |
getBeanNb()
|
java.lang.ClassLoader |
getClassLoader()
|
ContainerNaming |
getContainerNaming()
used internally by all the EJB Container classes. |
java.util.Set |
getDataSourceDependence(java.lang.String dsName)
Management method used by the EJBServiceImpl MBean. |
java.lang.String |
getEarFileName()
get the name of the ear application containing this container. |
int |
getEntityBMPNb()
|
int |
getEntityCMPNb()
|
java.lang.String |
getFileName()
|
java.util.Set |
getJmsConnectionFactoryDependence(java.lang.String cfName)
Management method used by the EJBServiceImpl MBean. |
java.util.Set |
getJmsDestinationDependence(java.lang.String destName)
Management method used by the EJBServiceImpl MBean. |
JmsManager |
getJmsManager()
used internally by all the EJB Container classes. |
java.util.Set |
getMailFactoryDependence(java.lang.String mfName)
Management method used by the EJBServiceImpl MBean. |
int |
getMaxThreadPoolSize()
get the MaxThread pool size. |
int |
getMessageDrivenNb()
|
java.lang.String |
getName()
|
PermissionManager |
getPermissionManager()
Gets the permission manager |
PrincipalFactory |
getPrincipalFactory()
|
int |
getStatefulSessionNb()
|
int |
getStatelessSessionNb()
|
long |
getSwapTime()
|
javax.transaction.TransactionManager |
getTransactionManager()
return the Transaction Manager used internally by all the EJB Container classes. |
boolean |
isInEarCase()
Return true if only if this ejbjar is in an ear file. |
java.lang.String[] |
listBeanNames()
|
void |
registerBF(BeanFactory bf)
register a BeanFactory |
void |
registerBFS(BeanFactory bf)
register a BeanFactory for Sync |
void |
remove()
Remove the JOnAS container and unregister all beans. |
void |
setBeanEnvironment(javax.naming.Context ctx,
BeanDesc dd)
Set the bean environment |
void |
setContainerNaming(ContainerNaming naming)
set the ContainerNaming object Called by the EJB Server when starting the service. |
void |
setEarFileName(java.lang.String fileName)
set the name of the ear application containing this container. |
void |
setJmsManager(JmsManager jms)
set the JmsManager object Called by the EJB Server when starting ths service. |
void |
setMaxThreadPoolSize(int sz)
set the MaxThread pool size. |
void |
setPermissionManager(PermissionManager permissionManager)
Set the permission manager object |
void |
setPrincipalFactory(PrincipalFactory pf)
Set the PrincipalFactory. |
void |
setSecurity(boolean b)
Set the security flag to enable or disable security |
void |
setSwapTime(int t)
Take into account the swapping time for the bean. |
void |
setThreadPoolSize(int sz)
set the Thread pool size. |
void |
setTransactionManager(javax.transaction.TransactionManager tm)
set the Transaction Manager. |
void |
syncAll(boolean passivate)
Try to passivate all entity bean instances |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_FACTORY_CLASS_NAME
public java.lang.String myname
public java.lang.String fileName
public JStatefulPool statefulSessionPool
Constructor Detail |
public JContainer(java.lang.String name, java.lang.String file, java.lang.ClassLoader ld)
name
- name of the container.file
- file name (.jar or .xml)ld
- the class loader to be usedMethod Detail |
public java.lang.String[] listBeanNames()
listBeanNames
in interface Container
public java.lang.String getName()
getName
in interface Container
public java.lang.String getFileName()
getFileName
in interface Container
public void setSecurity(boolean b)
setSecurity
in interface Container
b
- true or false to enable/disable securitypublic java.lang.ClassLoader getClassLoader()
getClassLoader
in interface Container
public void setPrincipalFactory(PrincipalFactory pf)
setPrincipalFactory
in interface Container
pf
- the PrincipalFactorypublic PrincipalFactory getPrincipalFactory()
getPrincipalFactory
in interface Container
public void setContainerNaming(ContainerNaming naming)
setContainerNaming
in interface Container
naming
- the ContainerNaming objectpublic ContainerNaming getContainerNaming()
getContainerNaming
in interface Container
public void setThreadPoolSize(int sz)
setThreadPoolSize
in interface Container
sz
- number of threads in the pool.public void setMaxThreadPoolSize(int sz)
setMaxThreadPoolSize
in interface Container
sz
- number max of threads in the pool.public int getMaxThreadPoolSize()
getMaxThreadPoolSize
in interface Container
public void syncAll(boolean passivate)
syncAll
in interface Container
passivate
- true if bean instances will be released after
having been written on storage.public void setTransactionManager(javax.transaction.TransactionManager tm)
setTransactionManager
in interface Container
tm
- the Transaction Manager.public javax.transaction.TransactionManager getTransactionManager()
getTransactionManager
in interface Container
public void setJmsManager(JmsManager jms)
setJmsManager
in interface Container
jms
- the JmsManagerpublic JmsManager getJmsManager()
getJmsManager
in interface Container
public void setEarFileName(java.lang.String fileName)
setEarFileName
in interface Container
fileName
- the name of the ear application containing this
container.public java.lang.String getEarFileName()
getEarFileName
in interface Container
public void remove()
remove
in interface Container
public BeanFactory addBean(BeanDesc dd)
dd
- The Bean Deployment Descriptor
javax.ejb.EJBException
public BeanFactory getBeanFactory(java.lang.String ejbName)
ejbName
- the name of the bean
public int getBeanNb()
public int getEntityBMPNb()
public int getEntityCMPNb()
public int getStatefulSessionNb()
public int getStatelessSessionNb()
public int getMessageDrivenNb()
public long getSwapTime()
public java.util.Set getDataSourceDependence(java.lang.String dsName)
dsName
- JNDI name of the data source
public java.util.Set getJmsDestinationDependence(java.lang.String destName)
destName
- JNDI name of a JMS destination
public java.util.Set getJmsConnectionFactoryDependence(java.lang.String cfName)
cfName
- JNDI name of a JMS Connection Factory.
public java.util.Set getMailFactoryDependence(java.lang.String mfName)
mfName
- JNDI name of a Mail Factory.
public void registerBF(BeanFactory bf)
bf
- The Bean Factory to be registeredpublic void registerBFS(BeanFactory bf)
bf
- The Bean Factory to be registeredpublic void setSwapTime(int t)
t
- time in seconds (t = 0 no time out)public void setBeanEnvironment(javax.naming.Context ctx, BeanDesc dd) throws javax.naming.NamingException
ctx
- Context for this beandd
- Bean Deployment Descriptor
javax.naming.NamingException
- if could not rebind objectsprotected void checkSecurity(java.lang.String ejbName, java.lang.String methodSignature)
ejbName
- name of the EJB of which do controlmethodSignature
- The method security signaturepublic void setPermissionManager(PermissionManager permissionManager)
setPermissionManager
in interface Container
permissionManager
- permission manager objectpublic boolean isInEarCase()
public PermissionManager getPermissionManager()
getPermissionManager
in interface Container
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |