I am using EJB3.0. I have an application running on websphere app server v7 who is executing a remote ejb 3.0 running in a different application on the same app server. I use @EJB annotation to inject remote interface in my code. It runs fine, so I am sure all configuration and code is ok.
When the other application (containing the ejb) is restarted (it may be deployed because of a fix elsewhere in the code) my application and its client does not run anymore, it seems to lose the reference of the ejb stub. I can fix the problem simply restarting my application, but it is not a good practice in our production environment.
I would like to re-inject or renew the ejb if needed. Is it possible? Another way should be creating ejb stubs and adding them to my application (not a good thing anyway, I would avoid it). I also tried to switch to the old 'lookup' way through InitialContext but only get a ClassCastException on stubs... again, it seems to need concrete stubs again...
Is there a simple solution to this 'classic' scenario? Thank you MMad