1

I have an applicationContext xml file that imports multiple resources (camel context files).

<import resource="AddRequest.xml" >              
<import resource="AdviseRequest.xml" >

I am caching the definitions of this xml before hand using new FileSystemXmlApplicationContext().

Say AddRequest.xml uses some method to connect to some host, while AdviseRequest.xml uses CXF endpoint to SOAP.

When I try to load the applicationContext xml, it tries to caches both files first before actually starting camelContext. At this stage, it is trying to check the CXF endpoint availabilty. Is there anyway to handle this, if the soap wsdl is actually down ?

The reason is, if there's some connection issues in the second xml, my first xml also fails, as it tries to cache both at a time.

Note: I cannot use two separate applicationContext files

I have used below code in the camel route.

<onException id="Request_onException1">
      <exception>java.net.ConnectException</exception>
      <handled>
          <constant>true</constant>
      </handled>

</onException>
Eray Balkanli
  • 7,752
  • 11
  • 48
  • 82

0 Answers0