Neoview JDBC Type 4 Driver Programmer's Reference (R2.2, R2.3, R2.4, R2.5)
Security
Clients connect to the Neoview platform with a valid user name and ID, using standard JDBC
3.0 APIs. An application can make multiple connections using different user IDs, and creating
different Connection objects.
The Type 4 driver provides for user name and password authentication. The password is
encrypted with a proprietary algorithm provided by NDCS.
NOTE: There is no secure wire communication such as SSL provided for the communication
between Type 4 driver and the Neoview platform.
How to Make a Connection to Neoview SQL
A Java application can obtain a JDBC connection to Neoview SQL in two ways:
• “Connection by Using the DataSource Interface”, the preferred method
• “Connection by Using the DriverManager Class” (page 24)
Connection by Using the DataSource Interface
The javax.sql.DataSource interface is the preferred way to establish a connection to the
database because this interface enhances the application portability. Portability is achieved by
allowing the application to use a logical name for a data source instead of providing driver-specific
information in the application. A logical name is mapped to a javax.sql.DataSource object
through a naming service that uses the Java Naming and Directory Interface (JNDI). Using this
DataSource method is particularly recommended for application servers.
Observe that two types of data sources interact here as described under “Data Sources” (page 21).
When an application requests a connection by using the getConnection method in the
DataSource, the method returns a Connection object.
A DataSource object is a factory for Connection objects. An object that implements the
DataSource interface is typically registered with a JNDI service provider.
Topics included in this subsection are:
• “Overview of Tasks to Deploy DataSource Objects” (page 22)
• “DataSource Object Properties” (page 23)
• “Programmatically Creating an Instance of the DataSource Class” (page 23)
• “Programmatically Registering the DataSource Object” (page 23)
• “Retrieving a DataSource Instance by Using JNDI and Connecting to the Data Source”
(page 24)
• “Specifying the Properties File that Configures the Data Source” (page 24)
Overview of Tasks to Deploy DataSource Objects
Before an application can connect to a DataSource object, typically the system administrator
deploys the DataSource object so that the application programmers can start using it.
Data source properties are usually set by a system administrator using a GUI tool as part of the
installation of the data source. Users to the data source do not get or set properties. Management
tools can get at properties by using introspection.
Tasks involved in creating and registering a database object are:
1. Creating an instance of the DataSource class.
2. Setting the properties of the DataSource object.
3. Registering the DataSource object with a naming service that uses the Java Naming and
Directory Interface (JNDI) API.
22 Accessing Neoview SQL Databases