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

Method Summary
 java.lang.ClassLoader getClassLoader()
           
 ContainerNaming getContainerNaming()
           
 java.lang.String getEarFileName()
          get the name of the ear application containing this container.
 java.lang.String getFileName()
           
 JmsManager getJmsManager()
           
 java.security.Guard getMethodGuard()
           
 java.lang.String getName()
           
 PrincipalFactory getPrincipalFactory()
           
 java.security.Guard getRoleGuard()
           
 javax.transaction.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 setMethodGuard(java.security.Guard methodGuard)
          Set the MethodGuard
 void setPrincipalFactory(PrincipalFactory pf)
          Set the PrincipalFactory.
 void setRoleGuard(java.security.Guard roleGuard)
          Set the Role Guard
 void setThreadPoolSize(int sz)
          Set the thread pool size.
 void setTransactionManager(javax.transaction.TransactionManager tm)
          set the Transaction Manager.
 void syncAll(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)

setMethodGuard

public void setMethodGuard(java.security.Guard methodGuard)
Set the MethodGuard
Parameters:
methodGuard - The Guard to be set for methods.

getMethodGuard

public java.security.Guard getMethodGuard()
Returns:
the Method Guard of the Container

setRoleGuard

public void setRoleGuard(java.security.Guard roleGuard)
Set the Role Guard
Parameters:
roleGuard - The Guard to be set for roles.

getRoleGuard

public java.security.Guard getRoleGuard()
Returns:
the Role Guard 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

setThreadPoolSize

public void setThreadPoolSize(int sz)
Set the thread pool size. This thread pool is currently used only for message driven beans.
Parameters:
sz - number of threads in the pool.

syncAll

public void syncAll(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(javax.transaction.TransactionManager tm)
set the Transaction Manager.
Parameters:
tm - the Transaction Manager.

getTransactionManager

public javax.transaction.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.