org.openejb
Class GenericEJBContainer

java.lang.Object
  extended byorg.openejb.GenericEJBContainer
All Implemented Interfaces:
org.apache.geronimo.management.EJB, EJBContainer, org.apache.geronimo.gbean.GBeanLifecycle, org.apache.geronimo.core.service.Interceptor, org.apache.geronimo.management.J2EEManagedObject
Direct Known Subclasses:
CMPEJBContainer

public class GenericEJBContainer
extends Object
implements EJBContainer, org.apache.geronimo.gbean.GBeanLifecycle, org.apache.geronimo.management.EJB

Version:
$Revision: 446103 $ $Date: 2006-03-14 22:00:57 +0100 (Tue, 14 Mar 2006) $

Field Summary
static org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
           
 
Constructor Summary
GenericEJBContainer(Object containerId, String ejbName, ProxyInfo proxyInfo, InterfaceMethodSignature[] signatures, InstanceContextFactory contextFactory, InterceptorBuilder interceptorBuilder, InstancePool pool, Map componentContext, org.apache.geronimo.transaction.context.UserTransactionImpl userTransaction, String[] jndiNames, String[] localJndiNames, org.apache.geronimo.transaction.context.TransactionContextManager transactionContextManager, org.apache.geronimo.transaction.TrackedConnectionAssociator trackedConnectionAssociator, org.apache.geronimo.timer.ThreadPooledTimer timer, String objectName, org.apache.geronimo.kernel.Kernel kernel, org.apache.geronimo.security.deploy.DefaultPrincipal defaultPrincipal, Subject runAsSubject, TSSBean tssBean, Serializable homeTxPolicyConfig, Serializable remoteTxPolicyConfig, ClassLoader classLoader)
           
 
Method Summary
 void doFail()
           
 void doStart()
           
 void doStop()
           
 ClassLoader getClassLoader()
           
 Object getContainerID()
          Unique id used for locating the container No assumptions are made about the type of this object other than it can hash uniquely
 Subject getDefaultSubject()
          Returns the subject to use if the client is not authenticated.
 javax.ejb.EJBHome getEjbHome()
          Return a proxy for the EJB's home interface.
 javax.ejb.EJBLocalHome getEjbLocalHome()
          Return a proxy for the EJB's local home interface.
 javax.ejb.EJBLocalObject getEjbLocalObject(Object primaryKey)
          Return a proxy for the EJB's local interface.
 String getEjbName()
          Return the name of the EJB
 javax.ejb.EJBObject getEjbObject(Object primaryKey)
          Return a proxy for the EJB's remote interface.
static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
           
 Serializable getHomeTxPolicyConfig()
          CORBA home transaction import policy configuration
 String[] getJndiNames()
           
 String[] getLocalJndiNames()
           
 int getMethodIndex(Method method)
           
 String getObjectName()
           
 ProxyInfo getProxyInfo()
           
 Serializable getRemoteTxPolicyConfig()
          CORBA remote transaction import policy configuration
 InterfaceMethodSignature[] getSignatures()
           
 javax.ejb.Timer getTimerById(Long id)
           
 EJBContainer getUnmanagedReference()
           
 org.apache.geronimo.core.service.InvocationResult invoke(org.apache.geronimo.core.service.Invocation invocation)
           
 Object invoke(Method method, Object[] args, Object primKey)
          Legacy invoke method for openejb 1.0 code
 boolean isEventProvider()
           
 boolean isStateManageable()
           
 boolean isStatisticsProvider()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
Constructor Detail

GenericEJBContainer

public GenericEJBContainer(Object containerId,
                           String ejbName,
                           ProxyInfo proxyInfo,
                           InterfaceMethodSignature[] signatures,
                           InstanceContextFactory contextFactory,
                           InterceptorBuilder interceptorBuilder,
                           InstancePool pool,
                           Map componentContext,
                           org.apache.geronimo.transaction.context.UserTransactionImpl userTransaction,
                           String[] jndiNames,
                           String[] localJndiNames,
                           org.apache.geronimo.transaction.context.TransactionContextManager transactionContextManager,
                           org.apache.geronimo.transaction.TrackedConnectionAssociator trackedConnectionAssociator,
                           org.apache.geronimo.timer.ThreadPooledTimer timer,
                           String objectName,
                           org.apache.geronimo.kernel.Kernel kernel,
                           org.apache.geronimo.security.deploy.DefaultPrincipal defaultPrincipal,
                           Subject runAsSubject,
                           TSSBean tssBean,
                           Serializable homeTxPolicyConfig,
                           Serializable remoteTxPolicyConfig,
                           ClassLoader classLoader)
                    throws Exception
Method Detail

invoke

public org.apache.geronimo.core.service.InvocationResult invoke(org.apache.geronimo.core.service.Invocation invocation)
                                                         throws Throwable
Specified by:
invoke in interface org.apache.geronimo.core.service.Interceptor
Throws:
Throwable

invoke

public Object invoke(Method method,
                     Object[] args,
                     Object primKey)
              throws Throwable
Description copied from interface: EJBContainer
Legacy invoke method for openejb 1.0 code

Specified by:
invoke in interface EJBContainer
Parameters:
method - the method object for the method called on the interface
args - arguemnts to the method
primKey - primary key of the instance to invoke
Returns:
the return value
Throws:
Throwable - if a problem occurs while calling the bean

getClassLoader

public ClassLoader getClassLoader()
Specified by:
getClassLoader in interface EJBContainer

getContainerID

public Object getContainerID()
Description copied from interface: EJBContainer
Unique id used for locating the container No assumptions are made about the type of this object other than it can hash uniquely

Specified by:
getContainerID in interface EJBContainer
Returns:
the id of the container

getEjbName

public String getEjbName()
Description copied from interface: EJBContainer
Return the name of the EJB

Specified by:
getEjbName in interface EJBContainer
Returns:
the name of the EJB

getJndiNames

public String[] getJndiNames()
Specified by:
getJndiNames in interface EJBContainer

getLocalJndiNames

public String[] getLocalJndiNames()
Specified by:
getLocalJndiNames in interface EJBContainer

getEjbHome

public javax.ejb.EJBHome getEjbHome()
Description copied from interface: EJBContainer
Return a proxy for the EJB's home interface. This can be passed back to any client that wishes to access the EJB (e.g. in response to a call to EJBContext.getEJBHome() )

Specified by:
getEjbHome in interface EJBContainer
Returns:
the proxy for this EJB's home interface

getEjbObject

public javax.ejb.EJBObject getEjbObject(Object primaryKey)
Description copied from interface: EJBContainer
Return a proxy for the EJB's remote interface. This can be passed back to any client that wishes to access the EJB (e.g. in response to a call to SessionContext.getEJBObject() )

Specified by:
getEjbObject in interface EJBContainer
Returns:
the proxy for this EJB's home interface

getEjbLocalHome

public javax.ejb.EJBLocalHome getEjbLocalHome()
Description copied from interface: EJBContainer
Return a proxy for the EJB's local home interface. This can be passed back to any client that wishes to access the EJB (e.g. in response to a call to EJBContext.getEJBLocalHome() )

Specified by:
getEjbLocalHome in interface EJBContainer
Returns:
the proxy for this EJB's local home interface

getEjbLocalObject

public javax.ejb.EJBLocalObject getEjbLocalObject(Object primaryKey)
Description copied from interface: EJBContainer
Return a proxy for the EJB's local interface. This can be passed back to any client that wishes to access the EJB (e.g. in response to a call to SessionContext.getEJBLocalObject() )

Specified by:
getEjbLocalObject in interface EJBContainer
Returns:
the proxy for this EJB's local interface

getProxyInfo

public ProxyInfo getProxyInfo()
Specified by:
getProxyInfo in interface EJBContainer

getDefaultSubject

public Subject getDefaultSubject()
Description copied from interface: EJBContainer
Returns the subject to use if the client is not authenticated.

This subject must have been registered at container startup, to properly work with the container's interceptors.

Specified by:
getDefaultSubject in interface EJBContainer
Returns:
the default subject
See Also:
ContextManager.registerSubject(javax.security.auth.Subject)

getHomeTxPolicyConfig

public Serializable getHomeTxPolicyConfig()
Description copied from interface: EJBContainer
CORBA home transaction import policy configuration

Specified by:
getHomeTxPolicyConfig in interface EJBContainer
Returns:

getRemoteTxPolicyConfig

public Serializable getRemoteTxPolicyConfig()
Description copied from interface: EJBContainer
CORBA remote transaction import policy configuration

Specified by:
getRemoteTxPolicyConfig in interface EJBContainer
Returns:

getMethodIndex

public int getMethodIndex(Method method)
Specified by:
getMethodIndex in interface EJBContainer

getSignatures

public InterfaceMethodSignature[] getSignatures()
Specified by:
getSignatures in interface EJBContainer

getUnmanagedReference

public EJBContainer getUnmanagedReference()
Specified by:
getUnmanagedReference in interface EJBContainer

getTimerById

public javax.ejb.Timer getTimerById(Long id)

doStart

public void doStart()
             throws Exception
Specified by:
doStart in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
Exception

doStop

public void doStop()
            throws Exception
Specified by:
doStop in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
Exception

doFail

public void doFail()
Specified by:
doFail in interface org.apache.geronimo.gbean.GBeanLifecycle

getObjectName

public String getObjectName()
Specified by:
getObjectName in interface org.apache.geronimo.management.J2EEManagedObject

isStateManageable

public boolean isStateManageable()
Specified by:
isStateManageable in interface org.apache.geronimo.management.J2EEManagedObject

isStatisticsProvider

public boolean isStatisticsProvider()
Specified by:
isStatisticsProvider in interface org.apache.geronimo.management.J2EEManagedObject

isEventProvider

public boolean isEventProvider()
Specified by:
isEventProvider in interface org.apache.geronimo.management.J2EEManagedObject

getGBeanInfo

public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()


Copyright © 1999-2006 OpenEJB. All Rights Reserved.