On Wed, Dec 18, 2013 at 3:35 PM, Ron Lindhoudt <rlindho...@yahoo.com> wrote:
> Hi Andrea,
>
> Maybe I am missing some knowledge about JDBCDatastores and connection
> pools.
> How can I share a connection pool between 2 different datastores?
> As far as I know a connection pool is part of a datastore and always
> separate.
> In other words if i create two datastores then two connection pools are
> created.
>
> This is what I do:
>
> java.util.Map params = new java.util.HashMap();
> params.put("dbtype", "oracle");
>
> params.put("user", USER);
> params.put("passwd", PASSWORD);
>
> params.put("max connections", 50);
> params.put("min connections", 10);
> params.put("connection timeout", 5);
> params.put("validating connections", false);
>
> params.put( "host", HOST);
> params.put( "port", PORT);
> params.put( "database", SERVICE_NAME);
> datastore = new
> OracleNGDataStoreFactory().createDataStore(params);
>
> The value of "min connections" does not have any effect on the number of
> started Oracle database sessions.
>
You have to build a connection pool manually and then pass it as the "Data
Source" parameter, and
omit all other connection params, leaving just the db type and the schema
>
> Do you agree that it would be better that "database schema" is part of
> Query object instead of Datastore object?
>
I believe I don't, Query is a generic object, meant to work with all type
of stores, from shapefiles to
remote wfs servers, to databases. Schemas are a concept that's database
specific instead.
Besides, changing just Query would not do any good, all other methods of a
store require to know the
schema, not only the few that take a Query (getting the schema of a feature
type and writing are
two examples that do not have a Query as a parameter).
Cheers
Andrea
--
*== GeoSolutions will be closed for seasonal holidays from 23/12/2013 to
06/01/2014 ==*
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
-------------------------------------------------------
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users