org.objectweb.jonas_ejb.container
Interface BeanFactory

All Known Implementing Classes:
JFactory

public interface BeanFactory

Interface to the Bean Factories used by the Container, JMX, or generic parts of this package.

Author:
Philippe Durieux, Philippe Coq (Bull)

Method Summary
 JContainer getContainer()
          Returns the JContainer
 BeanDesc getDeploymentDescriptor()
          Get the Deployement descriptor of this Ejb
 java.lang.String getEJBName()
          get the bean name
 java.util.Hashtable getEnv()
          Return the JNDI Environment
 JHome getHome()
          returns the home if exist or null if not
 javax.naming.InitialContext getInitialContext()
          Returns the InitialContext
 JLocalHome getLocalHome()
          returns the local home if exist or null if not
 int getPoolSize()
          Get the size of the instance pool for this bean
 javax.transaction.TransactionManager getTransactionManager()
          returns the TransactionManager
 void reduceCache()
          reduce cache of instances
 void stop()
          stop this EJB (unregister it in JNDI)
 void sync()
          synchronize bean instances if needed
 

Method Detail

getEJBName

public java.lang.String getEJBName()
get the bean name
Returns:
The name of the bean

getDeploymentDescriptor

public BeanDesc getDeploymentDescriptor()
Get the Deployement descriptor of this Ejb
Returns:
BeanDesc The bean deployment descriptor

getPoolSize

public int getPoolSize()
Get the size of the instance pool for this bean
Returns:
number of instances in the pool

stop

public void stop()
stop this EJB (unregister it in JNDI)

sync

public void sync()
synchronize bean instances if needed

reduceCache

public void reduceCache()
reduce cache of instances

getHome

public JHome getHome()
returns the home if exist or null if not
Returns:
Home for that bean, if exists.

getLocalHome

public JLocalHome getLocalHome()
returns the local home if exist or null if not
Returns:
LocalHome for that bean, if exists.

getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()
returns the TransactionManager
Returns:
The Transaction Manager

getContainer

public JContainer getContainer()
Returns the JContainer
Returns:
The Container where the bean lives.

getEnv

public java.util.Hashtable getEnv()
Return the JNDI Environment
Returns:
List of Environment used by the bean

getInitialContext

public javax.naming.InitialContext getInitialContext()
Returns the InitialContext
Returns:
JNDI Initial Context