| org.springframework.jndi.JndiObjectLocator org.springframework.ejb.access.AbstractSlsbInvokerInterceptor
All known Subclasses: org.springframework.ejb.access.LocalSlsbInvokerInterceptor, org.springframework.ejb.access.AbstractRemoteSlsbInvokerInterceptor,
AbstractSlsbInvokerInterceptor | abstract public class AbstractSlsbInvokerInterceptor extends JndiObjectLocator implements MethodInterceptor(Code) | | 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.
author: Rod Johnson author: Juergen Hoeller |
Method Summary | |
public void | afterPropertiesSet() Fetches EJB home on startup, if necessary. | protected Object | create() Invoke the create() method on the cached EJB home object. | protected Method | getCreateMethod(Object home) Determine the create method of the given EJB home object. | protected 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. | public void | setCacheHome(boolean cacheHome) Set whether to cache the EJB home object once it has been located. | public void | setLookupHomeOnStartup(boolean lookupHomeOnStartup) Set whether to look up the EJB home object on startup. |
getCreateMethod | protected Method getCreateMethod(Object home) throws EjbAccessException(Code) | | Determine the create method of the given EJB home object.
Parameters: home - the EJB home object the create method throws: EjbAccessException - if the method couldn't be retrieved |
getHome | protected Object getHome() throws NamingException(Code) | | Return the EJB home object to use. Called for each invocation.
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 object
for a given amount of time before recreating it, or to test the home
object whether it is still alive.
the EJB home object to use for an invocation throws: NamingException - if proxy creation failed See Also: AbstractSlsbInvokerInterceptor.lookup See Also: AbstractSlsbInvokerInterceptor.getCreateMethod |
isHomeRefreshable | protected boolean isHomeRefreshable()(Code) | | Return whether the cached EJB home object is potentially
subject to on-demand refreshing. Default is "false".
|
setCacheHome | public void setCacheHome(boolean cacheHome)(Code) | | Set whether to cache the EJB home object once it has been located.
Default is "true".
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.
See Also: AbstractSlsbInvokerInterceptor.setLookupHomeOnStartup |
setLookupHomeOnStartup | public void setLookupHomeOnStartup(boolean lookupHomeOnStartup)(Code) | | Set whether to look up the EJB home object on startup.
Default is "true".
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.
See Also: AbstractSlsbInvokerInterceptor.setCacheHome |
|
|