Announcement Announcement Module
Collapse

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
Detect optional service is not available Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Detect optional service is not available

    Hello,

    I have a service A which uses an other one B.

    I would like A to have a behaviour like this:
    - If B is available, use B for the sub-task
    - If B is not available, A does it itself (the default way).

    So, is there a way to detect a service is not available without waiting the timeout and catching the thrown exception?

    I know I can deploy a default service C and use ranking in order to use B before C if it exists, but in some cases, it could be far more easier to have an inner default implementation.

    Thanks.

  • #2
    Why not creating a service listener which will be notified when the service is detected. This could change an inner status of your class (let's say a boolean serviceAvailable to make it simple). Then you could check this status : if serviceAvailble ==> use it, otherwise ==> default implementation.

    Comment

    Working...
    X