Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/UserServiceImpl.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 |
---|---|
3 import javax.xml.xpath.XPathConstants; | 3 import javax.xml.xpath.XPathConstants; |
4 | 4 |
5 import org.w3c.dom.Document; | 5 import org.w3c.dom.Document; |
6 import org.w3c.dom.Node; | 6 import org.w3c.dom.Node; |
7 import org.w3c.dom.NodeList; | 7 import org.w3c.dom.NodeList; |
8 | |
9 import org.apache.log4j.Logger; | |
8 | 10 |
9 import com.google.gwt.user.server.rpc.RemoteServiceServlet; | 11 import com.google.gwt.user.server.rpc.RemoteServiceServlet; |
10 | 12 |
11 import de.intevation.artifacts.common.ArtifactNamespaceContext; | 13 import de.intevation.artifacts.common.ArtifactNamespaceContext; |
12 import de.intevation.artifacts.common.utils.XMLUtils; | 14 import de.intevation.artifacts.common.utils.XMLUtils; |
26 */ | 28 */ |
27 public class UserServiceImpl | 29 public class UserServiceImpl |
28 extends RemoteServiceServlet | 30 extends RemoteServiceServlet |
29 implements UserService | 31 implements UserService |
30 { | 32 { |
33 private static final Logger logger = Logger.getLogger(UserServiceImpl.class); | |
34 | |
35 | |
31 public static final String ERROR_NO_SUCH_USER = "error_no_such_user"; | 36 public static final String ERROR_NO_SUCH_USER = "error_no_such_user"; |
32 | 37 |
33 public User getCurrentUser(String serverUrl, String locale) | 38 public User getCurrentUser(String serverUrl, String locale) |
34 throws AuthenticationException | 39 throws AuthenticationException |
35 { | 40 { |
56 | 61 |
57 return new DefaultUser(uuid, name); | 62 return new DefaultUser(uuid, name); |
58 } | 63 } |
59 } | 64 } |
60 catch (ConnectionException ce) { | 65 catch (ConnectionException ce) { |
61 System.err.println(ce.getLocalizedMessage()); | 66 logger.error(ce, ce); |
62 } | 67 } |
63 | 68 |
64 System.err.println("No users existing in the server."); | 69 logger.error("No users existing in the server."); |
65 throw new AuthenticationException(ERROR_NO_SUCH_USER); | 70 throw new AuthenticationException(ERROR_NO_SUCH_USER); |
66 } | 71 } |
67 } | 72 } |
68 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 73 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |