Dustin,

I have made several changes to improve handling of source data stores in 
app-schema. In particular, unused source data stores are now disposed, 
and source data stores should all be disposed when an app-schema data 
access is disposed.
http://jira.codehaus.org/browse/GEOT-3273

Please let me know if these changes resolve the problem you reported.

Kind regards,
Ben.

On 22/09/10 06:54, Dustin Parker wrote:
> 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 ;)
>


-- 
Ben Caradoc-Davies <[email protected]>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to