From: Dustin P. <dparker@Forwardslope.com> - 2010-09-21 22:54:14
|
Hello again, While making sure that my patch for the previous problem was working correctly, I noticed there were still some legitimate log messages being printed about JDBCDataStore.dispose(). Here's a stack trace for the creation of a data store that didn't get cleaned up: > Daemon Thread [ScannerThread] (Suspended (breakpoint at line 366 in org.geotools.jdbc.JDBCDataStore)) > owns: java.lang.Class<T> (org.geotools.data.DataAccessFinder) (id=738) > owns: org.geoserver.catalog.ResourcePool$DataStoreCache (id=758) > owns: java.util.concurrent.ConcurrentHashMap<K,V> (id=759) > owns: java.util.concurrent.ConcurrentHashMap<K,V> (id=760) > owns: java.lang.Object (id=761) > owns: org.apache.catalina.core.StandardContext (id=762) > owns: java.util.HashMap<K,V> (id=328) > owns: org.jboss.web.tomcat.service.TomcatDeployer (id=763) > owns: org.jboss.web.WebModule (id=764) > owns: org.jboss.system.ServiceController (id=331) > owns: org.jboss.web.tomcat.service.JBossWeb (id=215) > owns: org.jboss.deployment.scanner.URLDeploymentScanner (id=216) > org.geotools.jdbc.JDBCDataStore.setDatabaseSchema(java.lang.String) line: 366 > org.geotools.data.postgis.PostgisNGJNDIDataStoreFactory(org.geotools.jdbc.JDBCDataStoreFactory).createDataStore(java.util.Map) line: 178 > org.geotools.data.postgis.PostgisNGJNDIDataStoreFactory(org.geotools.jdbc.JDBCDataStoreFactory).createDataStore(java.util.Map) line: 50 > org.geotools.data.DataAccessFinder.getDataStore(java.util.Map<java.lang.String,java.io.Serializable>, java.util.Iterator<? extends org.geotools.data.DataAccessFactory>) line: 129 > org.geotools.data.DataAccessFinder.getDataStore(java.util.Map<java.lang.String,java.io.Serializable>) line: 95 > org.geotools.data.complex.config.AppSchemaDataAccessConfigurator.aquireSourceDatastores() line: 550 > org.geotools.data.complex.config.AppSchemaDataAccessConfigurator.buildMappings() line: 180 > org.geotools.data.complex.config.AppSchemaDataAccessConfigurator.buildMappings(org.geotools.data.complex.config.AppSchemaDataAccessDTO) line: 157 > org.geotools.data.complex.AppSchemaDataAccessFactory.createDataStore(java.util.Map) line: 94 > org.vfny.geoserver.util.DataStoreUtils.getDataAccess(java.util.Map) line: 97 > org.geoserver.catalog.ResourcePool.getDataStore(org.geoserver.catalog.DataStoreInfo) line: 298 > org.geoserver.catalog.impl.DataStoreInfoImpl.getDataStore(org.opengis.util.ProgressListener) line: 37 > org.geoserver.config.GeoServerLoader.readCatalog(org.geoserver.config.util.XStreamPersister) line: 580 > org.geoserver.config.GeoServerLoader.loadCatalog(org.geoserver.catalog.Catalog, org.geoserver.config.util.XStreamPersister) line: 160 > org.geoserver.config.GeoServerLoader.postProcessBeforeInitialization(java.lang.Object, java.lang.String) line: 131 The constructors for all the data stores that didn't get cleaned up passed through AppSchemaDataAccessConfigurator calls, so it seems the most likely culprit. I have 2.6.1 loaded in my IDE, so I don't know if it's changed significantly since then, but this class's field > private Map sourceDataStores; is written to a few times, but the source data stores don't seem to get saved off anywhere or disposed of. Some FeatureSources are extracted from them as needed by mappings, so it's possible that those could get disposed later on, but if a data store isn't used in a mapping, there's no way. Any ideas on what to do? I'm happy to submit another patch or fix my setup ;) -- Dustin Parker - Forward Slope, Inc. Cell: 619 277 2591 |