org.springframework.ejb.access
Class AbstractSlsbInvokerInterceptor

java.lang.Object
  extended byorg.springframework.jndi.AbstractJndiLocator
      extended byorg.springframework.ejb.access.AbstractSlsbInvokerInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, InitializingBean, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor
Direct Known Subclasses:
AbstractRemoteSlsbInvokerInterceptor, LocalSlsbInvokerInterceptor

public abstract class AbstractSlsbInvokerInterceptor
extends AbstractJndiLocator
implements org.aopalliance.intercept.MethodInterceptor

Superclass for AOP interceptors invoking remote or local Stateless Session Beans.

Such an interceptor must be the last interceptor in the advice chain. In this case, there is no target object.

Version:
$Id: AbstractSlsbInvokerInterceptor.java,v 1.11 2004/05/18 07:54:00 jhoeller Exp $
Author:
Rod Johnson

Field Summary
 
Fields inherited from class org.springframework.jndi.AbstractJndiLocator
CONTAINER_PREFIX, logger
 
Constructor Summary
AbstractSlsbInvokerInterceptor()
           
 
Method Summary
protected  void afterLocated()
          Initialization hook after the AbstractJndiLocator's located callback.
protected  java.lang.Object create()
          Invoke the create() method on the cached EJB home.
protected  java.lang.Object getCachedEjbHome()
          Return the cached home object.
protected  void located(java.lang.Object jndiObject)
          Implementation of AbstractJndiLocator's callback, to cache the home wrapper.
 void setCacheHome(boolean cacheHome)
          Set whether to cache the EJB home object.
 
Methods inherited from class org.springframework.jndi.AbstractJndiLocator
afterPropertiesSet, getJndiEnvironment, getJndiName, getJndiTemplate, isResourceRef, lookup, setJndiEnvironment, setJndiName, setJndiTemplate, setResourceRef
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.aopalliance.intercept.MethodInterceptor
invoke
 

Constructor Detail

AbstractSlsbInvokerInterceptor

public AbstractSlsbInvokerInterceptor()
Method Detail

setCacheHome

public void setCacheHome(boolean cacheHome)
Set whether to cache the EJB home object. Default is true.

Can be turned off to allow for hot redeploy of the target EJB respectively restart of the EJB container.


located

protected void located(java.lang.Object jndiObject)
Implementation of AbstractJndiLocator's callback, to cache the home wrapper. Invokes afterLocated() after execution.

Specified by:
located in class AbstractJndiLocator
Parameters:
jndiObject - object successfully retrieved from JNDI
See Also:
afterLocated()

afterLocated

protected void afterLocated()
Initialization hook after the AbstractJndiLocator's located callback. This implementation does nothing.

See Also:
located(java.lang.Object)

getCachedEjbHome

protected java.lang.Object getCachedEjbHome()
Return the cached home object.


create

protected java.lang.Object create()
                           throws javax.naming.NamingException,
                                  java.lang.reflect.InvocationTargetException
Invoke the create() method on the cached EJB home.

Returns:
a new EJBObject or EJBLocalObject
Throws:
javax.naming.NamingException
java.lang.reflect.InvocationTargetException


Copyright (C) 2003-2004 The Spring Framework Project.