|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.jndi.JndiAccessor org.springframework.jndi.JndiLocatorSupport org.springframework.jndi.JndiObjectLocator org.springframework.ejb.access.AbstractSlsbInvokerInterceptor
Superclass for AOP interceptors invoking local or remote Stateless Session Beans.
Such an interceptor must be the last interceptor in the advice chain. In this case, there is no direct target object: The call is handled in a special way, getting executed on an EJB instance retrieved via an EJB home.
Field Summary |
Fields inherited from class org.springframework.jndi.JndiLocatorSupport |
CONTAINER_PREFIX |
Fields inherited from class org.springframework.jndi.JndiAccessor |
logger |
Constructor Summary | |
AbstractSlsbInvokerInterceptor()
|
Method Summary | |
void |
afterPropertiesSet()
Fetches EJB home on startup, if necessary. |
protected java.lang.Object |
create()
Invoke the create() method on the cached EJB home. |
protected java.lang.reflect.Method |
getCreateMethod(java.lang.Object home)
Determine the create method of the given EJB home object. |
protected java.lang.Object |
getHome()
Return the EJB home object to use. |
protected boolean |
isHomeRefreshable()
Return whether the cached EJB home object is potentially subject to on-demand refreshing. |
protected void |
refreshHome()
Refresh the cached home object, if applicable. |
void |
setCacheHome(boolean cacheHome)
Set whether to cache the EJB home object once it has been located. |
void |
setLookupHomeOnStartup(boolean lookupHomeOnStartup)
Set whether to look up the EJB home object on startup. |
Methods inherited from class org.springframework.jndi.JndiObjectLocator |
getJndiName, lookup, setJndiName |
Methods inherited from class org.springframework.jndi.JndiLocatorSupport |
convertJndiName, isResourceRef, lookup, setResourceRef |
Methods inherited from class org.springframework.jndi.JndiAccessor |
getJndiEnvironment, getJndiTemplate, setJndiEnvironment, setJndiTemplate |
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 |
public AbstractSlsbInvokerInterceptor()
Method Detail |
public void setLookupHomeOnStartup(boolean lookupHomeOnStartup)
Can be turned off to allow for late start of the EJB server. In this case, the EJB home object will be fetched on first access.
setCacheHome(boolean)
public void setCacheHome(boolean cacheHome)
Can be turned off to allow for hot restart of the EJB server. In this case, the EJB home object will be fetched for each invocation.
setLookupHomeOnStartup(boolean)
public void afterPropertiesSet() throws javax.naming.NamingException
afterPropertiesSet
in interface InitializingBean
afterPropertiesSet
in class JndiObjectLocator
javax.naming.NamingException
setLookupHomeOnStartup(boolean)
,
refreshHome()
protected void refreshHome() throws javax.naming.NamingException
javax.naming.NamingException
- if thrown by the JNDI lookupJndiObjectLocator.lookup()
,
getCreateMethod(java.lang.Object)
protected java.lang.reflect.Method getCreateMethod(java.lang.Object home) throws org.aopalliance.aop.AspectException
home
- the EJB home object
org.aopalliance.aop.AspectException
- if the method couldn't be retrievedprotected java.lang.Object getHome() throws javax.naming.NamingException
Default implementation returns the home created on initialization, if any; else, it invokes lookup to get a new proxy for each invocation.
Can be overridden in subclasses, for example to cache a home for a given amount of time before recreating it, or to test the home whether it is still alive.
javax.naming.NamingException
- if proxy creation failedJndiObjectLocator.lookup()
,
getCreateMethod(java.lang.Object)
protected boolean isHomeRefreshable()
protected java.lang.Object create() throws javax.naming.NamingException, java.lang.reflect.InvocationTargetException
javax.naming.NamingException
- if thrown by JNDI
java.lang.reflect.InvocationTargetException
- if thrown by the create method
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |