/[projects]/android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureServlet.java
ViewVC logotype

Diff of /android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureServlet.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 348 by torben, Sun Sep 27 19:14:39 2009 UTC revision 421 by torben, Thu Oct 8 12:19:42 2009 UTC
# Line 24  import org.w3c.dom.DOMImplementation; Line 24  import org.w3c.dom.DOMImplementation;
24  import org.w3c.dom.Document;  import org.w3c.dom.Document;
25  import org.w3c.dom.Element;  import org.w3c.dom.Element;
26    
27    import dk.thoerup.curcuitbreaker.CircuitBreakerException;
28  import dk.thoerup.traininfoservice.DBConnection;  import dk.thoerup.traininfoservice.DBConnection;
29    
30  /**  /**
# Line 48  public class DepartureServlet extends Ht Line 49  public class DepartureServlet extends Ht
49                  String stationName = getStationName(station);                  String stationName = getStationName(station);
50    
51                  try {                  try {
52                          beans = fetcher.lookupDepartures(station);                          beans = fetcher.cachedLookupDepartures(station);
53                  } catch (java.net.SocketTimeoutException ste) {                  } catch (java.net.SocketTimeoutException ste) {
54                          logger.warning("Read timed out, station="+station);                          logger.warning("Read timed out, station="+station);
55                          resp.sendError(500);                          resp.sendError(500);
56                          return;                          return;
57                  } catch (Exception e) {                  } catch (CircuitBreakerException cbe) {
58                            logger.warning("Circuitbreaker - failing fast");
59                            resp.sendError(500);
60                            return;
61                    } catch (Throwable e) {                
62                          logger.log(Level.WARNING, "Unknown exception, station=" +station, e);                          logger.log(Level.WARNING, "Unknown exception, station=" +station, e);
63                          resp.sendError(500);                          resp.sendError(500);
64                          return;                          return;

Legend:
Removed from v.348  
changed lines
  Added in v.421

  ViewVC Help
Powered by ViewVC 1.1.20