comparison geo-backend/src/main/java/de/intevation/gnv/geobackend/sde/datasources/SDEConnection.java @ 129:110e3ac1b7d2

Library Dependencies Added to pom.xml-File Import of SDE-Datasources geo-backend/trunk@5 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Wed, 02 Sep 2009 09:07:03 +0000
parents
children
comparison
equal deleted inserted replaced
128:9b3f5a067c29 129:110e3ac1b7d2
1 /**
2 * Title: SdeConnection, $Header: /share/gdi/SDI-Suite/Repository/projekte/BSH-GDI/genericViewer/src/main/java/de/conterra/bsh/gdi/gnviewer/datasources/sde/SDEConnection.java,v 1.4 2008/01/30 12:38:34 blume Exp $
3 * Source: $Source: /share/gdi/SDI-Suite/Repository/projekte/BSH-GDI/genericViewer/src/main/java/de/conterra/bsh/gdi/gnviewer/datasources/sde/SDEConnection.java,v $
4 * created by: Stefan Blume (blume)
5 * erstellt am: 21.11.2007
6 * Copyright: con terra GmbH, 2005
7 *
8 * modified by: $Author: blume $
9 * modified on: $Date: 2008/01/30 12:38:34 $
10 * Version: $Revision: 1.4 $
11 * TAG: $Name: $
12 * locked from: $Locker: $
13 * CVS State: $State: Exp $
14 * Project: $ProjectName$
15 */
16 package de.intevation.gnv.geobackend.sde.datasources;
17
18 import org.apache.log4j.Logger;
19
20 import com.esri.sde.sdk.client.SeConnection;
21
22 import de.intevation.gnv.geobackend.sde.datasources.exception.TechnicalException;
23
24 /**
25 * The class <code>SDEConnection</code> fulfills the following purposes:
26 * <ol>
27 * <li>Providing an implementation of DatasourceConnection-Interface for a SDE database.</li>
28 * </ol>
29 *
30 * @author blume
31 * @version 1.0
32 * @serial 1.0
33 * @see
34 * @since 21.11.2007 08:51:43
35 */
36 public class SDEConnection implements DatasourceConnection {
37
38 /**
39 * Default Logging instance
40 */
41 private static final Logger sLogger = Logger.getLogger(SDEConnection.class);
42 private static boolean sDebug = sLogger.isDebugEnabled();
43
44 public SDEConnection() {
45 }
46
47 /**
48 * Get a SeConnection. Therefore this method will ask {@link de.conterra.bsh.gdi.gnviewer.datasources.sde.ArcSDEConnectionPool} for a connection.
49 *
50 * @return SeConnection
51 * @throws TechnicalException
52 */
53 public SeConnection getConnection() throws TechnicalException {
54 if (sDebug) sLogger.debug("getConnection()");
55 return ArcSDEConnectionPool.getInstance().getConnection();
56 }
57
58 /**
59 * Return a connection (to a connection pool).
60 * This method is executed after an executed query.
61 *
62 * @param pConnection the connection used for a query.
63 */
64 public void returnConnection(SeConnection pConnection) {
65 if (sDebug) sLogger.debug("returnConnection()");
66 try {
67 ArcSDEConnectionPool.getInstance().returnConnection(pConnection);
68 } catch (TechnicalException e) {
69 sLogger.error(e.getMessage(), e);
70 }
71 }
72 }

http://dive4elements.wald.intevation.org