Revision 47798 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/H2SpatialUtils.java
H2SpatialUtils.java | ||
---|---|---|
4 | 4 |
import java.sql.Connection; |
5 | 5 |
import java.sql.SQLException; |
6 | 6 |
import java.text.MessageFormat; |
7 |
import java.util.ArrayList; |
|
7 | 8 |
import java.util.HashMap; |
9 |
import java.util.List; |
|
8 | 10 |
import java.util.Map; |
9 | 11 |
import org.apache.commons.codec.binary.Hex; |
10 | 12 |
import org.apache.commons.io.FileUtils; |
... | ... | |
283 | 285 |
} |
284 | 286 |
x = connectionProvider.getConnection(); |
285 | 287 |
globalConnections.put(connectionProviderKey, x); |
288 |
|
|
289 |
//For debugging purposses, delete when finish. |
|
290 |
LOGGER.info("addGlobalConnection "+connectionProviderKey); |
|
291 |
LOGGER.info("globalConnections = "+globalConnections.size()+ " "); |
|
292 |
ThreadGroup threadGroup = Thread.currentThread().getThreadGroup(); |
|
293 |
Thread[] threadList = new Thread[threadGroup.activeCount()]; |
|
294 |
threadGroup.enumerate(threadList); |
|
295 |
List<String> threadNames = new ArrayList(); |
|
296 |
for (Thread thread : threadList) { |
|
297 |
if(thread != null && StringUtils.startsWith(thread.getName(), "MVStore background writer")) { |
|
298 |
threadNames.add(thread.getName()); |
|
299 |
} |
|
300 |
} |
|
301 |
if (threadNames.size() > 1) { |
|
302 |
for (String threadName : threadNames) { |
|
303 |
LOGGER.info("Thread "+threadName); |
|
304 |
} |
|
305 |
try { |
|
306 |
throw new RuntimeException("Excepcion para debug"); |
|
307 |
} catch (Exception ex) { |
|
308 |
LOGGER.info("addGlobalConnection " + connectionProviderKey, ex); |
|
309 |
} |
|
310 |
} |
|
311 |
LOGGER.info("=================="); |
|
312 |
// End "For debugging purposses, delete when finish." |
|
286 | 313 |
} |
287 | 314 |
|
288 | 315 |
public static String getConnectionProviderKey(JDBCConnectionParameters connectionParameters) { |
Also available in: Unified diff