org.jboss.ejb
Interface EJBProxyFactory

All Superinterfaces:
AllowedOperationsFlags, ContainerPlugin, GenericEntityObjectFactory, org.jboss.system.Service
All Known Implementing Classes:
JBossJMSMessageEndpointFactory, JBossMessageEndpointFactory, JMSContainerInvoker, ProxyFactory

public interface EJBProxyFactory
extends GenericEntityObjectFactory, ContainerPlugin

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.

Version:
$Revision: 57209 $

20011219 marc fleury:

Author:
Rickard �berg, Marc Fleury
See Also:
Container

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.ejb.GenericEntityObjectFactory
GenericEntityObjectFactory.UTIL
 
Field Summary
 
Fields inherited from interface org.jboss.ejb.AllowedOperationsFlags
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
 Object getEJBHome()
          This method is called whenever the EJBHome implementation for this container is needed.
 javax.ejb.EJBMetaData getEJBMetaData()
          This method is called whenever the metadata for this container is needed.
 Collection getEntityCollection(Collection en)
          This method is called whenever a collection of EJBObjects for a collection of primary keys is needed.
 Object getEntityEJBObject(Object id)
          This method is called whenever an EJBObject implementation for an entitybean is needed.
 Object getStatefulSessionEJBObject(Object id)
          This method is called whenever an EJBObject implementation for a stateful session bean is needed.
 Object getStatelessSessionEJBObject()
          This method is called whenever an EJBObject implementation for a stateless session bean is needed.
 boolean isIdentical(Container container, Invocation mi)
          Protocol specific isIdentical implementation
 void setInvokerBinding(String binding)
          Set the invoker jndi binding
 void setInvokerMetaData(InvokerProxyBindingMetaData imd)
          Set the invoker meta data so that the ProxyFactory can initialize properly
 
Methods inherited from interface org.jboss.ejb.ContainerPlugin
setContainer
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Method Detail

setInvokerMetaData

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


setInvokerBinding

void setInvokerBinding(String binding)
Set the invoker jndi binding


isIdentical

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

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

getEJBMetaData

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

Returns:
An implementation of the EJBMetaData interface.

getEJBHome

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

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

Object getStatefulSessionEJBObject(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

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

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

getEntityCollection

Collection getEntityCollection(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.


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.