org.openejb
Class GenericEJBContainer

java.lang.Object
  extended byorg.openejb.GenericEJBContainer
All Implemented Interfaces:
EJBContainer, org.apache.geronimo.gbean.GBeanLifecycle, org.apache.geronimo.core.service.Interceptor

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

Version:
$Revision: 1.19 $ $Date: 2004/09/08 03:57:20 $

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, org.apache.geronimo.transaction.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, SecurityConfiguration securityConfiguration, Subject defaultSubject, 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()
           
 String[] getJndiNames()
           
 String[] getLocalJndiNames()
           
 EJBProxyFactory getProxyFactory()
           
 ProxyInfo getProxyInfo()
           
 SecurityConfiguration getSecurityConfiguration()
           
 InterfaceMethodSignature[] getSignatures()
           
 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
 
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,
                           org.apache.geronimo.transaction.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,
                           SecurityConfiguration securityConfiguration,
                           Subject defaultSubject,
                           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)

getProxyFactory

public EJBProxyFactory getProxyFactory()
Specified by:
getProxyFactory in interface EJBContainer

getSignatures

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

getUnmanagedReference

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

getSecurityConfiguration

public SecurityConfiguration getSecurityConfiguration()

doStart

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

doStop

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

doFail

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

getGBeanInfo

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


Copyright © 1999-2005 OpenEJB. All Rights Reserved.