Accessing remote SLSBs(Stateless Session Bean):-
Accessing remote EJBs is essentially identical to accessing local EJBs, except
that the SimpleRemoteStatelessSessionProxyFactoryBean or <jee:remote-slsb>
configuration element is used. Of course, with or without Spring, remote
invocation semantics apply; a call to a method on an object in another VM in
another computer does sometimes have to be treated differently in terms of usage
scenarios and failure handling.
There is also possible to obtain remote EJB component by using
SimpleRemoteStatelessSessionProxyFactoryBean instead of
LocalStatelessSessionProxyFactoryBean and remote-slsb instead of local-slsb
in case of spring-jee.xsd schema. The JndiEnvironment probably will be required
to specify to access remote objects.
1 Prepare EJB component
2 Define an appropriate Spring bean representing EJB (point to right JNDI name, business interface, optionally set additional properties e.g. resourceRef) by specifying FactoryBean class: org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean or org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean
3 Use the bean definition where needed