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
 org.objectweb.transaction.jta.TransactionManager getTransactionManager()
          returns the TransactionManager
 void initInstancePool()
          Init the pool of instances
 void reduceCache()
          reduce cache of instances
 void restartTimers()
          Restart the Timers after jonas restart
 void stop()
          stop this EJB (unregister it in JNDI)
 void storeInstances(javax.transaction.Transaction tx)
          Store intances modified (used before finder ou select methods)
 void syncDirty(boolean alwaysStore)
          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)


syncDirty

public void syncDirty(boolean alwaysStore)
synchronize bean instances if needed

Parameters:
alwaysStore - True if store even if passivation timeout not elapsed

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 org.objectweb.transaction.jta.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

initInstancePool

public void initInstancePool()
Init the pool of instances


restartTimers

public void restartTimers()
Restart the Timers after jonas restart


storeInstances

public void storeInstances(javax.transaction.Transaction tx)
Store intances modified (used before finder ou select methods)