org.objectweb.jonas_ejb.container
Class JFactory

java.lang.Object
  |
  +--org.objectweb.jonas_ejb.container.JFactory
All Implemented Interfaces:
BeanFactory
Direct Known Subclasses:
JEntityFactory, JMdbFactory, JSessionFactory

public abstract class JFactory
extends java.lang.Object
implements BeanFactory

This class is a factory for beans.


Field Summary
protected  java.lang.Class beanclass
           
protected  BeanNaming bn
           
protected  JContainer cont
           
protected  BeanDesc dd
           
protected  java.util.Properties ejb10Env
           
protected  java.lang.String ejbname
           
protected  javax.naming.Context JNDICtx
           
protected  ContainerNaming naming
           
protected  javax.transaction.TransactionManager tm
           
protected  boolean txbeanmanaged
           
 
Constructor Summary
JFactory()
          constructor (for entity) must be without parameters (required by Jorm)
JFactory(BeanDesc dd, JContainer cont)
          constructor (for session)
 
Method Summary
protected  void checkTransactionContainer(RequestCtx rctx)
          Process Transaction Attribute before calling a business method
 JContainer getContainer()
          returns the JContainer object
static javax.naming.InitialContext getCorbaInitialContext()
           
 BeanDesc getDeploymentDescriptor()
          Get the Deployement descriptor of this Ejb
 java.util.Properties getEjb10Environment()
          Returns the EJB 1.0 style environment associated with the Bean
 java.lang.String getEJBName()
          get the bean name
 java.util.Hashtable getEnv()
          return the JNDI Enviromnment
 javax.naming.InitialContext getInitialContext()
          Returns the InitialContext
abstract  int getPoolSize()
           
 javax.transaction.TransactionManager getTransactionManager()
          returns the TransactionManager
 void init(BeanDesc dd, JContainer cont)
          Init this object
 boolean isTxBeanManaged()
          returns true if transactions are managed inside the bean returns false if transactions are managed by the container
 void postInvoke(RequestCtx rctx)
          Common postInvoke
 void postInvokeRemote(RequestCtx rctx)
          postInvoke for Remote access
 RequestCtx preInvoke(int txa, java.lang.String secu)
          Common preInvoke
 RequestCtx preInvokeRemote(int txa, java.lang.String secu)
          preInvoke for Remote access
 void resetComponentContext(javax.naming.Context oldctx)
          reset old Component Context for JNDI environment
 javax.naming.Context setComponentContext()
          set the Component Context for JNDI environment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.jonas_ejb.container.BeanFactory
getHome, getLocalHome, reduceCache, stop, sync
 

Field Detail

cont

protected JContainer cont

naming

protected ContainerNaming naming

tm

protected javax.transaction.TransactionManager tm

JNDICtx

protected javax.naming.Context JNDICtx

bn

protected BeanNaming bn

ejbname

protected java.lang.String ejbname

dd

protected BeanDesc dd

ejb10Env

protected java.util.Properties ejb10Env

txbeanmanaged

protected boolean txbeanmanaged

beanclass

protected java.lang.Class beanclass
Constructor Detail

JFactory

public JFactory()
constructor (for entity) must be without parameters (required by Jorm)

JFactory

public JFactory(BeanDesc dd,
                JContainer cont)
constructor (for session)
Method Detail

init

public void init(BeanDesc dd,
                 JContainer cont)
Init this object

getEJBName

public java.lang.String getEJBName()
get the bean name
Specified by:
getEJBName in interface BeanFactory

getPoolSize

public abstract int getPoolSize()
Specified by:
getPoolSize in interface BeanFactory
Returns:
the Instance pool size for this Ejb

getDeploymentDescriptor

public BeanDesc getDeploymentDescriptor()
Get the Deployement descriptor of this Ejb
Specified by:
getDeploymentDescriptor in interface BeanFactory
Returns:
BeanDesc The bean deployment descriptor

getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()
returns the TransactionManager
Specified by:
getTransactionManager in interface BeanFactory

getContainer

public JContainer getContainer()
returns the JContainer object
Specified by:
getContainer in interface BeanFactory

getEnv

public java.util.Hashtable getEnv()
return the JNDI Enviromnment
Specified by:
getEnv in interface BeanFactory

getInitialContext

public javax.naming.InitialContext getInitialContext()
Returns the InitialContext
Specified by:
getInitialContext in interface BeanFactory

getCorbaInitialContext

public static javax.naming.InitialContext getCorbaInitialContext()
                                                          throws javax.naming.NamingException

getEjb10Environment

public java.util.Properties getEjb10Environment()
Returns the EJB 1.0 style environment associated with the Bean

isTxBeanManaged

public boolean isTxBeanManaged()
returns true if transactions are managed inside the bean returns false if transactions are managed by the container

setComponentContext

public javax.naming.Context setComponentContext()
set the Component Context for JNDI environment

resetComponentContext

public void resetComponentContext(javax.naming.Context oldctx)
reset old Component Context for JNDI environment

preInvoke

public RequestCtx preInvoke(int txa,
                            java.lang.String secu)
Common preInvoke

postInvoke

public void postInvoke(RequestCtx rctx)
Common postInvoke

preInvokeRemote

public RequestCtx preInvokeRemote(int txa,
                                  java.lang.String secu)
                           throws java.rmi.RemoteException
preInvoke for Remote access

postInvokeRemote

public void postInvokeRemote(RequestCtx rctx)
                      throws java.rmi.RemoteException
postInvoke for Remote access

checkTransactionContainer

protected void checkTransactionContainer(RequestCtx rctx)
Process Transaction Attribute before calling a business method