comparison flys-client/src/main/java/de/intevation/flys/client/server/RiverServiceImpl.java @ 1367:ab8eb2f544f2

Replaced stdout and stderr logging with log4j loggers in server classes. flys-client/trunk@3069 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 25 Oct 2011 12:31:15 +0000
parents 924da6695800
children bc06a671ef60
comparison
equal deleted inserted replaced
1366:d0eb2202ffbe 1367:ab8eb2f544f2
6 import javax.xml.xpath.XPathConstants; 6 import javax.xml.xpath.XPathConstants;
7 7
8 import org.w3c.dom.Document; 8 import org.w3c.dom.Document;
9 import org.w3c.dom.NodeList; 9 import org.w3c.dom.NodeList;
10 import org.w3c.dom.Node; 10 import org.w3c.dom.Node;
11
12 import org.apache.log4j.Logger;
11 13
12 import com.google.gwt.user.server.rpc.RemoteServiceServlet; 14 import com.google.gwt.user.server.rpc.RemoteServiceServlet;
13 15
14 import de.intevation.artifacts.common.ArtifactNamespaceContext; 16 import de.intevation.artifacts.common.ArtifactNamespaceContext;
15 import de.intevation.artifacts.common.utils.XMLUtils; 17 import de.intevation.artifacts.common.utils.XMLUtils;
32 */ 34 */
33 public class RiverServiceImpl 35 public class RiverServiceImpl
34 extends RemoteServiceServlet 36 extends RemoteServiceServlet
35 implements RiverService 37 implements RiverService
36 { 38 {
39 private static final Logger logger =
40 Logger.getLogger(RiverServiceImpl.class);
41
42
37 /** The XPath string that points to the rivers in the resulting document.*/ 43 /** The XPath string that points to the rivers in the resulting document.*/
38 public static final String XPATH_RIVERS = "/art:rivers/art:river"; 44 public static final String XPATH_RIVERS = "/art:rivers/art:river";
39 45
40 /** The error message key that is thrown if an error occured while reading 46 /** The error message key that is thrown if an error occured while reading
41 * the supported rivers from server.*/ 47 * the supported rivers from server.*/
83 } 89 }
84 90
85 return (River[]) theRivers.toArray(new River[count]); 91 return (River[]) theRivers.toArray(new River[count]);
86 } 92 }
87 catch (ConnectionException ce) { 93 catch (ConnectionException ce) {
88 System.err.println(ce.getLocalizedMessage()); 94 logger.error(ce, ce);
89 } 95 }
90 96
91 throw new ServerException(ERROR_NO_RIVERS_FOUND); 97 throw new ServerException(ERROR_NO_RIVERS_FOUND);
92 } 98 }
93 } 99 }

http://dive4elements.wald.intevation.org