Repository: incubator-trafodion Updated Branches: refs/heads/master 1e8691465 -> 4b86c640d
Correct some mistakes (hp) Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/4bbaa871 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/4bbaa871 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/4bbaa871 Branch: refs/heads/master Commit: 4bbaa871edeaf74d1dfd5ca8b0963c61e707defa Parents: d0644d4 Author: liu.yu <[email protected]> Authored: Tue Nov 28 14:07:45 2017 +0800 Committer: liu.yu <[email protected]> Committed: Tue Nov 28 14:07:45 2017 +0800 ---------------------------------------------------------------------- .../src/asciidoc/_chapters/accessing.adoc | 35 ++++++++++---------- .../src/asciidoc/_chapters/messages.adoc | 18 +++++----- .../asciidoc/_chapters/properties_detail.adoc | 6 ++-- 3 files changed, 29 insertions(+), 30 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4bbaa871/docs/jdbct4ref_guide/src/asciidoc/_chapters/accessing.adoc ---------------------------------------------------------------------- diff --git a/docs/jdbct4ref_guide/src/asciidoc/_chapters/accessing.adoc b/docs/jdbct4ref_guide/src/asciidoc/_chapters/accessing.adoc index a9b0e01..1a0ebaf 100644 --- a/docs/jdbct4ref_guide/src/asciidoc/_chapters/accessing.adoc +++ b/docs/jdbct4ref_guide/src/asciidoc/_chapters/accessing.adoc @@ -38,8 +38,8 @@ methods for obtaining a JDBC connection to the underlying database. All JDBC data source classes implement either the `javax.sql.DataSource` interface or the `javax.sql.ConnectionPoolDataSource` interface. The Type -4 driver data source classes are `org.trafodion.jdbc.t4.HPT4DataSource` and -`org.trafodion.jdbc.t4.HPT4ConnectionPoolDataSource`. (These classes are +4 driver data source classes are `org.trafodion.jdbc.t4.TrafT4DataSource` and +`org.trafodion.jdbc.t4.TrafT4ConnectionPoolDataSource`. (These classes are defined by the JDBC 3.0 specification.) Typically, a user or system administrator uses a tool to create a data @@ -132,37 +132,36 @@ For details about Type 4 driver properties that you can use with the `DataSource 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 `HPT4DataSource` object or -the `HPT4ConnectionPoolDataSource` object. +appropriate getter or setter methods on the `TrafT4DataSource` object or +the `TrafT4ConnectionPoolDataSource` object. *Example* [source, java] ---- -HPT4DataSource temp = new HPT4DataSource() ; +TrafT4DataSource temp = new TrafT4DataSource() ; temp.setCatalog( "TRAFODION" ) ; ---- In the following example, the code fragment illustrates the methods that a `DataSource` object `ds` needs to include if the object supports the `serverDataSource` property `ds.setServerDataSource( "my_server_datasource" )`. -In this example, the code shows setting properties for the `HPT4DataSource` object +In this example, the code shows setting properties for the `TrafT4DataSource` object to use the Type 4 driver to access a {project-name} database: [source, java] ---- -HPT4DataSource ds = new HPT4DataSource() ; +TrafT4DataSource ds = new TrafT4DataSource() ; -ds.setUrl( "jdbc:t4jdbc://<primary IP addr or host name>:2300/" ); -ds.setCatalog( "TRAFODION" ) ; +ds.setUrl( "jdbc:t4jdbc://<primary IP addr or host name>:23400/" ); ds.setSchema( "myschema" ) ; ds.setUser( "gunnar" ) ; ds.setPassword( "my_userpassword" ) ; // Properties relevant for Type 4 connection pooling. // Set ds.setMaxPoolSize(-1) for turning OFF connection pooling -ds.setMaxPoolSize( "10000" ) ; -ds.setMinPoolSize( "1000" ) ; +ds.setMaxPoolSize( "100" ) ; +ds.setMinPoolSize( "10" ) ; // Properties relevant for Type 4 statement pooling. // Set ds.setMaxStatement(0) for turning statement pooling OFF @@ -178,7 +177,7 @@ see <<creating-and-using-a-properties-file, Creating and Using a Properties File === Programmatically Registering the DataSource Object In the following example, the code shows how to register, programmatically, -the `HPT4DataSource` object `ds` that was created using the preceding code with JNDI. +the `TrafT4DataSource` object `ds` that was created using the preceding code with JNDI. [source, java] ---- @@ -265,7 +264,7 @@ When the JDBC application makes the connection, then the application should pass the properties file as a command-line parameter: ``` -java -Dhpt4jdbc.properties=<path of properties file on disk> +java -Dt4jdbc.properties=<path of properties file on disk> ``` [[connection-by-using-the-drivermanager-class]] @@ -339,7 +338,7 @@ To establish a connection, the JDBC application can use this code: ---- Class.forName( "org.trafodion.jdbc.t4.T4Driver" ) ; //loads the driver -String url = "jdbc:hpt4jdbc://<database primary IP address>:23400/" +String url = "jdbc:t4jdbc://<database primary IP address>:23400/" Connection con = DriverManager.getConnection( url, "userID", "Passwd" ) ; ---- @@ -521,7 +520,7 @@ are met again. In the Type 4 driver, API layer classes are implemented as instance-specific objects to ensure thread safety: -* `HPT4DataSource.getConnection()` is implemented as a synchronized method +* `TrafT4DataSource.getConnection()` is implemented as a synchronized method to ensure thread safety in getting a connection. * Once a connection is made, the `Connection` object is instance-specific. @@ -638,8 +637,8 @@ Message: INFOSTATS command can only be executed ---- Statement s = conn.createStatement( ) ; -HPT4PreparedStatement p = - (HPT4PreparedStatement)conn.prepareStatement( +TrafT4PreparedStatement p = + (TrafT4PreparedStatement)conn.prepareStatement( "SELECT * FROM t WHERE i = ?" ) ; boolean results = s.execute( "INFOSTATS " + p.getStatementLabel() ) ; @@ -766,7 +765,7 @@ property and issues the `getString()` method. [source, java] ---- -java -Dhpt4jdbc.ISO88591=SJIS test1.java +java -Dt4jdbc.ISO88591=SJIS test1.java // The following method invocation returns a String object, which // was created using the "SJIS" Java canonical name as the charset http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4bbaa871/docs/jdbct4ref_guide/src/asciidoc/_chapters/messages.adoc ---------------------------------------------------------------------- diff --git a/docs/jdbct4ref_guide/src/asciidoc/_chapters/messages.adoc b/docs/jdbct4ref_guide/src/asciidoc/_chapters/messages.adoc index 7fc168f..a4dd697 100644 --- a/docs/jdbct4ref_guide/src/asciidoc/_chapters/messages.adoc +++ b/docs/jdbct4ref_guide/src/asciidoc/_chapters/messages.adoc @@ -154,7 +154,7 @@ HYC00 Unsupported feature - {0} *Cause*: An attempt was made to set the transaction isolation level to an invalid value. -*Effect*: `HPT4Connection.setTransactionIsolation` does not set the transaction isolation value. +*Effect*: `TrafT4Connection.setTransactionIsolation` does not set the transaction isolation value. *Recovery*: Valid isolation values are: `SQL_TXN_READ_COMMITTED`, @@ -186,7 +186,7 @@ If no isolation value is specified, the default is `SQL_TXN_READ_COMMITTED`. *Cause*: An attempt was made to set an invalid result-set concurrency value. -*Effect*: The `HPT4Statement` call with `resultSetConcurrency` fails. +*Effect*: The `TrafT4Statement` call with `resultSetConcurrency` fails. *Recovery*: Valid resultSetConcurrency values are: CONCUR_READ_ONLY and CONCUR_UPDATABLE. @@ -759,26 +759,26 @@ the `getPooledConnection()` method. ``` *Cause*: Attempted to access a BLOB column without setting the property -`hpt4jdbc.blobTableName`, or the property is set to an invalid value. +`t4jdbc.blobTableName`, or the property is set to an invalid value. *Effect*: The application cannot access BLOB columns. -*Recovery*: Set the `hpt4jdbc.blobTableName` property to a valid LOB table +*Recovery*: Set the `t4jdbc.blobTableName` property to a valid LOB table name. The LOB table name is of format `catalog.schema.lobTableName`. === 29060 HY000 ``` -29060 HY000 'hpt4jdbc.clobTableName' property is not set or set to null value or set to invalid value. +29060 HY000 't4jdbc.clobTableName' property is not set or set to null value or set to invalid value. ``` *Cause*: Attempted to access a CLOB column without setting the -`propertyhpt4jdbc.clobTableName` property, or the property is set to null +property `t4jdbc.clobTableName`, or the property is set to null value or set to an invalid value. *Effect*: The application cannot access CLOB columns. -*Recovery*: Set the `hpt4jdbc.clobTableName` property to a valid LOB table +*Recovery*: Set the `t4jdbc.clobTableName` property to a valid LOB table name. The LOB table name is of format `catalog.schema.lobTableName`. === 29061 HY00 @@ -1657,7 +1657,7 @@ Expected: <expected_version> Actual: <actual_version>. *Effect*: Operation fails. *Recovery*: Evaluate any error or error detail information accompanying the -message. Install compatible versions of the driver and HP connectivity +message. Install compatible versions of the driver and Trafodion connectivity server. <<< @@ -1673,7 +1673,7 @@ Expected: <expected_signature> Actual: <actual_signature>. *Effect*: Operation fails. *Recovery*: Evaluate any error or error detail information accompanying the -message. Install compatible versions of the driver and HP connectivity +message. Install compatible versions of the driver and Trafodion connectivity server. http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/4bbaa871/docs/jdbct4ref_guide/src/asciidoc/_chapters/properties_detail.adoc ---------------------------------------------------------------------- diff --git a/docs/jdbct4ref_guide/src/asciidoc/_chapters/properties_detail.adoc b/docs/jdbct4ref_guide/src/asciidoc/_chapters/properties_detail.adoc index 876cc71..be403de 100644 --- a/docs/jdbct4ref_guide/src/asciidoc/_chapters/properties_detail.adoc +++ b/docs/jdbct4ref_guide/src/asciidoc/_chapters/properties_detail.adoc @@ -395,7 +395,7 @@ applies. To set the maximum idle time to 5 minutes (300 seconds): ``` -java -Dhpt4jdbc.maxIdleTime=300 +java -Dt4jdbc.maxIdleTime=300 ``` <<< @@ -649,7 +649,7 @@ The following command reserves 150 data locators for program class `myProgramClass`. ``` -java -Dhpt4jdbc.reserveDataLocators=150 myProgramClass +java -Dt4jdbc.reserveDataLocators=150 myProgramClass ``` <<< @@ -830,7 +830,7 @@ to the level of tracing provided when calling the `setLogWriter()` method of the *Example* -To enable tracing, use the `hpt4jdbc.T4LogLevel` property specified in the command line: +To enable tracing, use the `t4jdbc.T4LogLevel` property specified in the command line: ``` -Dt4jdbc.T4LogLevel=FINE
