Recently I started using the oracle spatial DataStore to access an Oracle
10g instance.
I'm not an Oracle expert but I found out a few things.
To connect via JDBC you can use three different syntaxes (using the newest
version of
Oracle's driver, that is ojdbc14.jar version 102010):
1) jdbc:oracle:oci:@host:port:instance
2) jdbc:oracle:oci:@//host:port/instance
3)
jdbc:oracle:oci:@(DESCRIPTION=(FAILOVER=ON)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=
TCP)(HOST=...(DELAY=20))))
With the last syntax you can specify directly the entire parameters you'd
put
inside a tnsnames.ora file if using an OCI connection.
Adding support for the alternative syntaxes seems to be just a matter of
modifying a constructor of:
org.geotools.data.oracle.OracleConnectionFactory
like this:
public OracleConnectionFactory(String host, String port, String
instance) {
if( instance.startsWith("(") )
dbUrl = JDBC_PATH + instance;
else if( instance.startsWith("/") )
dbUrl = JDBC_PATH + "//" + host + ":" + port + instance;
else
dbUrl = JDBC_PATH + host + ":" + port + ":" + instance;
}
So if the instance parameter starts with a "(" the syntax 3) will be used.
If it starts with "/" the syntax 2) will be used.
Otherwise the "normal" syntax 1) will be used.
I could commit this myself, but I think it would be much better if the
module mantainer do it.
If you want it, I can add a JIRA task for this.
Bye
Paolo Rizzi
AVVERTENZE AI SENSI DEL D. LGS. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i
file/s allegato/i, sono da considerarsi strettamente riservate. Il loro
utilizzo è consentito esclusivamente al destinatario del messaggio, per le
finalità indicate nel messaggio stesso. Qualora riceveste questo messaggio
senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia
via e-mail e di procedere alla distruzione del messaggio stesso,
cancellandolo dal Vostro sistema; costituisce comportamento contrario ai
principi dettati dal D. Lgs. 196/2003 il trattenere il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse.
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel