Justin Deoliveira ha scritto:
> Andrea Aime wrote:
>> Justin Deoliveira ha scritto:
>>>> Anyways, this is less critical, I think it would be better to
>>>> solve the above regression part before releasing GeoServer 1.7.6
>>>> instead given it's (rightfully imho) perceived as a regression
>>>> from the users pov (it makes NG datastore not a drop in replacement
>>>> for old ones).
>>> Agreed. If you want to cook up a patch I will be happy to review asap 
>>> before 1.7.6.
>>
>> So I tried to make a patch but there is a design problem in the 
>> ContentDataStore that won't let me implement a fix.
>> In order to remember whether a column was skipped I added a marker
>> in the feature type user map. JDCBDataStore.createFeatureSource
>> uses that mark to decide whether to return a store or a source,
>> but to do that it needs the feature type, and getSchema(typeName)
>> triggers the creation of a feature sources again, since it's the
>> ContentFeatureSource that computes the feature type to start with.
>> Long story short, infinite recursion.
>>
>> Some possible ways forward:
>> - make the datastore compute the feature type instead of the source
>> - workaound and make getSchema call a special method that won't
>>   have to decide if to create a store or a source
>>   (createFeatureSource(name, transaction, forceReadOnly)?)
> 
> Well createFeatureSource() gets passed a content entry, which has a 
> reference to a content state, which contains the feature type.

Oh, does it?

> So what we could do is make sure the content state for auto transaction 
> always has a feature type set even before createFeatureSource() is called.

Hem... how can this be done if in order to create the feature type
you have to build a feature source to start with?

But we can check the content state, if it has the feature type we can
just get it, and if it's still not there (see the circularity above)
then we return a source?
However, this will break if the user first creates a datastore
and then goes to get the feature source directly no (because he
knows the type name he wants before hand). Confused.

Cheers
Andrea


>>
>> Cheers
>> Andrea
>>
> 
> 


-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to