• Post Reply Bookmark Topic Watch Topic
  • New Topic

Asynchronous notification of a stateful session bean  RSS feed

Math Elem
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

I am new to ejb development and to this forum, and my question is as follows:

I have a stateful session bean which at some point in its logic needs to invoke a service via a restful API. The service however cannot return the value to the ejb in the HTTP response as it requires sometime to process the request. The state of my ejb is reliant on the results of that asynchronous request it makes to an independant service.

What can I do to notify the ejb that the results are available?

Is there a way for the service to asynchronously notify the stateful session bean of the result of the request? The service is within a J2EE container and can be on a different server than the stateful session bean.

I was thinking of implementing a message driven bean that listens to the request_complete event published by the service, but i don't know how to corelate the request_complete event with the specific instance of the stateful session bean.

you input is greatly appreciated.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!