Announcement Announcement Module
Collapse
No announcement yet.
Dealing with unavailable web services Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dealing with unavailable web services

    Hi,

    I'm using JaxRpcPortProxyFactoryBean to provide access to a web service I need for my application and, when the service is up (I have no control over it), all is fine.

    My question is how to deal with the situation when the service is down at application startup. Currently, this throws a BeanCreationException when the application context is read. Is there anything in Spring to deal with this situation? Basically, not just fail, but continue to construct the rest of the beans/services. Then, when the specific service is needed, check to see if it has actually been constructed correctly, maybe try again, etc.

    thanks for any pointers,

    Jonny

  • #2
    I guess you could create a separate ApplicationContext/BeanFactory for JaxRpcPortProxyFactoryBean and surround the loading of this isolated application context with try catch.

    Comment


    • #3
      Re: Dealing with unavailable web services

      Originally posted by jwray
      Hi,

      I'm using JaxRpcPortProxyFactoryBean to provide access to a web service I need for my application and, when the service is up (I have no control over it), all is fine.

      My question is how to deal with the situation when the service is down at application startup. Currently, this throws a BeanCreationException when the application context is read. Is there anything in Spring to deal with this situation? Basically, not just fail, but continue to construct the rest of the beans/services. Then, when the specific service is needed, check to see if it has actually been constructed correctly, maybe try again, etc.

      thanks for any pointers,

      Jonny
      I'm not sure, but I don't think it should fail at startup at all, unless you try to get the wsdl from the server.

      Comment

      Working...
      X