org.objectweb.jonas_ejb.container.JContainer Class Reference

Inherits org.objectweb.jonas_ejb.container.Container.

Inheritance diagram for org.objectweb.jonas_ejb.container.JContainer:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.jonas_ejb.container.JContainer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 JContainer (String name, String extFileName, String file, ClassLoader ld)
synchronized BeanFactory addBean (BeanDesc dd)
BeanFactory getBeanFactory (String ejbName)
int getBeanNb ()
ClassLoader getClassLoader ()
ContainerNaming getContainerNaming ()
Set getDataSourceDependence (String dsName)
String getEarFileName ()
int getEntityBMPNb ()
int getEntityCMPNb ()
String getFileName ()
String getExternalFileName ()
Set getJmsConnectionFactoryDependence (String cfName)
Set getJmsDestinationDependence (String destName)
JmsManager getJmsManager ()
Set getMailFactoryDependence (String mfName)
int getMaxThreadPoolSize ()
int getMessageDrivenNb ()
String getName ()
PermissionManager getPermissionManager ()
PrincipalFactory getPrincipalFactory ()
int getStatefulSessionNb ()
int getStatelessSessionNb ()
int getSwapTime ()
TransactionManager getTransactionManager ()
boolean isInEarCase ()
String[] listBeanNames ()
void registerBF (BeanFactory bf)
void registerBFS (BeanFactory bf)
synchronized void remove ()
void setBeanEnvironment (Context ctx, BeanDesc dd) throws NamingException
void setContainerNaming (ContainerNaming naming)
void setEarFileName (String fileName)
void setJmsManager (JmsManager jms)
void setMaxThreadPoolSize (int sz)
void setPermissionManager (PermissionManager permissionManager)
void setPrincipalFactory (PrincipalFactory pf)
void setSecurity (boolean b)
void setSwapTime (int t)
void setThreadPoolSize (int sz)
void setTransactionManager (TransactionManager tm)
synchronized void syncAll (boolean passivate)
String getContextId ()

Static Public Attributes

final String DEFAULT_FACTORY_CLASS_NAME = "org.objectweb.jonas_ejb.container.JEntityFactory"

Protected Member Functions

void checkSecurity (String ejbName, EJBInvocation ejbInv, boolean inRunAs)

Detailed Description

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.
Author:
Philippe Coq

Jeff Mesnil (Security)

Christophe Ney (Making easier Enhydra integration)

Philippe Durieux (New architecture for local interfaces)

Florent Benoit (Ear service, ejb-link, JACC security)

Ludovic Bert (Ear service, ejb-link)

Benjamin Bonnet (max size for thread pool)

Definition at line 96 of file JContainer.java.


Constructor & Destructor Documentation

org.objectweb.jonas_ejb.container.JContainer.JContainer String  name,
String  extFileName,
String  file,
ClassLoader  ld
 

constructor

Parameters:
name name of the container.
extFileName external file name
file file name (.jar or .xml)
ld the class loader to be used

Definition at line 207 of file JContainer.java.


Member Function Documentation

synchronized BeanFactory org.objectweb.jonas_ejb.container.JContainer.addBean BeanDesc  dd  ) 
 

Adds beans in container. This method is not part of JContainer interface, although it is used by JOnAS Server, because we don't want to get all BeanDesc classes (jonas_ejb.deployment.api) LATER: Replace this by setDeploymentDesc ?

Parameters:
dd The Bean Deployment Descriptor
Returns:
The bean factory created for this bean.
Exceptions:
EJBException 

Definition at line 230 of file JContainer.java.

References org.objectweb.jonas_ejb.deployment.api.EntityJdbcCmp2Desc.getDatasourceJndiName(), org.objectweb.jonas_ejb.deployment.api.BeanDesc.getEjbName(), org.objectweb.jonas_ejb.deployment.api.EntityCmp2Desc.getFactoryClassName(), org.objectweb.jonas_lib.naming.ContainerNaming.getInitialContext(), org.objectweb.jonas_ejb.container.JContainer.getJmsManager(), org.objectweb.jonas.common.JProp.getValue(), and org.objectweb.jonas_ejb.container.JContainer.setSwapTime().

Referenced by org.objectweb.jonas.container.EJBServiceImpl.createContainer().

Here is the call graph for this function:

void org.objectweb.jonas_ejb.container.JContainer.checkSecurity String  ejbName,
EJBInvocation  ejbInv,
boolean  inRunAs
[protected]
 

Check Security. No control for Message Driven Beans

Parameters:
ejbName name of the EJB of which do control
ejbInv object containing security signature of the method, args of method, etc
inRunAs bean calling this method is running in run-as mode or not ?

Definition at line 469 of file JContainer.java.

References org.objectweb.jonas_ejb.container.PermissionManager.checkSecurity().

Referenced by org.objectweb.jonas_ejb.container.JFactory.checkSecurity().

Here is the call graph for this function:

BeanFactory org.objectweb.jonas_ejb.container.JContainer.getBeanFactory String  ejbName  ) 
 

Get the bean factory for the given bean.

Parameters:
ejbName the name of the bean
Returns:
the bean factory for this bean

Definition at line 494 of file JContainer.java.

Referenced by org.objectweb.jonas_ejb.container.JTimerHandle.getTimer(), and org.objectweb.jonas_ejb.container.jorm.JormFactory.init().

int org.objectweb.jonas_ejb.container.JContainer.getBeanNb  ) 
 

Returns:
total Number of Beans

Definition at line 501 of file JContainer.java.

Referenced by org.objectweb.jonas.container.EJBServiceImpl.getTotalCurrentNumberOfBeanType().

ClassLoader org.objectweb.jonas_ejb.container.JContainer.getClassLoader  ) 
 

Returns:
the classloader used for this Container

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 508 of file JContainer.java.

Referenced by org.objectweb.jonas_ejb.container.JFactory.checkJonasVersion(), org.objectweb.jonas_ejb.container.jorm.JormFactory.getJEntitySwitch(), org.objectweb.jonas_ejb.container.jorm.JormFactory.init(), org.objectweb.jonas_ejb.container.JFactory.init(), org.objectweb.jonas_ejb.container.JEntityFactory.init(), org.objectweb.jonas_ejb.container.JFactory.isClassAvailable(), org.objectweb.jonas_ejb.container.JSessionFactory.JSessionFactory(), org.objectweb.jonas_ejb.container.JStatelessFactory.JStatelessFactory(), and org.objectweb.jonas_ejb.container.JFactory.myClassLoader().

ContainerNaming org.objectweb.jonas_ejb.container.JContainer.getContainerNaming  ) 
 

used internally by all the EJB Container classes.

Returns:
the ContainerNaming object

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 522 of file JContainer.java.

Referenced by org.objectweb.jonas_ejb.container.JFactory.init().

String org.objectweb.jonas_ejb.container.JContainer.getContextId  ) 
 

Gets the context ID of this container (for jacc)

Returns:
contextID used for JACC

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 1067 of file JContainer.java.

Referenced by org.objectweb.jonas.container.EJBServiceImpl.createContainer().

Set org.objectweb.jonas_ejb.container.JContainer.getDataSourceDependence String  dsName  ) 
 

Management method used by the EJBServiceImpl MBean. Determine which are the ejbs using a given data source.

Parameters:
dsName JNDI name of the data source
Returns:
a set of Properties describing the beans that use the data source

Definition at line 532 of file JContainer.java.

Referenced by org.objectweb.jonas.container.EJBServiceImpl.getDependence().

String org.objectweb.jonas_ejb.container.JContainer.getEarFileName  ) 
 

get the name of the ear application containing this container.

Returns:
the name of the ear application containing this container.

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 541 of file JContainer.java.

int org.objectweb.jonas_ejb.container.JContainer.getEntityBMPNb  ) 
 

Returns:
int Number of BMP type currently in this container

Definition at line 548 of file JContainer.java.

References org.objectweb.jonas_ejb.container.BeanFactory.getDeploymentDescriptor().

Referenced by org.objectweb.jonas.container.EJBServiceImpl.getTotalCurrentNumberOfBMPType().

Here is the call graph for this function:

int org.objectweb.jonas_ejb.container.JContainer.getEntityCMPNb  ) 
 

Returns:
int Number of CMP type currently in this container

Definition at line 564 of file JContainer.java.

References org.objectweb.jonas_ejb.container.BeanFactory.getDeploymentDescriptor().

Referenced by org.objectweb.jonas.container.EJBServiceImpl.getTotalCurrentNumberOfCMPType().

Here is the call graph for this function:

String org.objectweb.jonas_ejb.container.JContainer.getExternalFileName  ) 
 

Returns:
the external file name of the container

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 587 of file JContainer.java.

Referenced by org.objectweb.jonas_ejb.container.JTimerService.getContainer().

String org.objectweb.jonas_ejb.container.JContainer.getFileName  ) 
 

Returns:
the file name of the container (.xml or .jar)

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 580 of file JContainer.java.

Referenced by org.objectweb.jonas_ejb.container.JFactory.checkJonasVersion().

Set org.objectweb.jonas_ejb.container.JContainer.getJmsConnectionFactoryDependence String  cfName  ) 
 

Management method used by the EJBServiceImpl MBean. Determine which are the ejbs using a JMS Connection Factory.

Parameters:
cfName JNDI name of a JMS Connection Factory.
Returns:
a set of Properties describing the beans that use the JMS Connection Factory.

Definition at line 598 of file JContainer.java.

Referenced by org.objectweb.jonas.container.EJBServiceImpl.getDependence().

Set org.objectweb.jonas_ejb.container.JContainer.getJmsDestinationDependence String  destName  ) 
 

Management method used by the EJBServiceImpl MBean. Determine which are the beans using a JMS destination.

Parameters:
destName JNDI name of a JMS destination
Returns:
a set of Properties describing the ejbs that use the JMS destination.

Definition at line 610 of file JContainer.java.

Referenced by org.objectweb.jonas.container.EJBServiceImpl.getDependence().

JmsManager org.objectweb.jonas_ejb.container.JContainer.getJmsManager  ) 
 

used internally by all the EJB Container classes.

Returns:
the JmsManager object

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 619 of file JContainer.java.

Referenced by org.objectweb.jonas_ejb.container.JContainer.addBean(), and org.objectweb.jonas_ejb.container.JMdbFactory.JMdbFactory().

Set org.objectweb.jonas_ejb.container.JContainer.getMailFactoryDependence String  mfName  ) 
 

Management method used by the EJBServiceImpl MBean. Determine which are the ejbs using a Mail Factory.

Parameters:
mfName JNDI name of a Mail Factory.
Returns:
a set of Properties describing the beans that use the given Mail Factory.

Definition at line 630 of file JContainer.java.

Referenced by org.objectweb.jonas.container.EJBServiceImpl.getDependence().

int org.objectweb.jonas_ejb.container.JContainer.getMaxThreadPoolSize  ) 
 

get the MaxThread pool size.

Returns:
number max of threads in the pool.

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 639 of file JContainer.java.

int org.objectweb.jonas_ejb.container.JContainer.getMessageDrivenNb  ) 
 

Returns:
int Number of MDB type currently in this container

Definition at line 646 of file JContainer.java.

References org.objectweb.jonas_ejb.container.BeanFactory.getDeploymentDescriptor().

Referenced by org.objectweb.jonas.container.EJBServiceImpl.getTotalCurrentNumberOfMDBType().

Here is the call graph for this function:

String org.objectweb.jonas_ejb.container.JContainer.getName  ) 
 

Returns:
name of this Container

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 662 of file JContainer.java.

PermissionManager org.objectweb.jonas_ejb.container.JContainer.getPermissionManager  ) 
 

Gets the permission manager

Returns:
the permission manager

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 670 of file JContainer.java.

Referenced by org.objectweb.jonas_ejb.container.JContext.JContext().

PrincipalFactory org.objectweb.jonas_ejb.container.JContainer.getPrincipalFactory  ) 
 

Returns:
the PrincipalFactory of the Container

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 677 of file JContainer.java.

Referenced by org.objectweb.jonas_ejb.container.JMessageEndpoint.getCallerPrincipal(), and org.objectweb.jonas_ejb.container.JContext.getCallerPrincipal().

int org.objectweb.jonas_ejb.container.JContainer.getStatefulSessionNb  ) 
 

Returns:
int Number of SBF type currently in this container

Definition at line 684 of file JContainer.java.

References org.objectweb.jonas_ejb.container.BeanFactory.getDeploymentDescriptor().

Referenced by org.objectweb.jonas.container.EJBServiceImpl.getTotalCurrentNumberOfSBFType().

Here is the call graph for this function:

int org.objectweb.jonas_ejb.container.JContainer.getStatelessSessionNb  ) 
 

Returns:
int Number of SBL type currently in this container

Definition at line 700 of file JContainer.java.

References org.objectweb.jonas_ejb.container.BeanFactory.getDeploymentDescriptor().

Referenced by org.objectweb.jonas.container.EJBServiceImpl.getTotalCurrentNumberOfSBLType().

Here is the call graph for this function:

int org.objectweb.jonas_ejb.container.JContainer.getSwapTime  ) 
 

Returns:
passivation time out for this container in seconds

Definition at line 716 of file JContainer.java.

References org.objectweb.jonas_ejb.container.Swapper.getSwapperTimeout().

Referenced by org.objectweb.jonas.container.EntityBean.getPassivationTimeOut().

Here is the call graph for this function:

TransactionManager org.objectweb.jonas_ejb.container.JContainer.getTransactionManager  ) 
 

return the Transaction Manager used internally by all the EJB Container classes.

Returns:
the Transaction Manager

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 725 of file JContainer.java.

Referenced by org.objectweb.jonas_ejb.container.JFactory.init().

boolean org.objectweb.jonas_ejb.container.JContainer.isInEarCase  ) 
 

Return true if only if this ejbjar is in an ear file.

Returns:
true if only if this ejbjar is in an ear file.

Definition at line 733 of file JContainer.java.

String [] org.objectweb.jonas_ejb.container.JContainer.listBeanNames  ) 
 

Returns:
List of beans hosted in this Container

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 744 of file JContainer.java.

void org.objectweb.jonas_ejb.container.JContainer.registerBF BeanFactory  bf  ) 
 

register a BeanFactory

Parameters:
bf The Bean Factory to be registered

Definition at line 756 of file JContainer.java.

References org.objectweb.jonas_ejb.container.Swapper.addBeanFactory().

Referenced by org.objectweb.jonas_ejb.container.JEntityFactory.createNewInstance().

Here is the call graph for this function:

void org.objectweb.jonas_ejb.container.JContainer.registerBFS BeanFactory  bf  ) 
 

register a BeanFactory for Sync

Parameters:
bf The Bean Factory to be registered

Definition at line 764 of file JContainer.java.

References org.objectweb.jonas_ejb.container.Swapper.addBeanFactorySync().

Referenced by org.objectweb.jonas_ejb.container.JEntityFactory.synchronizeEntities().

Here is the call graph for this function:

synchronized void org.objectweb.jonas_ejb.container.JContainer.remove  ) 
 

Remove the JOnAS container and unregister all beans.

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 771 of file JContainer.java.

References org.objectweb.jonas_ejb.container.BeanFactory.getEJBName(), org.objectweb.jonas_ejb.container.BeanFactory.stop(), org.objectweb.jonas_ejb.container.Swapper.stopIt(), and org.objectweb.jonas_ejb.container.JContainer.syncAll().

Here is the call graph for this function:

void org.objectweb.jonas_ejb.container.JContainer.setBeanEnvironment Context  ctx,
BeanDesc  dd
throws NamingException
 

Set the bean environment

Parameters:
ctx Context for this bean
dd Bean Deployment Descriptor
Exceptions:
NamingException if could not rebind objects

Definition at line 817 of file JContainer.java.

References org.objectweb.jonas_lib.deployment.api.EjbLocalRefDesc.getEjbRefName(), org.objectweb.jonas_lib.deployment.api.EjbRefDesc.getEjbRefName(), org.objectweb.jonas_lib.deployment.api.EjbLocalRefDesc.getJndiLocalName(), org.objectweb.jonas_lib.deployment.api.MessageDestinationRefDesc.getJndiName(), org.objectweb.jonas_lib.deployment.api.EjbRefDesc.getJndiName(), org.objectweb.jonas_lib.deployment.api.ResourceEnvRefDesc.getJndiName(), org.objectweb.jonas_lib.deployment.api.ResourceRefDesc.getJndiName(), org.objectweb.jonas_lib.deployment.api.MessageDestinationRefDesc.getMessageDestinationRefName(), org.objectweb.jonas_lib.deployment.api.ResourceEnvRefDesc.getName(), org.objectweb.jonas_lib.deployment.api.ResourceRefDesc.getName(), org.objectweb.jonas_lib.deployment.api.EnvEntryDesc.getName(), org.objectweb.jonas.ws.JServiceFactory.getServiceReference(), org.objectweb.jonas_ws.deployment.api.ServiceRefDesc.getServiceRefName(), org.objectweb.jonas_lib.deployment.api.ResourceRefDesc.getTypeName(), org.objectweb.jonas_lib.deployment.api.EnvEntryDesc.getValue(), and org.objectweb.jonas_lib.naming.ContainerNaming.setComponentContext().

Referenced by org.objectweb.jonas_ejb.container.JFactory.init().

Here is the call graph for this function:

void org.objectweb.jonas_ejb.container.JContainer.setContainerNaming ContainerNaming  naming  ) 
 

set the ContainerNaming object Called by the EJB Server when starting the service.

Parameters:
naming the ContainerNaming object

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 961 of file JContainer.java.

Referenced by org.objectweb.jonas.container.EJBServiceImpl.createContainer().

void org.objectweb.jonas_ejb.container.JContainer.setEarFileName String  fileName  ) 
 

set the name of the ear application containing this container.

Parameters:
fileName the name of the ear application containing this container.

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 970 of file JContainer.java.

Referenced by org.objectweb.jonas.container.EJBServiceImpl.createContainer().

void org.objectweb.jonas_ejb.container.JContainer.setJmsManager JmsManager  jms  ) 
 

set the JmsManager object Called by the EJB Server when starting ths service.

Parameters:
jms the JmsManager

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 979 of file JContainer.java.

Referenced by org.objectweb.jonas.container.EJBServiceImpl.createContainer().

void org.objectweb.jonas_ejb.container.JContainer.setMaxThreadPoolSize int  sz  ) 
 

set the MaxThread pool size.

Parameters:
sz number max of threads in the pool.

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 987 of file JContainer.java.

Referenced by org.objectweb.jonas.container.EJBServiceImpl.createContainer().

void org.objectweb.jonas_ejb.container.JContainer.setPermissionManager PermissionManager  permissionManager  ) 
 

Set the permission manager object

Parameters:
permissionManager permission manager object

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 995 of file JContainer.java.

Referenced by org.objectweb.jonas.container.EJBServiceImpl.createContainer().

void org.objectweb.jonas_ejb.container.JContainer.setPrincipalFactory PrincipalFactory  pf  ) 
 

Set the PrincipalFactory. This factory can be JOnAS Server dependant. The Container makes no assumption on how to get the Principal.

Parameters:
pf the PrincipalFactory

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 1004 of file JContainer.java.

Referenced by org.objectweb.jonas.container.EJBServiceImpl.createContainer().

void org.objectweb.jonas_ejb.container.JContainer.setSecurity boolean  b  ) 
 

Set the security flag to enable or disable security

Parameters:
b true or false to enable/disable security

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 1012 of file JContainer.java.

Referenced by org.objectweb.jonas.container.EJBServiceImpl.createContainer().

void org.objectweb.jonas_ejb.container.JContainer.setSwapTime int  t  ) 
 

Take into account the swapping time for the bean.

Parameters:
t time in seconds (t = 0 no time out)

Definition at line 1020 of file JContainer.java.

References org.objectweb.jonas_ejb.container.Swapper.setSwapperTimeout().

Referenced by org.objectweb.jonas_ejb.container.JContainer.addBean(), and org.objectweb.jonas.container.EntityBean.setPassivationTimeOut().

Here is the call graph for this function:

void org.objectweb.jonas_ejb.container.JContainer.setThreadPoolSize int  sz  ) 
 

set the Thread pool size.

Parameters:
sz number of threads in the pool.

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 1031 of file JContainer.java.

Referenced by org.objectweb.jonas.container.EJBServiceImpl.createContainer().

void org.objectweb.jonas_ejb.container.JContainer.setTransactionManager TransactionManager  tm  ) 
 

set the Transaction Manager. Called by the EJB Server when starting the service.

Parameters:
tm the Transaction Manager.

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 1040 of file JContainer.java.

Referenced by org.objectweb.jonas.container.EJBServiceImpl.createContainer().

synchronized void org.objectweb.jonas_ejb.container.JContainer.syncAll boolean  passivate  ) 
 

Try to passivate all entity bean instances

Parameters:
passivate true if bean instances will be released after having been written on storage.

Implements org.objectweb.jonas_ejb.container.Container.

Definition at line 1049 of file JContainer.java.

References org.objectweb.jonas_ejb.container.BeanFactory.reduceCache(), and org.objectweb.jonas_ejb.container.BeanFactory.sync().

Referenced by org.objectweb.jonas_ejb.container.JContainer.remove(), org.objectweb.jonas_ejb.container.Swapper.run(), and org.objectweb.jonas.container.EJBServiceImpl.syncAllEntities().

Here is the call graph for this function:


Member Data Documentation

final String org.objectweb.jonas_ejb.container.JContainer.DEFAULT_FACTORY_CLASS_NAME = "org.objectweb.jonas_ejb.container.JEntityFactory" [static]
 

This class is the default factory class name used for the Entity bean.

Definition at line 101 of file JContainer.java.


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:10:02 2005 for JOnAS by  doxygen 1.3.9.1