org.openejb
Interface EJBContainer

All Superinterfaces:
org.apache.geronimo.core.service.Interceptor
All Known Implementing Classes:
GenericEJBContainer

public interface EJBContainer
extends org.apache.geronimo.core.service.Interceptor

Interface exposed by server side EJB Containers to allow the interceptor stack to interact with them.

Version:
$Revision: 1.7 $ $Date: 2004/07/30 19:03:43 $

Method Summary
 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.
 String[] getJndiNames()
           
 String[] getLocalJndiNames()
           
 EJBProxyFactory getProxyFactory()
           
 ProxyInfo getProxyInfo()
           
 InterfaceMethodSignature[] getSignatures()
           
 EJBContainer getUnmanagedReference()
           
 Object invoke(Method callMethod, Object[] args, Object primKey)
          Legacy invoke method for openejb 1.0 code
 
Methods inherited from interface org.apache.geronimo.core.service.Interceptor
invoke
 

Method Detail

getContainerID

public 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

Returns:
the id of the container

getEJBName

public String getEJBName()
Return the name of the EJB

Returns:
the name of the EJB

getEJBHome

public javax.ejb.EJBHome getEJBHome()
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() )

Returns:
the proxy for this EJB's home interface

getEJBObject

public javax.ejb.EJBObject getEJBObject(Object primaryKey)
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() )

Returns:
the proxy for this EJB's home interface

getEJBLocalHome

public javax.ejb.EJBLocalHome getEJBLocalHome()
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() )

Returns:
the proxy for this EJB's local home interface

getEJBLocalObject

public javax.ejb.EJBLocalObject getEJBLocalObject(Object primaryKey)
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() )

Returns:
the proxy for this EJB's local interface

invoke

public Object invoke(Method callMethod,
                     Object[] args,
                     Object primKey)
              throws Throwable
Legacy invoke method for openejb 1.0 code

Parameters:
callMethod - 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

getJndiNames

public String[] getJndiNames()

getLocalJndiNames

public String[] getLocalJndiNames()

getProxyFactory

public EJBProxyFactory getProxyFactory()

getClassLoader

public ClassLoader getClassLoader()

getUnmanagedReference

public EJBContainer getUnmanagedReference()

getSignatures

public InterfaceMethodSignature[] getSignatures()

getProxyInfo

public ProxyInfo getProxyInfo()

getDefaultSubject

public Subject getDefaultSubject()
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.

Returns:
the default subject
See Also:
ContextManager.registerSubject(javax.security.auth.Subject)


Copyright © 1999-2005 OpenEJB. All Rights Reserved.