[Geoserver-devel] Re: [Geotools-devel] EPSG factory update

On Thu, 2005-02-17 at 12:30 +1100, Martin Desruisseaux wrote:

The old way to connect to a JDBC database:

     java.sql.DriverManager.getConnection(...)

is kind of deprecated by Sun. The recommended way is

     javax.sql.DataSource

I updated the EPSG Factory accordingly (in the new CRS framework only),
which means removing most of the old java.util.prefs.Preferences way,
which was non-standard for JDBC databases. J2EE applications can now
register the EPSG data source using the standard Java Naming and
Direction (JNDI) framework. If no naming directory service is running,
the default data source is the one from the JDBC-ODBC bridge.

I guess this same approach should be taken for JDBC based DataStores,
since when geoserver is running in a corporate environment it would be
much useful to just setup your JNDI data sources through your webapp
container, which already does connection pooling.

To do that, would it be needed that each jdbc based datastore defines
their preffered JNDI resource name for easy lookup? thay also could
accept the JNDI name through a parameter mutualy exclusive with the rest
of connection related parameters?

Gabriel.