|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jonas.lib.ejb21.JContainer
public class 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 String |
DEFAULT_FACTORY_CLASS_NAME
This class is the default factory class name used for the Entity bean. |
| Constructor Summary | |
|---|---|
JContainer(String name,
String extFileName,
String file,
ClassLoader ld,
DeploymentDesc dd,
CmiService cmiService,
HaService haService,
IJAXRPCService jaxrpService,
MBeanServer jmxserver,
ResourceService resService,
String workDirectory)
constructor |
|
| Method Summary | |
|---|---|
BeanFactory |
addBean(BeanDesc dd)
Adds beans in container. |
protected void |
checkSecurity(String ejbName,
EJBInvocation ejbInv,
boolean inRunAs)
Check Security. |
BeanFactory |
getBeanFactory(String ejbName)
Get the bean factory for the given bean. |
int |
getBeanNb()
|
ClassLoader |
getClassLoader()
|
CmiService |
getCmiService()
|
JComponentContextFactory |
getComponentContextFactory()
|
JNamingManager |
getContainerNaming()
used internally by all the EJB Container classes. |
String |
getContextId()
Gets the context ID of this container (for jacc) |
Set<Properties> |
getDataSourceDependence(String dsName)
Management method used by the EJBServiceImpl MBean. |
String |
getEarFileName()
get the name of the ear application containing this container. |
int |
getEntityBMPNb()
|
int |
getEntityCMPNb()
|
String |
getExternalFileName()
|
String |
getFileName()
|
HaService |
getHaService()
|
String |
getJavaEEApplicationName()
Gets the Java EE Application Name of this container. |
Set<Properties> |
getJmsConnectionFactoryDependence(String cfName)
Management method used by the EJBServiceImpl MBean. |
Set<Properties> |
getJmsDestinationDependence(String destName)
Management method used by the EJBServiceImpl MBean. |
JmsManager |
getJmsManager()
used internally by all the EJB Container classes. |
RdbMappingBuilder |
getJormMapping()
|
org.ow2.util.event.api.IEventDispatcher |
getLifeCycleDispatcher()
|
Set<Properties> |
getMailFactoryDependence(String mfName)
Management method used by the EJBServiceImpl MBean. |
int |
getMessageDrivenNb()
|
String |
getName()
|
PermissionManager |
getPermissionManager()
Gets the permission manager |
PrincipalFactory |
getPrincipalFactory()
|
int |
getStatefulSessionNb()
|
int |
getStatelessSessionNb()
|
String |
getTmpDirName()
|
TransactionManager |
getTransactionManager()
return the Transaction Manager used internally by all the EJB Container classes. |
WorkManager |
getWorkManager()
|
boolean |
isInEarCase()
Return true if only if this ejbjar is in an ear file. |
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(Context ctx,
BeanDesc dd)
Set the bean environment |
void |
setComponentContextFactory(JComponentContextFactory factory)
Set the JComponentContextFactory instance. |
void |
setContainerNaming(JNamingManager naming)
set the ContainerNaming object Called by the EJB Server when starting the service. |
void |
setEarFileName(String fileName)
set the name of the ear application containing this container. |
void |
setJavaEEApplicationName(String javaEEApplicationName)
Sets the Java EE Application Name of this container. |
void |
setJmsManager(JmsManager jms)
set the JmsManager object Called by the EJB Server when starting ths service. |
void |
setLifeCycleDispatcher(org.ow2.util.event.api.IEventDispatcher lifeCycleDispatcher)
|
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 |
setTransactionManager(TransactionManager tm)
set the Transaction Manager. |
void |
setWorkManager(WorkManager wm)
set the Work Manager. |
void |
storeAll(Transaction tx)
Try to store all entity bean instances modified in the transaction this method has been introduced to fix bug #305711 it's, may be, bad for performance |
void |
syncAll(boolean store,
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 String DEFAULT_FACTORY_CLASS_NAME
| Constructor Detail |
|---|
public JContainer(String name,
String extFileName,
String file,
ClassLoader ld,
DeploymentDesc dd,
CmiService cmiService,
HaService haService,
IJAXRPCService jaxrpService,
MBeanServer jmxserver,
ResourceService resService,
String workDirectory)
name - name of the container.extFileName - external file namefile - file name (.jar or .xml)ld - the class loader to be usedcmiService - the reference on CMI service (can be null)haService - the reference on HA service (can be null)| Method Detail |
|---|
public String getTmpDirName()
public RdbMappingBuilder getJormMapping()
public BeanFactory addBean(BeanDesc dd)
dd - The Bean Deployment Descriptor
EJBException
protected void checkSecurity(String ejbName,
EJBInvocation ejbInv,
boolean inRunAs)
ejbName - name of the EJB of which do controlejbInv - object containing security signature of the method, args of
method, etcinRunAs - bean calling this method is running in run-as mode or not ?public BeanFactory getBeanFactory(String ejbName)
getBeanFactory in interface ContainerejbName - the name of the bean
public int getBeanNb()
public ClassLoader getClassLoader()
getClassLoader in interface Containerpublic JNamingManager getContainerNaming()
getContainerNaming in interface Containerpublic Set<Properties> getDataSourceDependence(String dsName)
dsName - JNDI name of the data source
public String getEarFileName()
getEarFileName in interface Containerpublic int getEntityBMPNb()
public int getEntityCMPNb()
public String getFileName()
getFileName in interface Containerpublic String getExternalFileName()
getExternalFileName in interface Containerpublic Set<Properties> getJmsConnectionFactoryDependence(String cfName)
cfName - JNDI name of a JMS Connection Factory.
public Set<Properties> getJmsDestinationDependence(String destName)
destName - JNDI name of a JMS destination
public JmsManager getJmsManager()
getJmsManager in interface Containerpublic Set<Properties> getMailFactoryDependence(String mfName)
mfName - JNDI name of a Mail Factory.
public int getMessageDrivenNb()
public String getName()
getName in interface Containerpublic PermissionManager getPermissionManager()
getPermissionManager in interface Containerpublic PrincipalFactory getPrincipalFactory()
getPrincipalFactory in interface Containerpublic int getStatefulSessionNb()
public int getStatelessSessionNb()
public TransactionManager getTransactionManager()
getTransactionManager in interface Containerpublic boolean isInEarCase()
public String[] listBeanNames()
listBeanNames in interface Containerpublic void registerBF(BeanFactory bf)
bf - The Bean Factory to be registeredpublic void registerBFS(BeanFactory bf)
bf - The Bean Factory to be registeredpublic void remove()
remove in interface Container
public void setBeanEnvironment(Context ctx,
BeanDesc dd)
throws NamingException
ctx - Context for this beandd - Bean Deployment Descriptor
NamingException - if could not rebind objectspublic void setContainerNaming(JNamingManager naming)
setContainerNaming in interface Containernaming - the ContainerNaming objectpublic void setEarFileName(String fileName)
setEarFileName in interface ContainerfileName - the name of the ear application containing this
container.public void setJmsManager(JmsManager jms)
setJmsManager in interface Containerjms - the JmsManagerpublic void setPermissionManager(PermissionManager permissionManager)
setPermissionManager in interface ContainerpermissionManager - permission manager objectpublic void setPrincipalFactory(PrincipalFactory pf)
setPrincipalFactory in interface Containerpf - the PrincipalFactorypublic void setSecurity(boolean b)
setSecurity in interface Containerb - true or false to enable/disable securitypublic void setSwapTime(int t)
t - time in seconds (t = 0 no time out)public void setWorkManager(WorkManager wm)
wm - the Work Manager.public WorkManager getWorkManager()
public void setTransactionManager(TransactionManager tm)
setTransactionManager in interface Containertm - the Transaction Manager.
public void syncAll(boolean store,
boolean passivate)
syncAll in interface Containerstore - True if store even if passivationTimeout not reachedpassivate - true if bean instances will be released after having
been written on storage.public String getContextId()
getContextId in interface Containerpublic void storeAll(Transaction tx)
tx - public JComponentContextFactory getComponentContextFactory()
getComponentContextFactory in interface ContainerJComponentContextFactory object.public void setComponentContextFactory(JComponentContextFactory factory)
JComponentContextFactory instance.
setComponentContextFactory in interface Containerfactory - the JComponentContextFactory instancepublic HaService getHaService()
public CmiService getCmiService()
public String getJavaEEApplicationName()
getJavaEEApplicationName in interface Containerpublic void setJavaEEApplicationName(String javaEEApplicationName)
setJavaEEApplicationName in interface ContainerjavaEEApplicationName - the Java EE Application namepublic org.ow2.util.event.api.IEventDispatcher getLifeCycleDispatcher()
public void setLifeCycleDispatcher(org.ow2.util.event.api.IEventDispatcher lifeCycleDispatcher)
lifeCycleDispatcher - the lifeCycleDispatcher to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||