org.jboss.ejb
Interface EJBProxyFactory

All Superinterfaces:
AllowedOperationsFlags (src) , ContainerPlugin (src) , GenericEntityObjectFactory (src) , Service (src)
All Known Implementing Classes:
IORFactory (src) , JBossMessageEndpointFactory (src) , JMSContainerInvoker (src) , ProxyFactory (src)

public interface EJBProxyFactory
extends GenericEntityObjectFactory (src) , ContainerPlugin (src)

This is an interface for Container plugins. Implementations of this interface are responsible for receiving remote invocations of EJB's and to forward these requests to the Container it is being used with.

It is responsible for providing any EJBObject and EJBHome implementations (which may be statically or dynamically created).

Before forwarding a call to the container it must call Thread.setContextClassLoader() with the classloader of the container. It must also handle any propagated transaction and security contexts properly. It may acquire the TransactionManager from JNDI.

See Also:
Container (src)

Nested Class Summary
 
Nested classes inherited from class org.jboss.ejb.GenericEntityObjectFactory (src)
GenericEntityObjectFactory.UTIL (src)
 
Field Summary
 
Fields inherited from interface org.jboss.ejb.AllowedOperationsFlags (src)
IN_AFTER_BEGIN, IN_AFTER_COMPLETION, IN_BEFORE_COMPLETION, IN_BUSINESS_METHOD, IN_EJB_ACTIVATE, IN_EJB_CREATE, IN_EJB_FIND, IN_EJB_HOME, IN_EJB_LOAD, IN_EJB_PASSIVATE, IN_EJB_POST_CREATE, IN_EJB_REMOVE, IN_EJB_STORE, IN_EJB_TIMEOUT, IN_INTERCEPTOR_METHOD, IN_SERVICE_ENDPOINT_METHOD, IN_SET_ENTITY_CONTEXT, IN_SET_MESSAGE_DRIVEN_CONTEXT, IN_SET_SESSION_CONTEXT, IN_UNSET_ENTITY_CONTEXT, NOT_ALLOWED
 
Method Summary
 java.lang.Object getEJBHome()
          This method is called whenever the EJBHome implementation for this container is needed.
 EJBMetaData (src) getEJBMetaData()
          This method is called whenever the metadata for this container is needed.
 java.util.Collection getEntityCollection(java.util.Collection en)
          This method is called whenever a collection of EJBObjects for a collection of primary keys is needed.
 java.lang.Object getEntityEJBObject(java.lang.Object id)
          This method is called whenever an EJBObject implementation for an entitybean is needed.
 java.lang.Object getStatefulSessionEJBObject(java.lang.Object id)
          This method is called whenever an EJBObject implementation for a stateful session bean is needed.
 java.lang.Object getStatelessSessionEJBObject()
          This method is called whenever an EJBObject implementation for a stateless session bean is needed.
 boolean isIdentical(Container (src)  container, Invocation (src)  mi)
          Protocol specific isIdentical implementation
 void setInvokerBinding(java.lang.String binding)
          Set the invoker jndi binding
 void setInvokerMetaData(InvokerProxyBindingMetaData (src)  imd)
          Set the invoker meta data so that the ProxyFactory can initialize properly
 
Methods inherited from interface org.jboss.ejb.ContainerPlugin (src)
setContainer
 
Methods inherited from interface org.jboss.system.Service (src)
create, destroy, start, stop
 

Method Detail

setInvokerMetaData

public void setInvokerMetaData(InvokerProxyBindingMetaData (src)  imd)
Set the invoker meta data so that the ProxyFactory can initialize properly


setInvokerBinding

public void setInvokerBinding(java.lang.String binding)
Set the invoker jndi binding


isIdentical

public boolean isIdentical(Container (src)  container,
                           Invocation (src)  mi)
Protocol specific isIdentical implementation

Parameters:
container - the container
mi - the invocation
Returns:
true when identical, false otherwise

getEJBMetaData

public EJBMetaData (src)  getEJBMetaData()
This method is called whenever the metadata for this container is needed.

Returns:
An implementation of the EJBMetaData interface.

getEJBHome

public java.lang.Object getEJBHome()
This method is called whenever the EJBHome implementation for this container is needed.

Returns:
An implementation of the home interface for this container.

getStatelessSessionEJBObject

public java.lang.Object getStatelessSessionEJBObject()
This method is called whenever an EJBObject implementation for a stateless session bean is needed.

Returns:
An implementation of the remote interface for this container.

getStatefulSessionEJBObject

public java.lang.Object getStatefulSessionEJBObject(java.lang.Object id)
This method is called whenever an EJBObject implementation for a stateful session bean is needed.

Parameters:
id - The id of the session.
Returns:
An implementation of the remote interface for this container.

getEntityEJBObject

public java.lang.Object getEntityEJBObject(java.lang.Object id)
This method is called whenever an EJBObject implementation for an entitybean is needed.

Specified by:
getEntityEJBObject in interface GenericEntityObjectFactory (src)
Parameters:
id - The primary key of the entity.
Returns:
An implementation of the remote interface for this container.

getEntityCollection

public java.util.Collection getEntityCollection(java.util.Collection en)
This method is called whenever a collection of EJBObjects for a collection of primary keys is needed.

Parameters:
en - Enumeration of primary keys.
Returns:
A collection of EJBObjects implementing the remote interface for this container.