Enhancement to Local/SimpleRemoteStatelessSessionProxyFactoryBean [SPR-129] #4862
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Mike Youngstrom opened SPR-129 and commented
When an ejb is being accessed by a deployment that isn't in the same .ear there is a situation on some servers where an object obtained by a StatelessSessionProxyFactoryBean becomes invalid when the ejb this object references is redeployed or in the case of a Remote EJB if the remote server is shutdown or restarted (probably a bigger issue).
There are a couple of different solutions I'll sugjest, however, I'm no ejb expert so there may be other better solutions.
Retry approach. It may be possible to listen for a certain exception when executing. When recieved the Stateless Proxy could attemt to botain a new Object and try again before passing the error on to the client. One possible problem with this approach is perhaps not all containers will throw the same exception for such an error. I believe JBoss throws a NullPointerException.
Flag approach. This could be used in combination with Spring core JMS pom.xml #1. Simply add a flag to the Bean that tells it if it should cache ejb objects or not. Since I personally run into this issue a lot when developing it is probably less of an issue in production. Though still a problem the flag could help development and if the performance concerns are warented the user could turn off this flag in production use.
Handle approach. Though this may not help performance any perhaps a SimpleRemote bean could work off of a Remote EJBHandle. I believe a Handle should properly reconnect in any case.
Mike
Affects: 1.0.1
The text was updated successfully, but these errors were encountered: