org.objectweb.jonas_ejb.container
Interface Container

All Known Implementing Classes:
JContainer

public interface Container

A Container is what a JOnAS Server can see of a JOnAS Container. It holds all beans coming from a same ejbjar file. There is no possibility to add or remove dynamically beans in a Container since it is build with all its beans. JMX can use this interface, but no specific Jmx classes should be inside the Container. Its management is done outside jonas_ejb.

Author:
Philippe Coq, Jeff Mesnil (security), Christophe Ney (PrincipalFactory), Philippe Durieux (add missing methods), Benjamin Bonnet (max size for thread pool), Florent Benoit : JACC

Method Summary
 BeanFactory getBeanFactory(java.lang.String beanName)
           
 java.lang.ClassLoader getClassLoader()
           
 ContainerNaming getContainerNaming()
           
 java.lang.String getContextId()
          Gets the context ID of this container (for jacc)
 java.lang.String getEarFileName()
          get the name of the ear application containing this container.
 java.lang.String getExternalFileName()
           
 java.lang.String getFileName()
           
 JmsManager getJmsManager()
           
 java.lang.String getName()
           
 PermissionManager getPermissionManager()
          Gets the permission manager
 PrincipalFactory getPrincipalFactory()
           
 org.objectweb.transaction.jta.TransactionManager getTransactionManager()
           
 java.lang.String[] listBeanNames()
           
 void remove()
          Remove the JOnAS container and unregister all beans.
 void setContainerNaming(ContainerNaming naming)
          set the ContainerNaming object
 void setEarFileName(java.lang.String fileName)
          set the name of the ear application containing this container.
 void setJmsManager(JmsManager jms)
          set the JmsManager object
 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 setTransactionManager(org.objectweb.transaction.jta.TransactionManager tm)
          set the Transaction Manager.
 void syncAll(boolean alwaysStore, boolean passivate)
          Synchronize all entity beans
 

Method Detail

listBeanNames

public java.lang.String[] listBeanNames()
Returns:
List of beans hosted in this Container

getName

public java.lang.String getName()
Returns:
name of this Container

getFileName

public java.lang.String getFileName()
Returns:
the file name of the container (.xml or .jar)

getExternalFileName

public java.lang.String getExternalFileName()
Returns:
the external(user) file name of the container

getClassLoader

public java.lang.ClassLoader getClassLoader()
Returns:
the classloader used for this Container

setPrincipalFactory

public void 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

getPrincipalFactory

public PrincipalFactory getPrincipalFactory()
Returns:
the PrincipalFactory of the Container

setContainerNaming

public void setContainerNaming(ContainerNaming naming)
set the ContainerNaming object

Parameters:
naming - the ContainerNaming object

getContainerNaming

public ContainerNaming getContainerNaming()
Returns:
the ContainerNaming object

syncAll

public void syncAll(boolean alwaysStore,
                    boolean passivate)
Synchronize all entity beans

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

setTransactionManager

public void setTransactionManager(org.objectweb.transaction.jta.TransactionManager tm)
set the Transaction Manager.

Parameters:
tm - the Transaction Manager.

getTransactionManager

public org.objectweb.transaction.jta.TransactionManager getTransactionManager()
Returns:
the Transaction Manager

setJmsManager

public void setJmsManager(JmsManager jms)
set the JmsManager object

Parameters:
jms - the JmsManager

getJmsManager

public JmsManager getJmsManager()
Returns:
the JmsManager object

setEarFileName

public void setEarFileName(java.lang.String fileName)
set the name of the ear application containing this container.

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

getEarFileName

public java.lang.String getEarFileName()
get the name of the ear application containing this container.

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

remove

public void remove()
Remove the JOnAS container and unregister all beans.


setSecurity

public void setSecurity(boolean b)
Set the security flag to enable or disable security

Parameters:
b - true or false to enable/disable security

setPermissionManager

public void setPermissionManager(PermissionManager permissionManager)
Set the permission manager object

Parameters:
permissionManager - permission manager object

getPermissionManager

public PermissionManager getPermissionManager()
Gets the permission manager

Returns:
the permission manager

getContextId

public java.lang.String getContextId()
Gets the context ID of this container (for jacc)

Returns:
contextID used for JACC

getBeanFactory

public BeanFactory getBeanFactory(java.lang.String beanName)