java.lang.Object | ||||
↳ | org.springframework.jndi.JndiAccessor | |||
↳ | org.springframework.jndi.JndiLocatorSupport | |||
↳ | org.springframework.jndi.JndiObjectLocator | |||
↳ | org.springframework.ejb.access.AbstractSlsbInvokerInterceptor |
![]() |
![]() |
Base class for AOP interceptors invoking local or remote Stateless Session Beans. Designed for EJB 2.x, but works for EJB 3 Session Beans as well.
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.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Fetches EJB home on startup, if necessary.
| |||||||||||
Prepares the thread context if necessar, and delegates to
invokeInContext(MethodInvocation) . | |||||||||||
Set whether to cache the EJB home object once it has been located.
| |||||||||||
Set whether to expose the JNDI environment context for all access to the target
EJB, i.e.
| |||||||||||
Set whether to look up the EJB home object on startup.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Invokes the
create() method on the cached EJB home object. | |||||||||||
Determine the create method of the given EJB home object.
| |||||||||||
Return the EJB home object to use.
| |||||||||||
Perform the given invocation on the current EJB home,
within the thread context being prepared accordingly.
| |||||||||||
Return whether the cached EJB home object is potentially
subject to on-demand refreshing.
| |||||||||||
Refresh the cached home object, if applicable.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Prepares the thread context if necessar, and delegates to
invokeInContext(MethodInvocation)
.
Throwable |
---|
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.
Set whether to expose the JNDI environment context for all access to the target EJB, i.e. for all method invocations on the exposed object reference.
Default is "false", i.e. to only expose the JNDI context for object lookup. Switch this flag to "true" in order to expose the JNDI environment (including the authorization context) for each EJB invocation, as needed by WebLogic for EJBs with authorization requirements.
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.
Invokes the create()
method on the cached EJB home object.
NamingException | if thrown by JNDI |
---|---|
InvocationTargetException | if thrown by the create method |
Determine the create method of the given EJB home object.
home | the EJB home object |
---|
EjbAccessException | if the method couldn't be retrieved |
---|
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.
NamingException | if proxy creation failed |
---|
Perform the given invocation on the current EJB home, within the thread context being prepared accordingly. Template method to be implemented by subclasses.
invocation | the AOP method invocation |
---|
Throwable | in case of invocation failure |
---|
Return whether the cached EJB home object is potentially subject to on-demand refreshing. Default is "false".
Refresh the cached home object, if applicable. Also caches the create method on the home object.
NamingException | if thrown by the JNDI lookup |
---|