• Post Reply Bookmark Topic Watch Topic
  • New Topic

Situation when Web services are down  RSS feed

 
Vivek Alampally
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
If I have Webervices deployed on server A, and my application which is using web services is deployed on Server B then if A is down for some reason, How do I start application on B.


I am using CXF as a web service implementation language. When I start my application which uses webservices I am getting exception regarding the connection info.


Please give your comments!!
 
Vivek Alampally
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By connection info, I mean some exception (connection not found or connection timed out). So basically my question is-
What needs to be done to my application to start up succeessfully, when the web service itself is down.

I cannot continuously monitor web services wheather my web services are active, right?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
First of all, you need to handle the error caused by the web service being down when you start your application up. This is to ensure that your application is not terminated due to the error.
Second, you can implement a periodic task in your application that checks whether the web service is back up.
When this task finds that the web service is back up, it can set a flag that allow for some other part of your application to start sending requests to the web service.
Later, if the web service once again becomes unavailable, the flag can be reset and the periodic task re-enabled etc etc.
Best wishes!
 
Vivek Alampally
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ivan Krizsan,
I will try to implement your idea using Apache CXF and get back to you on this.
 
H Paul
Ranch Hand
Posts: 491
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some once said, "He who asks a question is a fool for five minutes;
he who does not ask remains a fool forever"


Yes, let me be a fool for 5 minutes.

What is the nature of the app in term of availablity, etc...

Is below flow feasible and/or advisable in term of design?

Server B: App B----->Proxy -----> Webservice: Server A

1. Let App B go thru a Proxy
2. What Proxy does:
a. if A is up
forward the request to A
b. if A is down
Queue the requests for later re-submit
Send email notification to Production Group to check status of "Webservice and/or Server A"


3. To do: Re-submit the request from the queue when Webservice: Server A is up.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!