org.geotools.data.oracle
Class OracleNGOCIDataStoreFactory

Object
  extended by AbstractDataStoreFactory
      extended by JDBCDataStoreFactory
          extended by OracleNGDataStoreFactory
              extended by OracleNGOCIDataStoreFactory
All Implemented Interfaces:
DataAccessFactory, DataStoreFactorySpi, Factory

public class OracleNGOCIDataStoreFactory
extends OracleNGDataStoreFactory

Creates an Oracle datastore based on a thick OCI client connection, instead of the traditional (thin) jdbc connection. The thin JDBC connection was designed for clients requiring no more classes than just ojdbc14.jar. The OCI JDBC drivers are based on the Oracle client software and rely mostly on the C/C++ based OCI (Oracle Call Interface) runtime.

Looking over the internet it's not clear whether the OCI setup is faster than thin driver, different benchmarks report different results, but for sure OCI allows to expose a wider set of configurations and in particular it's recognized as the best way to connect to an Oracle cluster.

Instead of the instance, host, port requirements of the normal oracle factory this driver just requires the 'alias', which refers to values defined by the Oracle Net Configuration assistant and stored in $ORACLE_HOME/NETWORK/ADMIN/tnsnames.ora. We have also had luck on the same computer with just leaving 'alias' as an empty string, and it seems to have a reasonable default behavior.

Author:
Chris Holmes, TOPP, Bernard de Terwangne, star.be, Andrea Aime - OpenGeo
Module:

Nested Class Summary
 
Nested classes/interfaces inherited from interface DataAccessFactory
DataAccessFactory.Param
 
Field Summary
static DataAccessFactory.Param ALIAS
          The alias parameter used to specify the database to connect to
 
Fields inherited from class OracleNGDataStoreFactory
DBTYPE, LOOSEBBOX, PORT
 
Fields inherited from class JDBCDataStoreFactory
DATABASE, DATASOURCE, EXPOSE_PK, FETCHSIZE, HOST, MAX_OPEN_PREPARED_STATEMENTS, MAXCONN, MAXWAIT, MINCONN, NAMESPACE, PASSWD, PK_METADATA_TABLE, SCHEMA, USER, VALIDATECONN
 
Constructor Summary
OracleNGOCIDataStoreFactory()
           
 
Method Summary
 String getDescription()
          Describe the nature of the datasource constructed by this factory.
 String getDisplayName()
          Default Implementation abuses the naming convention.
protected  String getJDBCUrl(Map params)
          Builds up the JDBC url in a jdbc:://:/ Override if you need a different setup
protected  void setupParameters(Map parameters)
          Sets up the database connection parameters.
 
Methods inherited from class OracleNGDataStoreFactory
checkDBType, createDataStoreInternal, createSQLDialect, getDatabaseID, getDriverClassName, getValidationQuery
 
Methods inherited from class JDBCDataStoreFactory
canProcess, checkDBType, createDataSource, createDataSource, createDataStore, createNewDataStore, getImplementationHints, getParametersInfo, isAvailable
 
Methods inherited from class AbstractDataStoreFactory
getParameters
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALIAS

public static final DataAccessFactory.Param ALIAS
The alias parameter used to specify the database to connect to

Constructor Detail

OracleNGOCIDataStoreFactory

public OracleNGOCIDataStoreFactory()
Method Detail

getDisplayName

public String getDisplayName()
Description copied from class: AbstractDataStoreFactory
Default Implementation abuses the naming convention.

Will return Foo for org.geotools.data.foo.FooFactory.

Specified by:
getDisplayName in interface DataAccessFactory
Overrides:
getDisplayName in class OracleNGDataStoreFactory
Returns:
return display name based on class name

getDescription

public String getDescription()
Description copied from interface: DataAccessFactory
Describe the nature of the datasource constructed by this factory.

A non localized description of this data store type.

Specified by:
getDescription in interface DataAccessFactory
Overrides:
getDescription in class OracleNGDataStoreFactory
Returns:
A human readable description that is suitable for inclusion in a list of available datasources.

getJDBCUrl

protected String getJDBCUrl(Map params)
                     throws IOException
Description copied from class: JDBCDataStoreFactory
Builds up the JDBC url in a jdbc:://:/ Override if you need a different setup

Overrides:
getJDBCUrl in class OracleNGDataStoreFactory
Returns:
Throws:
IOException

setupParameters

protected void setupParameters(Map parameters)
Description copied from class: JDBCDataStoreFactory
Sets up the database connection parameters.

Subclasses may extend, but should not override. This implementation registers the following parameters.

Subclass implementation may remove any parameters from the map, or may overrwrite any parameters in the map.

Overrides:
setupParameters in class OracleNGDataStoreFactory
Parameters:
parameters - Map of Param objects.


Copyright © 1996-2010 Geotools. All Rights Reserved.