2 |
|
|
3 |
import java.awt.Component; |
import java.awt.Component; |
4 |
import java.net.MalformedURLException; |
import java.net.MalformedURLException; |
5 |
|
import java.sql.Connection; |
6 |
|
import java.sql.DriverManager; |
7 |
|
import java.sql.SQLException; |
8 |
import java.util.HashMap; |
import java.util.HashMap; |
9 |
import java.util.regex.Pattern; |
import java.util.regex.Pattern; |
10 |
|
|
11 |
|
import javax.management.RuntimeErrorException; |
12 |
|
|
13 |
import org.apache.commons.lang.ArrayUtils; |
import org.apache.commons.lang.ArrayUtils; |
14 |
|
import org.apache.commons.lang.StringUtils; |
15 |
|
import org.apache.log4j.Logger; |
16 |
import org.geotools.data.postgis.PostgisNGDataStoreFactory; |
import org.geotools.data.postgis.PostgisNGDataStoreFactory; |
17 |
import org.geotools.jdbc.JDBCDataStore; |
import org.geotools.jdbc.JDBCDataStore; |
18 |
import org.geotools.jdbc.JDBCDataStoreFactory; |
import org.geotools.jdbc.JDBCDataStoreFactory; |
19 |
|
import org.jfree.util.Log; |
20 |
|
|
21 |
import schmitzm.swing.BooleanInputOption; |
import schmitzm.swing.BooleanInputOption; |
22 |
import schmitzm.swing.ManualInputOption; |
import schmitzm.swing.ManualInputOption; |
26 |
import schmitzm.swing.MultipleOptionPane; |
import schmitzm.swing.MultipleOptionPane; |
27 |
import schmitzm.swing.SelectionInputOption; |
import schmitzm.swing.SelectionInputOption; |
28 |
import schmitzm.swing.SelectionInputOption.Combo; |
import schmitzm.swing.SelectionInputOption.Combo; |
29 |
|
import skrueger.db.PGUtil; |
30 |
|
|
31 |
/** |
/** |
32 |
* This class describes all settings needed to connect to a WFS server. This |
* This class describes all settings needed to connect to a WFS server. This |
39 |
* connection into a {@link String} with {@link #toPropertiesString()} and |
* connection into a {@link String} with {@link #toPropertiesString()} and |
40 |
* re-import the String with {@link #parsePropertiesString(String)}. |
* re-import the String with {@link #parsePropertiesString(String)}. |
41 |
*/ |
*/ |
42 |
public class DbServerSettings extends HashMap<Object, Object> { |
public class DbServerSettings extends ServerSettings<Object, Object> { |
43 |
|
|
44 |
|
Logger log = Logger.getLogger(DbServerSettings.class); |
45 |
|
|
46 |
|
public enum DbType { |
47 |
|
postgis("postgresql"); |
48 |
|
|
49 |
|
private final String protocolString; |
50 |
|
|
51 |
|
DbType(String protocolString) { |
52 |
|
this.protocolString = protocolString; |
53 |
|
} |
54 |
|
|
55 |
|
public String getProtocolString() { |
56 |
|
return protocolString; |
57 |
|
}; |
58 |
|
} |
59 |
|
|
60 |
/** |
/** |
61 |
* params.put(JDBCDataStoreFactory.DBTYPE.key, "postgis"); |
* params.put(JDBCDataStoreFactory.DBTYPE.key, "postgis"); |
75 |
public enum Key { |
public enum Key { |
76 |
} |
} |
77 |
|
|
78 |
public enum DbType { |
private static Connection dbc; |
|
postgis("postgresql"); |
|
79 |
|
|
80 |
private final String protocolString; |
/** |
81 |
|
* Opens a GUI that asks the use define a DB connection. |
82 |
|
* |
83 |
|
* @param dbServer |
84 |
|
* <code>null</code> to create a new instance, or an instance to |
85 |
|
* edit. |
86 |
|
* @return <code>null</code> if the user cancelled the creation of a new |
87 |
|
* {@link DbServerSettings}, otherwise the edited instance. |
88 |
|
*/ |
89 |
|
public static DbServerSettings createOrEdit(Component owner, |
90 |
|
DbServerSettings dbServer) { |
91 |
|
boolean newCreated = false; |
92 |
|
|
93 |
DbType(String protocolString) { |
if (dbServer == null) { |
94 |
this.protocolString = protocolString; |
newCreated = true; |
95 |
|
dbServer = new DbServerSettings(DbType.postgis); |
96 |
} |
} |
97 |
|
|
98 |
public String getProtocolString() { |
Combo<DbType> dpTypeInput = new SelectionInputOption.Combo<DbType>( |
99 |
return protocolString; |
"Database type", true, DbType.values(), ArrayUtils.indexOf( |
100 |
}; |
DbType.values(), dbServer.getDbType()), DbType.values()); |
101 |
|
|
102 |
|
Text hostInput = new ManualInputOption.Text("Hostname", true, |
103 |
|
dbServer.getHost()); |
104 |
|
|
105 |
|
Integer portInput = new ManualInputOption.Integer("Port", true, |
106 |
|
dbServer.getPort()); |
107 |
|
|
108 |
|
Text databaseInput = new ManualInputOption.Text("Database", true, |
109 |
|
dbServer.getDatabase()); |
110 |
|
|
111 |
|
Text schemaInput = new ManualInputOption.Text("Schema", true, |
112 |
|
dbServer.getSchema()); |
113 |
|
|
114 |
|
Text userInput = new ManualInputOption.Text("Username", true, |
115 |
|
dbServer.getUsername()); |
116 |
|
|
117 |
|
PasswordViewable passwdInput = new ManualInputOption.PasswordViewable( |
118 |
|
"Password", true, dbServer.getPassword()); |
119 |
|
|
120 |
|
BooleanInputOption exposePkInput = new BooleanInputOption( |
121 |
|
"Expose primary keys", dbServer.getExposePrimaryKey()); |
122 |
|
|
123 |
|
Object[] input = MultipleOptionPane.showMultipleInputDialog(owner, |
124 |
|
"DB Connection paramters", dpTypeInput, hostInput, portInput, |
125 |
|
databaseInput, schemaInput, userInput, passwdInput, |
126 |
|
exposePkInput); |
127 |
|
|
128 |
|
if (input == null) { |
129 |
|
if (newCreated) |
130 |
|
return null; |
131 |
|
else |
132 |
|
return dbServer; |
133 |
|
} else { |
134 |
|
dbServer.setDbType((DbType) input[0]); |
135 |
|
dbServer.setHost((String) input[1]); |
136 |
|
dbServer.setPort((java.lang.Integer) input[2]); |
137 |
|
dbServer.setDatabase((String) input[3]); |
138 |
|
dbServer.setSchema((String) input[4]); |
139 |
|
dbServer.setUsername((String) input[5]); |
140 |
|
dbServer.setPassword(String.valueOf((char[]) input[6])); |
141 |
|
dbServer.setExposePrimaryKey((Boolean) input[7]); |
142 |
|
} |
143 |
|
|
144 |
|
return dbServer; |
145 |
|
|
146 |
} |
} |
147 |
|
|
148 |
public void setPort(java.lang.Integer port) { |
/** |
149 |
put(JDBCDataStoreFactory.PORT.key, port); |
* @return transforms the settings to a String that can be stored in a |
150 |
|
* .properties line. @see #parsePropertiesString |
151 |
|
* @throws MalformedURLException |
152 |
|
*/ |
153 |
|
@Override |
154 |
|
public DbServerSettings parsePropertiesString(String propString) |
155 |
|
throws MalformedURLException { |
156 |
|
|
157 |
|
if (propString == null || propString.isEmpty()) |
158 |
|
throw new IllegalArgumentException("parameter to parse was empty"); |
159 |
|
try { |
160 |
|
|
161 |
|
String[] split = propString.split(Pattern.quote(DELIMITER)); |
162 |
|
|
163 |
|
int i = 0; |
164 |
|
DbServerSettings dbServer = new DbServerSettings( |
165 |
|
DbType.valueOf(split[i++])); |
166 |
|
|
167 |
|
dbServer.setTitle(split[i++]); |
168 |
|
dbServer.setHost(split[i++]); |
169 |
|
dbServer.setPort(java.lang.Integer.valueOf(split[i++])); |
170 |
|
dbServer.setUsername(StringUtils.stripToNull(split[i++])); |
171 |
|
dbServer.setPassword(split[i++]); |
172 |
|
dbServer.setDatabase(split[i++]); |
173 |
|
dbServer.setExposePrimaryKey(Boolean.valueOf(split[i++])); |
174 |
|
dbServer.setSchema(stringOrNull(split[i++])); |
175 |
|
|
176 |
|
return dbServer; |
177 |
|
} catch (Exception e) { |
178 |
|
Log.warn("couldn't parse " + propString, e); |
179 |
|
return null; |
180 |
|
} |
181 |
} |
} |
182 |
|
|
183 |
public java.lang.Integer getPort() { |
private String[] cachedTypeNames = null; |
184 |
java.lang.Integer port = (java.lang.Integer) get(JDBCDataStoreFactory.PORT.key); |
private String[] cachedGeometryTableNames; |
185 |
if (port == null) |
|
186 |
return (java.lang.Integer) JDBCDataStoreFactory.PORT.sample; |
public DbServerSettings() { |
187 |
return port; |
this(DbType.postgis); |
188 |
|
|
189 |
} |
} |
190 |
|
|
191 |
public void setSchema(String schema) { |
public DbServerSettings(DbType dbType) { |
192 |
put(JDBCDataStoreFactory.SCHEMA.key, schema); |
setDbType(dbType); |
193 |
|
setHost("localhost"); |
194 |
|
setSchema("public"); |
195 |
|
put(JDBCDataStoreFactory.PK_METADATA_TABLE.key, null); |
196 |
} |
} |
197 |
|
|
198 |
public String getSchema() { |
public DbServerSettings(String propertiesString) { |
199 |
return (String) get(JDBCDataStoreFactory.SCHEMA.key); |
try { |
200 |
|
parsePropertiesString(propertiesString); |
201 |
|
} catch (MalformedURLException e) { |
202 |
|
throw new RuntimeException(e); |
203 |
|
} |
204 |
} |
} |
205 |
|
|
206 |
public void setExposePrimaryKey(Boolean exportPk) { |
public String[] getCachedTypeNames() { |
207 |
put(JDBCDataStoreFactory.EXPOSE_PK.key, exportPk); |
return cachedTypeNames; |
208 |
|
} |
209 |
|
|
210 |
|
public String getDatabase() { |
211 |
|
return (String) get(JDBCDataStoreFactory.DATABASE.key); |
212 |
|
} |
213 |
|
|
214 |
|
public DbType getDbType() { |
215 |
|
String dbt = (String) get(PostgisNGDataStoreFactory.DBTYPE.key); |
216 |
|
if (dbt != null) |
217 |
|
return DbType.valueOf(dbt); |
218 |
|
return null; |
219 |
} |
} |
220 |
|
|
221 |
public Boolean getExposePrimaryKey() { |
public Boolean getExposePrimaryKey() { |
225 |
return expk; |
return expk; |
226 |
} |
} |
227 |
|
|
|
public void setHost(String host) { |
|
|
put(JDBCDataStoreFactory.HOST.key, host); |
|
|
} |
|
|
|
|
228 |
public String getHost() { |
public String getHost() { |
229 |
return (String) get(JDBCDataStoreFactory.HOST.key); |
return (String) get(JDBCDataStoreFactory.HOST.key); |
230 |
} |
} |
231 |
|
|
|
public void setPassword(String password) { |
|
|
put(JDBCDataStoreFactory.PASSWD.key, password); |
|
|
} |
|
|
|
|
232 |
public String getPassword() { |
public String getPassword() { |
233 |
return (String) get(JDBCDataStoreFactory.PASSWD.key); |
return (String) get(JDBCDataStoreFactory.PASSWD.key); |
234 |
} |
} |
235 |
|
|
236 |
public void setUsername(String username) { |
public java.lang.Integer getPort() { |
237 |
put(JDBCDataStoreFactory.USER.key, username); |
java.lang.Integer port = (java.lang.Integer) get(JDBCDataStoreFactory.PORT.key); |
238 |
|
if (port == null) |
239 |
|
return (java.lang.Integer) JDBCDataStoreFactory.PORT.sample; |
240 |
|
return port; |
241 |
|
} |
242 |
|
|
243 |
|
public String getSchema() { |
244 |
|
return (String) get(JDBCDataStoreFactory.SCHEMA.key); |
245 |
} |
} |
246 |
|
|
247 |
public String getUsername() { |
public String getUsername() { |
248 |
return (String) get(JDBCDataStoreFactory.USER.key); |
return (String) get(JDBCDataStoreFactory.USER.key); |
249 |
} |
} |
250 |
|
|
251 |
public void setDatabase(String db) { |
/** |
252 |
put(JDBCDataStoreFactory.DATABASE.key, db); |
* @return <code>true</code>, if all parameters look OK, without actually |
253 |
} |
* opening any connection. |
254 |
|
*/ |
255 |
|
public boolean isWellDefined() { |
256 |
|
if (getDbType() == null) |
257 |
|
return false; |
258 |
|
|
259 |
public String getDatabase() { |
if (getHost() == null) |
260 |
return (String) get(JDBCDataStoreFactory.DATABASE.key); |
return false; |
261 |
|
|
262 |
|
if (getUsername() == null) |
263 |
|
return false; |
264 |
|
|
265 |
|
if (getPassword() == null) |
266 |
|
return false; |
267 |
|
|
268 |
|
if (getPort() == null) |
269 |
|
return false; |
270 |
|
|
271 |
|
if (getSchema() == null) |
272 |
|
return false; |
273 |
|
|
274 |
|
return true; |
275 |
} |
} |
276 |
|
|
277 |
/** |
public void setCachedTypeNames(String[] cachedTypeNames) { |
278 |
* Character used to separate the parameters when serializing settings to a |
this.cachedTypeNames = cachedTypeNames; |
279 |
* String |
} |
|
*/ |
|
|
private static final String DELIMITER = "|"; |
|
280 |
|
|
281 |
public DbServerSettings(DbType dbType) { |
public void setDatabase(String db) { |
282 |
setDbType(dbType); |
put(JDBCDataStoreFactory.DATABASE.key, db); |
|
setHost("localhost"); |
|
|
setSchema("public"); |
|
283 |
} |
} |
284 |
|
|
285 |
public void setDbType(DbType dbType) { |
public void setDbType(DbType dbType) { |
299 |
|
|
300 |
} |
} |
301 |
|
|
302 |
public DbType getDbType() { |
public void setExposePrimaryKey(Boolean exportPk) { |
303 |
String dbt = (String) get(PostgisNGDataStoreFactory.DBTYPE.key); |
put(JDBCDataStoreFactory.EXPOSE_PK.key, exportPk); |
|
if (dbt != null) |
|
|
return DbType.valueOf(dbt); |
|
|
return null; |
|
304 |
} |
} |
305 |
|
|
306 |
public DbServerSettings() { |
public void setHost(String host) { |
307 |
|
put(JDBCDataStoreFactory.HOST.key, host); |
308 |
} |
} |
309 |
|
|
310 |
/** |
public void setPassword(String password) { |
311 |
* @return <code>true</code>, if all parameters look OK, without actually |
put(JDBCDataStoreFactory.PASSWD.key, password); |
312 |
* opening any connection. |
} |
|
*/ |
|
|
public boolean isWellDefined() { |
|
|
if (getDbType() == null) |
|
|
return false; |
|
|
|
|
|
if (getHost() == null) |
|
|
return false; |
|
|
|
|
|
if (getUsername() == null) |
|
|
return false; |
|
|
|
|
|
if (getPassword() == null) |
|
|
return false; |
|
313 |
|
|
314 |
if (getPort() == null) |
public void setPort(java.lang.Integer port) { |
315 |
return false; |
put(JDBCDataStoreFactory.PORT.key, port); |
316 |
|
} |
317 |
|
|
318 |
if (getSchema() == null) |
public void setSchema(String schema) { |
319 |
return false; |
put(JDBCDataStoreFactory.SCHEMA.key, schema); |
320 |
|
} |
321 |
|
|
322 |
return true; |
public void setUsername(String username) { |
323 |
|
put(JDBCDataStoreFactory.USER.key, username); |
324 |
} |
} |
325 |
|
|
326 |
/** |
/** |
334 |
serialized.append(getDbType().toString()); |
serialized.append(getDbType().toString()); |
335 |
serialized.append(DELIMITER); |
serialized.append(DELIMITER); |
336 |
|
|
337 |
|
serialized.append(getTitle()); |
338 |
|
serialized.append(DELIMITER); |
339 |
|
|
340 |
serialized.append(getHost()); |
serialized.append(getHost()); |
341 |
serialized.append(DELIMITER); |
serialized.append(DELIMITER); |
342 |
|
|
356 |
serialized.append(DELIMITER); |
serialized.append(DELIMITER); |
357 |
|
|
358 |
serialized.append(getSchema().toString()); |
serialized.append(getSchema().toString()); |
359 |
serialized.append(DELIMITER); |
// serialized.append(DELIMITER); |
360 |
|
|
361 |
return serialized.toString(); |
return serialized.toString(); |
362 |
} |
} |
363 |
|
|
|
/** |
|
|
* @return transforms the settings to a String that can be stored in a |
|
|
* .properties line. @see #parsePropertiesString |
|
|
* @throws MalformedURLException |
|
|
*/ |
|
|
public static DbServerSettings parsePropertiesString(String propString) |
|
|
throws MalformedURLException { |
|
|
|
|
|
if (propString == null || propString.isEmpty()) |
|
|
throw new IllegalArgumentException("parameter to parse was empty"); |
|
|
|
|
|
String[] split = propString.split(Pattern.quote(DELIMITER)); |
|
|
|
|
|
// BaseUrl |
|
|
try { |
|
|
DbType dbt = DbType.valueOf(split[0]); |
|
|
|
|
|
DbServerSettings dbServer = new DbServerSettings(dbt); |
|
|
|
|
|
dbServer.setHost(split[1]); |
|
|
dbServer.setPort(java.lang.Integer.valueOf(split[2])); |
|
|
dbServer.setUsername(split[3]); |
|
|
dbServer.setPassword(split[4]); |
|
|
dbServer.setDatabase(split[5]); |
|
|
dbServer.setExposePrimaryKey(Boolean.valueOf(split[6])); |
|
|
dbServer.setSchema(split[7]); |
|
|
|
|
|
return dbServer; |
|
|
} catch (Exception e) { |
|
|
throw new IllegalArgumentException(e); |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
364 |
@Override |
@Override |
365 |
public String toString() { |
public String toString() { |
366 |
|
|
372 |
|
|
373 |
s.append(getHost()); |
s.append(getHost()); |
374 |
|
|
375 |
if (getPort() != 5432) { |
if (getPort() != null && getPort() != 5432) { |
376 |
s.append(":" + getPort()); |
s.append(":" + getPort()); |
377 |
} |
} |
378 |
|
|
381 |
return s.toString(); |
return s.toString(); |
382 |
} |
} |
383 |
|
|
|
public void setCachedTypeNames(String[] cachedTypeNames) { |
|
|
this.cachedTypeNames = cachedTypeNames; |
|
|
} |
|
|
|
|
|
public String[] getCachedTypeNames() { |
|
|
return cachedTypeNames; |
|
|
} |
|
|
|
|
|
private String[] cachedTypeNames = null; |
|
|
|
|
|
public String getTitle() { |
|
|
// TODO |
|
|
return "" + getDbType(); |
|
|
} |
|
|
|
|
384 |
/** |
/** |
385 |
* Opens a GUI that asks the use define a DB connection. |
* returns a valid Connection to our postgresql Database. Name of database, |
386 |
|
* username and password must be provided. |
387 |
* |
* |
388 |
* @param dbServer |
* @param database |
389 |
* <code>null</code> to create a new instance, or an instance to |
* name of the database |
390 |
* edit. |
* @param username |
391 |
* @return <code>null</code> if the user cancelled the creation of a new |
* a valid username |
392 |
* {@link DbServerSettings}, otherwise the edited instance. |
* @param password |
393 |
|
* valid password |
394 |
|
* @return database connection |
395 |
|
* @throws SQLException |
396 |
|
* @throws ClassNotFoundException |
397 |
*/ |
*/ |
398 |
public static DbServerSettings createOrEdit(Component owner, |
public Connection getDatabaseConnection() { |
|
DbServerSettings dbServer) { |
|
|
boolean newCreated = false; |
|
399 |
|
|
400 |
if (dbServer == null) { |
try { |
|
newCreated = true; |
|
|
dbServer = new DbServerSettings(DbType.postgis); |
|
|
} |
|
401 |
|
|
402 |
Combo<DbType> dpTypeInput = new SelectionInputOption.Combo<DbType>( |
if (dbc == null || dbc.isClosed()) { |
403 |
"Database type", true, DbType.values(), ArrayUtils.indexOf( |
dbc = createNewDatabaseConnection(); |
404 |
DbType.values(), dbServer.getDbType()), DbType.values()); |
} |
405 |
|
return dbc; |
406 |
|
} catch (Exception e) { |
407 |
|
return null; |
408 |
|
} |
409 |
|
} |
410 |
|
|
411 |
Text hostInput = new ManualInputOption.Text("Hostname", true, |
private Connection createNewDatabaseConnection() throws SQLException { |
412 |
dbServer.getHost()); |
try { |
413 |
|
Class.forName("org.postgresql.Driver"); |
414 |
|
} catch (ClassNotFoundException e) { |
415 |
|
throw new RuntimeException(e); |
416 |
|
} |
417 |
|
String url = "jdbc:postgresql://" + getHost() |
418 |
|
// + (":" + PropertyUtils.getDbPort()) |
419 |
|
+ ("/" + getDatabase()); |
420 |
|
|
421 |
Integer portInput = new ManualInputOption.Integer("Port", true, |
String password = getPassword(); |
422 |
dbServer.getPort()); |
String username = getUsername(); |
423 |
|
|
424 |
Text databaseInput = new ManualInputOption.Text("Database", true, |
// log.debug("DB URL: " + url + " u=" + username + " p=" |
425 |
dbServer.getDatabase()); |
// + password); |
426 |
|
|
427 |
Text schemaInput = new ManualInputOption.Text("Schema", true, |
return DriverManager.getConnection(url, username, password); |
428 |
dbServer.getSchema()); |
} |
429 |
|
|
430 |
Text userInput = new ManualInputOption.Text("Username", true, |
public String[] getDescribedTablesWithGeometry() { |
|
dbServer.getUsername()); |
|
431 |
|
|
432 |
PasswordViewable passwdInput = new ManualInputOption.PasswordViewable( |
if (cachedGeometryTableNames == null) { |
|
"Passwort", true, dbServer.getPassword()); |
|
433 |
|
|
434 |
BooleanInputOption exposePkInput = new BooleanInputOption( |
Connection dc; |
435 |
"Expose primary keys", dbServer.getExposePrimaryKey()); |
try { |
436 |
|
dc = createNewDatabaseConnection(); |
437 |
|
try { |
438 |
|
|
439 |
Object[] input = MultipleOptionPane.showMultipleInputDialog(owner, |
cachedGeometryTableNames = PGUtil |
440 |
"DB Connection paramters", dpTypeInput, hostInput, portInput, |
.getColumnsDescribedInGeometryColumnsTable(dc |
441 |
databaseInput, schemaInput, userInput, passwdInput, |
.createStatement()); |
|
exposePkInput); |
|
442 |
|
|
443 |
if (input == null) { |
} catch (SQLException e) { |
444 |
if (newCreated) |
log.error(e, e); |
445 |
return null; |
} finally { |
446 |
else |
dc.close(); |
447 |
return dbServer; |
} |
448 |
} else { |
} catch (SQLException e1) { |
449 |
dbServer.setDbType((DbType) input[0]); |
log.error(e1, e1); |
450 |
dbServer.setHost((String) input[1]); |
return new String[0]; |
451 |
dbServer.setPort((java.lang.Integer) input[2]); |
} |
|
dbServer.setDatabase((String) input[3]); |
|
|
dbServer.setSchema((String) input[4]); |
|
|
dbServer.setUsername((String) input[5]); |
|
|
dbServer.setPassword(String.valueOf((char[]) input[6])); |
|
|
dbServer.setExposePrimaryKey((Boolean) input[7]); |
|
452 |
} |
} |
453 |
|
return cachedGeometryTableNames; |
454 |
|
} |
455 |
|
|
456 |
return dbServer; |
@Override |
457 |
|
protected void finalize() throws Throwable { |
458 |
|
super.finalize(); |
459 |
|
dispose(); |
460 |
|
} |
461 |
|
|
462 |
|
public void dispose() { |
463 |
|
try { |
464 |
|
if (dbc != null && !dbc.isClosed()) { |
465 |
|
dbc.close(); |
466 |
|
dbc = null; |
467 |
|
} |
468 |
|
} catch (SQLException e) { |
469 |
|
log.error("Error while disposing the database connection to " |
470 |
|
+ toString(), e); |
471 |
|
} |
472 |
} |
} |
473 |
} |
} |