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

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

getName

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

getFileName

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

getExternalFileName

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

getClassLoader

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

setPrincipalFactory

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

PrincipalFactory getPrincipalFactory()
Returns:
the PrincipalFactory of the Container

setContainerNaming

void setContainerNaming(ContainerNaming naming)
set the ContainerNaming object

Parameters:
naming - the ContainerNaming object

getContainerNaming

ContainerNaming getContainerNaming()
Returns:
the ContainerNaming object

syncAll

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

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

Parameters:
tm - the Transaction Manager.

getTransactionManager

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

setJmsManager

void setJmsManager(JmsManager jms)
set the JmsManager object

Parameters:
jms - the JmsManager

getJmsManager

JmsManager getJmsManager()
Returns:
the JmsManager object

setEarFileName

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

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

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


setSecurity

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

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

setPermissionManager

void setPermissionManager(PermissionManager permissionManager)
Set the permission manager object

Parameters:
permissionManager - permission manager object

getPermissionManager

PermissionManager getPermissionManager()
Gets the permission manager

Returns:
the permission manager

getContextId

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

Returns:
contextID used for JACC

getBeanFactory

BeanFactory getBeanFactory(java.lang.String beanName)