On Thu, May 16, 2013 at 11:39 AM, carlo cancellieri <
[email protected]> wrote:

> Hi all,
>  I'm working on a cached data store and I'm encountering a problem
> configuring it at startup (or catalog reload):
>
> Its configuration is based on an existing datastore (which will work as
> original source for the cache).
> It is retrieved using a Reposotory at startup but often my cached
> datastore is loaded before the 'source' so the repository will return a
> null datastore and the resulting cached data store will be loaded as
> disabled.
>
> A way to solve this is to have the source datastore configured as part of
> the cached datastore but I'd like to keep things separated if it's possible.
>
> What I'm looking for is a way to apply a dependency or to define a
> priority within datastores.
> Is it actually possible?
>

Not at the moment, the stores now are loaded as they get read from the XML
disk configuration, to do what
you ask GeoServer should be modified to add a priority field, then to load
all the XML in memory without
actually trying to load the store in memory, and then apply the priority...
messy.

We actually discussed more than a time about not having to load the actual
stores on startup,
which is something that slows it down significantly.
The loading that we have today is just to check their config is sane and if
it's not, they get disabled,
which in turn causes also issues with the order of startup of external
services (e.g., say the spatial
database gets started after GeoServer).

The reason for the checks was that misconfigured stores lead to faulty
capabilities documents, however
David make the caps document creation a bit more transactional, and when a
particular flag is raised,
a faulty layer does not provent the proper caps creation anymore.
Unfortunately that flag is off by default (we should really turn it on by
default in the 2.4.x series imho).

And then we can add another global flag, to allow enabling/disabling the
store checking during startup.

That should also solve your problem, and I think it would be easier to
implement and more useful
 in general.

Cheers
Andrea

-- 
==
GeoServer training in Milan, 6th & 7th June 2013!  Visit
http://geoserver.geo-solutions.it for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to