org.jboss.ejb.plugins.local
Class BaseLocalProxyFactory

java.lang.Object
  extended byorg.jboss.ejb.plugins.local.BaseLocalProxyFactory
All Implemented Interfaces:
AllowedOperationsFlags (src) , ContainerPlugin (src) , GenericEntityObjectFactory (src) , LocalProxyFactory (src) , Service (src)

public class BaseLocalProxyFactory
extends java.lang.Object
implements LocalProxyFactory (src)

The LocalProxyFactory implementation that handles local ejb interface proxies.


Nested Class Summary
 
Nested classes inherited from class org.jboss.ejb.GenericEntityObjectFactory (src)
GenericEntityObjectFactory.UTIL (src)
 
Field Summary
protected  java.util.Map beanMethodInvokerMap
           
protected  Container (src) container
           
protected  EJBLocalHome (src) home
           
protected  java.util.Map homeMethodInvokerMap
           
protected static java.util.Map invokerMap
          A map of the BaseLocalProxyFactory instances keyed by localJndiName
protected  java.lang.Class localClass
           
protected  java.lang.Class localHomeClass
           
protected  java.lang.String localJndiName
          The JNDI name of the local home interface binding
protected static Logger (src) log
           
protected  java.lang.reflect.Constructor proxyClassConstructor
           
protected  EJBLocalObject (src) statelessObject
           
protected  TransactionManager (src) transactionManager
           
 
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
 
Constructor Summary
BaseLocalProxyFactory()
           
 
Method Summary
 void create()
          create the service, do expensive operations etc
 void destroy()
          destroy the service, tear down
 EJBLocalHome (src) getEJBLocalHome()
          This method is called whenever the EJBLocalHome implementation for this container is needed.
 EJBLocalObject (src) getEntityEJBLocalObject(java.lang.Object id)
          This method is called whenever an EJBLocalObject implementation for an entitybean is needed.
 EJBLocalObject (src) getEntityEJBLocalObject(java.lang.Object id, boolean create)
          This method is called whenever a new EJBLocalObject should be created.
 java.lang.Object getEntityEJBObject(java.lang.Object id)
           
 java.util.Collection getEntityLocalCollection(java.util.Collection ids)
          This method is called whenever a collection of EJBLocalObjects for a collection of primary keys is needed.
 java.lang.String getJndiName()
           
 java.lang.reflect.Constructor getProxyClassConstructor()
           
 EJBLocalObject (src) getStatefulSessionEJBLocalObject(java.lang.Object id)
          This method is called whenever an EJBLocalObject implementation for a stateful session bean is needed.
 EJBLocalObject (src) getStatelessSessionEJBLocalObject()
          This method is called whenever an EJBLocalObject implementation for a stateless session bean is needed.
 java.lang.Object invoke(java.lang.Object id, java.lang.reflect.Method m, java.lang.Object[] args)
          Invoke a local interface method.
 java.lang.Object invokeHome(java.lang.reflect.Method m, java.lang.Object[] args)
          Invoke a Home interface method.
 void setContainer(Container (src)  con)
          This callback is set by the container so that the plugin may access it
 void start()
          start the service, create is already called
 void stop()
          stop the service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static Logger (src)  log

invokerMap

protected static java.util.Map invokerMap
A map of the BaseLocalProxyFactory instances keyed by localJndiName


container

protected Container (src)  container

localJndiName

protected java.lang.String localJndiName
The JNDI name of the local home interface binding


transactionManager

protected TransactionManager (src)  transactionManager

home

protected EJBLocalHome (src)  home

statelessObject

protected EJBLocalObject (src)  statelessObject

beanMethodInvokerMap

protected java.util.Map beanMethodInvokerMap

homeMethodInvokerMap

protected java.util.Map homeMethodInvokerMap

localHomeClass

protected java.lang.Class localHomeClass

localClass

protected java.lang.Class localClass

proxyClassConstructor

protected java.lang.reflect.Constructor proxyClassConstructor
Constructor Detail

BaseLocalProxyFactory

public BaseLocalProxyFactory()
Method Detail

setContainer

public void setContainer(Container (src)  con)
Description copied from interface: ContainerPlugin (src)
This callback is set by the container so that the plugin may access it

Specified by:
setContainer in interface ContainerPlugin (src)
Parameters:
con - The container using this plugin. This may be null if the plugin is being disassociated from a container.

create

public void create()
            throws java.lang.Exception
Description copied from interface: Service (src)
create the service, do expensive operations etc

Specified by:
create in interface Service (src)
Throws:
java.lang.Exception

start

public void start()
           throws java.lang.Exception
Description copied from interface: Service (src)
start the service, create is already called

Specified by:
start in interface Service (src)
Throws:
java.lang.Exception

stop

public void stop()
Description copied from interface: Service (src)
stop the service

Specified by:
stop in interface Service (src)

destroy

public void destroy()
Description copied from interface: Service (src)
destroy the service, tear down

Specified by:
destroy in interface Service (src)

getProxyClassConstructor

public java.lang.reflect.Constructor getProxyClassConstructor()

getEJBLocalHome

public EJBLocalHome (src)  getEJBLocalHome()
Description copied from interface: LocalProxyFactory (src)
This method is called whenever the EJBLocalHome implementation for this container is needed.

Specified by:
getEJBLocalHome in interface LocalProxyFactory (src)
Returns:
an implementation of the local home interface for this container

getStatelessSessionEJBLocalObject

public EJBLocalObject (src)  getStatelessSessionEJBLocalObject()
Description copied from interface: LocalProxyFactory (src)
This method is called whenever an EJBLocalObject implementation for a stateless session bean is needed.

Specified by:
getStatelessSessionEJBLocalObject in interface LocalProxyFactory (src)
Returns:
an implementation of the local interface for this container

getStatefulSessionEJBLocalObject

public EJBLocalObject (src)  getStatefulSessionEJBLocalObject(java.lang.Object id)
Description copied from interface: LocalProxyFactory (src)
This method is called whenever an EJBLocalObject implementation for a stateful session bean is needed.

Specified by:
getStatefulSessionEJBLocalObject in interface LocalProxyFactory (src)
Parameters:
id - the id of the session
Returns:
an implementation of the local interface for this container

getEntityEJBObject

public java.lang.Object getEntityEJBObject(java.lang.Object id)
Specified by:
getEntityEJBObject in interface GenericEntityObjectFactory (src)

getEntityEJBLocalObject

public EJBLocalObject (src)  getEntityEJBLocalObject(java.lang.Object id,
                                              boolean create)
Description copied from interface: LocalProxyFactory (src)
This method is called whenever a new EJBLocalObject should be created. Called when the instance is created.

Specified by:
getEntityEJBLocalObject in interface LocalProxyFactory (src)
Parameters:
id - the primary key of the entity
Returns:
an implementation of the local interface for this container

getEntityEJBLocalObject

public EJBLocalObject (src)  getEntityEJBLocalObject(java.lang.Object id)
Description copied from interface: LocalProxyFactory (src)
This method is called whenever an EJBLocalObject implementation for an entitybean is needed.

Specified by:
getEntityEJBLocalObject in interface LocalProxyFactory (src)
Parameters:
id - the primary key of the entity
Returns:
an implementation of the local interface for this container

getEntityLocalCollection

public java.util.Collection getEntityLocalCollection(java.util.Collection ids)
Description copied from interface: LocalProxyFactory (src)
This method is called whenever a collection of EJBLocalObjects for a collection of primary keys is needed.

Specified by:
getEntityLocalCollection in interface LocalProxyFactory (src)
Parameters:
ids - enumeration of primary keys
Returns:
a collection of EJBLocalObjects implementing the remote interface for this container

invokeHome

public java.lang.Object invokeHome(java.lang.reflect.Method m,
                                   java.lang.Object[] args)
                            throws java.lang.Exception
Invoke a Home interface method.

Throws:
java.lang.Exception

getJndiName

public java.lang.String getJndiName()

invoke

public java.lang.Object invoke(java.lang.Object id,
                               java.lang.reflect.Method m,
                               java.lang.Object[] args)
                        throws java.lang.Exception
Invoke a local interface method.

Throws:
java.lang.Exception