Revision 45694 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial/org.gvsig.h2spatial.h2gis132/org.gvsig.h2spatial.h2gis132.provider/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialHelper.java
H2SpatialHelper.java | ||
---|---|---|
22 | 22 |
package org.gvsig.fmap.dal.store.h2; |
23 | 23 |
|
24 | 24 |
import java.io.File; |
25 |
import java.io.IOException; |
|
25 | 26 |
import java.sql.Connection; |
26 | 27 |
import java.sql.SQLException; |
27 | 28 |
import java.text.MessageFormat; |
... | ... | |
134 | 135 |
|
135 | 136 |
private BasicDataSource dataSource = null; |
136 | 137 |
|
137 |
private final H2SpatialConnectionParameters connectionParameters;
|
|
138 |
private H2SpatialConnectionParameters connectionParameters; |
|
138 | 139 |
|
139 | 140 |
private static Server server = null; |
140 | 141 |
private static boolean startServer = true; |
... | ... | |
371 | 372 |
needRegisterDriver = false; |
372 | 373 |
} |
373 | 374 |
|
375 |
@Override |
|
376 |
public void dispose() { |
|
377 |
if( this.dataSource!=null ) { |
|
378 |
try { |
|
379 |
this.dataSource.close(); |
|
380 |
} catch (SQLException ex) { |
|
381 |
LOGGER.warn("Can't close BasicDataSource", ex); |
|
382 |
} |
|
383 |
this.dataSource = null; |
|
384 |
} |
|
385 |
this.connectionParameters = null; |
|
386 |
} |
|
387 |
|
|
374 | 388 |
} |
375 | 389 |
|
376 | 390 |
private ConnectionProvider connectionProvider = null; |
Also available in: Unified diff