Application schema doesn't dispose datastores ---------------------------------------------
Key: GEOT-3273 URL: http://jira.codehaus.org/browse/GEOT-3273 Project: GeoTools Issue Type: Bug Components: data app-schema Affects Versions: 2.6.6, 2.7-M4 Reporter: Ben Caradoc-Davies Assignee: Ben Caradoc-Davies Fix For: 2.6.6, 2.7-M4 {code} -------- Original Message -------- Subject: [Geotools-gt2-users] Application schema doesn't dispose datastores? Date: Wed, 22 Sep 2010 06:54:01 +0800 From: Dustin Parker To: geotools-gt2-us...@lists.sourceforge.net 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. {code} -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel