Module Maintainer: |
||
Status: |
|
|
Email Help: |
jgarnett@refractions.net |
|
Plug-in: |
CRSAuthority |
|
User Docs: |
The epsg-oracle plugin is an experiment focused on cleaning up the JDBC Authority abstract classes to ensure the DataSource can be provided.
To develop this module you will need to follow the optional section in the developers guide for Oracle. This will place an oracle jdbc driver into your local maven repository where it can then be used during the online tests.
C:> cd C:\oracle\product\10.2.0\jdbc\lib
C:\oracle\product\10.2.0\jdbc\lib>mvn install:install-file -Dfile=ojdbc14.jar
-DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0 -Dpackaging=jar
|
The choice of maven profile (to use oracle or to not use oracle) is controlled with a oracle property.
mvn clean install -Doracle=true |
Or to set up for testing in eclipse:
mvn eclipse:eclipse -Doracle=true |
The other thing you will need to do for online tests is place a oracle.properties file describing your database in the magic location below.
user=jody password=*** url=jdbc:oracle:thin:@bilbi:1521:orcl |
You can then run the online tests:
mvn -Doracle.jdbc=true test -P online |
Some ideas on the use of DataSource in GeoTools (and how we can set up a testing environment are recorded here): J2EE and Connection Pools
In addition the following problems have been noted ...
org.geotools.referencing.factory:
AbstractAuthorityFactory - some features are just package-visible (org.geotools.referencing.factory)
BufferedAuthorityFactory had problem with put(Object, Object) not caching
org.geotools.referencing.factory.epsg:
AuthorityCodes is only package visisble
BursaWolfInfo is only package visible
DataSource - DataSource on our own (we need to use one provided by others)
DefaultFactory requirements
DATASOURCE_NAME to work in JBoss (should be configurable)Hints.EPSG_DATASOURCE_NAME.DEFAULT_BUFFER_MAX and DEFAULT_PRIORITY_DEC as constructor parameters, either as DefaultFactory(Hints, int, int) to expose the parent constructor, or as new Hints of their owncreateFactory() needs to wrap the DataSource obtained from JNDI into a class that implements the local DataSource interface.DataSource interface is now deprecated.createFactory() cannot bind the DataSource into JNDI (will not always have permission)createBackingStore() needs to close the JDBC connection obtained from the DataSource (thereby returning it to the pool)FactoryUsingAnsiSQL - should not cache the connection (the DataSource will do that)DataSource after the timeout. 2.4-SNAPSHOT already do that.FactoryUsingOracleSQL - addition to 'AS', the Oracle reserved word 'FILE' is replaced in the query Strings. This necessary because one query uses 'FILE' to rename a column in a SELECT for a column. This factory is used by the AbstractDataSourceFactoryUsingSQL - also caches the Connection instead of DataSourceTableInfo - not publicThe following bug reports are important:
DATASOURCE_NAME hint - should be of the form "java:EPSG" to keep JBoss happyFactoryUsingSQL should not remove connection from a pool like FactoryUsingSQL does (need to connect and close on each use). Needed for a multi user environment like Java EE.FactoryUsingSQL connection cache first)BufferedAuthorityFactory if we want caching to work. It would be possible to update BufferedAuthorityFactory in order to handle many instances of FactoryUsingSQL, but I would like to see if there is really a bottleneck there before to introduce this complication. I was assuming that in typical cases, a user will work with a small set of CRS (~5) appropriate for the area he is working on, in which case many instances of FactoryUsingSQL will not give us much.This is a research module, and is not currently tracked using Jira. This is however associated with referencing: