0

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

  • I'd open a ticket with the vendor (IBM) in this case... btw: is it really a remote call (you can do local calls between applications as long as you're on the same service instance)? – home Jul 03 '13 at 16:49
  • I was also under the impression that Websphere is supporting "Parallel Deployment" to even make sure that the client/client ejb has zero downtime. – Big Bad Baerni Jul 04 '13 at 06:05
  • as far as I know local call can be used inside the same application, we have two different applications for client and for ejb, even in the same server. I have also been told that this is a 'classic' scenario, but can't believe the only solution is creating and adding the stubs to the client application or restarting the client app everytime the ejb app is deployed. About Parallel Deployment: I don't know such feature, I will try to deepen websphere infocenter. – user2547476 Jul 04 '13 at 07:25

1 Answers1

0

I remember seeing such problems in earlier WebSphere 7 versions, but they were fixed in more recent versions. You should install the latest fix pack for 7.0, and if the problem still persists, open a PMR with IBM.

Andreas Veithen
  • 8,868
  • 3
  • 25
  • 28