org.objectweb.jonas_ejb.container
Interface BeanFactory

All Known Implementing Classes:
JEntityFactory, JFactory, JMdbEndpointFactory, JMdbFactory, JormFactory, JSessionFactory, JStatefulFactory, JStatelessFactory, MedorFactory, RdbFactory

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

java.lang.String getEJBName()
get the bean name

Returns:
The name of the bean

getDeploymentDescriptor

BeanDesc getDeploymentDescriptor()
Get the Deployement descriptor of this Ejb

Returns:
BeanDesc The bean deployment descriptor

getPoolSize

int getPoolSize()
Get the size of the instance pool for this bean

Returns:
number of instances in the pool

stop

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


syncDirty

void syncDirty(boolean alwaysStore)
synchronize bean instances if needed

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

reduceCache

void reduceCache()
reduce cache of instances


getHome

JHome getHome()
returns the home if exist or null if not

Returns:
Home for that bean, if exists.

getLocalHome

JLocalHome getLocalHome()
returns the local home if exist or null if not

Returns:
LocalHome for that bean, if exists.

getTransactionManager

org.objectweb.transaction.jta.TransactionManager getTransactionManager()
returns the TransactionManager

Returns:
The Transaction Manager

getContainer

JContainer getContainer()
Returns the JContainer

Returns:
The Container where the bean lives.

getEnv

java.util.Hashtable getEnv()
Return the JNDI Environment

Returns:
List of Environment used by the bean

getInitialContext

javax.naming.InitialContext getInitialContext()
Returns the InitialContext

Returns:
JNDI Initial Context

initInstancePool

void initInstancePool()
Init the pool of instances


restartTimers

void restartTimers()
Restart the Timers after jonas restart


storeInstances

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