Log:
valutazioni - 0, GPA: 0 ( )

Istruzioni per l'uso HP, Modello HP Integrity NonStop H-Series

Produttore : HP
File Size : 816.25 kb
File Nome :
Lingua di insegnamento: enfr
Vai a scaricare



da questo dispositivo ha anche altre istruzioni :

Facilità d'uso



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.
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.
An instance of the DataSource class and the DataSource object properties are usually set by an application developer or system administer using
a GUI tool as part of the installation of the data source. If you are using an installed data source, skip to topic Programmatically Creating an
Instance of a DataSource Object.
The subsequent topics show an example of performing these tasks programmatically
For more information about using data sources, see The JDBC Tutorial: Chapter 3- Advanced Tutorial
(http://java.sun.com/developer/Books/JDBCTutorial/index.html) or other information available in the field.
DataSource Object Properties
A DataSource object has properties that identify and describe the actual data source that the object represents. These properties include such
information as the URL for the MXCS association server, the database schema and catalog names, the location of the database server, the
name of the database, and so forth.
Note: When a JDBC application uses any server data source, the data source must be started before using it. Therefore,
if your application uses the default server data source, the server (MXCS) data source, ensure this data source is
started before attempting to make a connection. For more information, see the SQL/MX Connectivity Service
Manual
.
For details about Type 4 driver properties that you can use with the DataSource object, see the Type 4 Driver Properties chapter.
Programmatically Creating an Instance of the DataSource Class
A JDBC application can set DataSource properties programmatically and register with a DataSource object.
To get or set DataSource object properties programmatically, use the appropriate getter or setter methods on the SQLMXDataSource object or the
SQLMXConnectionPoolDataSource object. For example,
SQLMXDataSource temp = new SQLMXDataSource();
temp.setCatalog("abc");
In the following example, the code fragment illustrates the methods that a DataSource object ds needs to include if the object supports the
property serverName.
ds.setServerName("my_database_server");
In the following example, the code shows setting properties for the SQLMXDataSource object to use the Type 4 driver to access an SQL/MX
database:
SQLMXDataSource ds = new SQLMXDataSource();
ds.setUrl("jdbc:t4sqlmx://mynode.mycompanynetwork.net:port_number/";
ds.setCatalog("mycat");
ds.setSchema("myschema");
ds.setUser("lee");
ds.setPassword("safeguard password");
// Properties relevant for Type 4 connection pooling.
// Set ds.setMaxPoolSize( - 1) for turning OFF connection pooling
ds.setMaxPoolSize("10000");
ds.setMinPoolSize("1000");

// Properties relevant for Type 4 statement pooling.
// Set ds.setMaxStatement(0) for turning statement pooling OFF
// Statement pooling is enabled only when connection pooling is
// enabled.
ds.setMaxStatements("7000");
Programmatically Registering the DataSource Object
In the following example, the code shows how to register, programmatically, the SQLMXDataSource object ds that was created using the preceding
code with JDNI.
java.util.Hashtable env = new java.util.Hashtable();


...

Questo manuale è adatto anche per i modelli :
Computer - HP Integrity NonStop J-Series (816.25 kb)

Scrivi la tua opinione del dispositivo



Il messaggio
Il tuo nome :
Inserire le due cifre :
capcha





categorie