sun-javadb-10.3.2.1/ 0000755 0415062 0001750 00000000000 10730010246 013326 5 ustar lh136778 clustra sun-javadb-10.3.2.1/CHANGES.html 0000644 0415062 0001750 00000034152 10723513011 015271 0 ustar lh136778 clustra
sun-javadb-10.3.2.1/RELEASE-NOTES.html 0000644 0415062 0001750 00000040142 10723513011 016163 0 ustar lh136778 clustraThe following table lists issues in JIRA which were fixed between Derby release 10.3.2.1 and the preceding release 10.3.1.4. This includes issues for the product source, documentation and tests
Issue Id Description DERBY-3232 Top-level index.html in releases incorrectly indicates support for JDBC 2.1 in 10.3 releases DERBY-3216 do row level lock space reclamation in btree of indiv rows. DERBY-3190 New simple demo suitable for supported Java ME platforms DERBY-3187 SimpleApp (demo) does not work in a client setting DERBY-3183 'Error starting tracing' in testTraceCommands(org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlApiTest) on Windows... DERBY-3178 DataSourceTest uses ConnectionEventListener but never verifies that events are getting fired DERBY-3176 J2ME support for phoneME platform disabled in 10.3 DERBY-3175 NullPointerException on INSERT after ALTER TABLE ... DROP COLUMN DERBY-3174 NetworkServerControlApiTest fails with java.security.AccessControlException if not run as first test DERBY-3172 ConnectionEventListener.connectionErrorOccurred not being executed when SQLState 08006 Error is thrown DERBY-3159 SYSCS_SET_USER_ACCESS fails if the user name contains characters not allowed in regular identifiers. DERBY-3158 Repeat calls to SYSCS_UTIL.SYSCS_SET_USER_ACCESS() for the same user and permission fail with repeated user in list exception. DERBY-3147 Remove unused code that allow identifiers to be lower-cased. DERBY-3145 ComparisonFailure in synonym(org.apache.derbyTesting.functionTests.tests.lang.LangScripts) DERBY-3142 sysinfo ignores derby.ui.locale DERBY-3140 InListMultiProbeTest creates 30000 DataRow objects that do not get released during suites.All run DERBY-3136 Cut down on object creations in LIKE clause implementation of territory based characters. DERBY-3133 Syntax for GRANT table permission does not mention that several privileges may be specified in a list DERBY-3126 Inserting BigDecimal value in PreparedStatement with setBigDecimal into double column loses fractional digits DERBY-3123 Style sheet (CSS) references in demo HTML files are incorrect DERBY-3119 Derby does not resolve functions to methods with Integer return type. DERBY-3118 Simple demo is out of date DERBY-3110 server hangs after trace on command fails DERBY-3109 Nonexistent property derby.database.defaultAccessMode shown in Developers Guide: User Authentication examples DERBY-3107 On client, Clob.free() does not release locators. DERBY-3099 Possible bug in interaction with buffer manager causing pages not to be freed on rollback to savepoint DERBY-3098 LOB locks are not released after free(). DERBY-3096 SSL handshake throws "bad_certificate" when server tries to authenticate client DERBY-3093 Intermittent transaction failure caused by internal duplicate savepoint name for triggers DERBY-3086 The server policy needs to grant derbynet.jar more permissions so that sysinfo and drda tracing will work DERBY-3085 Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes DERBY-3082 DataSourceTest fixture testAllDataSources fails with AssertionFailedError through assertStringFormat on IBM iseries DERBY-3081 cannot create instance of generated class because of java.lang.VerifyError in 4 tests on IBM iseries DERBY-3080 With TERRITORY_BASED collation, when multiple characters map to a single collation element '_' matches a single collation element rather than a single character DERBY-3077 Trying to reconnect with derby client after bringing server down throws SQL Exception 58009 rather than 08XXX exception DERBY-3075 Client error: 08001 Error connecting to server.. throws SQLTransientConnectionException instead of SQLNonTransientConnectionException DERBY-3074 Database shutdown exception 08006 throws SQLTransientConnectionException instead of SQLNonTransientConnectionException DERBY-3061 Wrong results from query with two conjuncts DERBY-3054 lang/synonym.sql fails with weme 6.1 with junit.framework.ComparisonFailure: Output at line 383 expected:<...1...> but was:<...2...> DERBY-3046 setObj(int,Object,int) causes NPE if no parameter markers are present; should generate SQLException as for setObject(int,Object) DERBY-3038 SYSCS_IMPORT_TABLE FAILS with No current connection after shutdown/reconnect to encrypted database : 10.3.1.4 regression DERBY-3033 select query results in nullpointer exception in skipScan() DERBY-3032 java.lang.ClassCastException returning null from a case statement in subquery DERBY-3027 CollationTest fails with "Unexpected row count: expected:<0> but was:<1>" when Xalan 2.7 jars are in classpath DERBY-3025 NPE when connecting to database with securityMechanism=8 DERBY-3007 Documentation - SYSCS EXPORT TABLE system procedures cannot export data to an existing file DERBY-3000 getTables() call with 10.3 causes java.sql.SQLException: The parameter position '8' is out of range. The number of parameters for this prepared statement is '7'. DERBY-2989 Insert into table with constraints fails if the table name is "indicator" (or any other SQL keyword) DERBY-2986 Query involving CASE statement significantly slower in 10.3.1.4 than in 10.2.2.0 DERBY-2979 Illegal Argument exception while running the svt, mailjdbc DERBY-2972 Update or select with function in the where clause causes with TERRITORY_BASED collation fails with ERROR 42818: Comparisons between 'VARCHAR' and 'VARCHAR' are not supported. DERBY-2967 Single character does not match high value unicode character with collation TERRITORY_BASED DERBY-2961 TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob) DERBY-2957 ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLChar) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLChar) in NistScripts dml002 test with collated database DERBY-2938 DataSourceReference Test fails with I/O Error on ZOS with ibm15 DERBY-2910 SimpleStringOperatorNode in it's bindExpression method generates a character string CAST if required but does not set the correct collation. DERBY-2906 derbynet.jar & derbytools.jar incorrectly have a META-INF/services/java.sql.Driver entry DERBY-2903 RunClassPathTester regression test gets diff because of error message difference DERBY-2902 AS IDENTITY (START WITH -9223372036854775808) fails DERBY-2564 ContextService.notifyAllActiveThreads() and network server code need a privileged block around the calls to Thread.interrupt() DERBY-2352 Assertion Failure with order by and group by expression DERBY-2351 ORDER BY with expression with distinct in the select list returns incorrect result DERBY-2297 In the Dev Guide example derby.database.readOnlyAccessUsers is incorrectly mentioned as derby.database.readAccessUsers DERBY-2188 Developer's Guide talks about a jdbc url property "locale" which is not supported by Derby. DERBY-2073 Inserting BigDecimal value in PreparedStatement into double column loses fractional digits DERBY-2016 ArrayIndexOutOfBoundsException for COALESCE with aggregate functions DERBY-1790 DatabaseMetaData.getTables() with passed in table type of SYNONYM returns system tables and not SYNONYMS DERBY-1769 Add mention that Derby supports rowUpdated, rowDeleted with a result set concurrency of CONCUR_READ_ONLY DERBY-974 ClientDriver can lose some connection properties DERBY-957 Long passed into an exception gets displayed using locale specific formatting. i18n/locale issue DERBY-857 LDAP user authentication fails under a security manager
These notes describe the difference between Derby release 10.3.2.1 and the preceding release 10.3.1.4.
Derby is a pure Java relational database engine using standard SQL and JDBC as its APIs.
Derby functionality includes:
- Embedded engine with JDBC drivers
- Network Server
- Network client JDBC drivers
- Command line tools: ij (SQL scripting), dblook (schema dump) and sysinfo (system info)
This is a maintenance release. No new features have been added.
The following issues are addressed by Derby release 10.3.2.1. These issues are not addressed in the preceding 10.3.1.4 release.
Issue Id Description DERBY-3232 Top-level index.html in releases incorrectly indicates support for JDBC 2.1 in 10.3 releases DERBY-3216 do row level lock space reclamation in btree of indiv rows. DERBY-3190 New simple demo suitable for supported Java ME platforms DERBY-3187 SimpleApp (demo) does not work in a client setting DERBY-3176 J2ME support for phoneME platform disabled in 10.3 DERBY-3175 NullPointerException on INSERT after ALTER TABLE ... DROP COLUMN DERBY-3172 ConnectionEventListener.connectionErrorOccurred not being executed when SQLState 08006 Error is thrown DERBY-3159 SYSCS_SET_USER_ACCESS fails if the user name contains characters not allowed in regular identifiers. DERBY-3158 Repeat calls to SYSCS_UTIL.SYSCS_SET_USER_ACCESS() for the same user and permission fail with repeated user in list exception. DERBY-3147 Remove unused code that allow identifiers to be lower-cased. DERBY-3142 sysinfo ignores derby.ui.locale DERBY-3136 Cut down on object creations in LIKE clause implementation of territory based characters. DERBY-3133 Syntax for GRANT table permission does not mention that several privileges may be specified in a list DERBY-3126 Inserting BigDecimal value in PreparedStatement with setBigDecimal into double column loses fractional digits DERBY-3123 Style sheet (CSS) references in demo HTML files are incorrect DERBY-3119 Derby does not resolve functions to methods with Integer return type. DERBY-3118 Simple demo is out of date DERBY-3110 server hangs after trace on command fails DERBY-3109 Nonexistent property derby.database.defaultAccessMode shown in Developers Guide: User Authentication examples DERBY-3107 On client, Clob.free() does not release locators. DERBY-3099 Possible bug in interaction with buffer manager causing pages not to be freed on rollback to savepoint DERBY-3098 LOB locks are not released after free(). DERBY-3096 SSL handshake throws "bad_certificate" when server tries to authenticate client DERBY-3093 Intermittent transaction failure caused by internal duplicate savepoint name for triggers DERBY-3086 The server policy needs to grant derbynet.jar more permissions so that sysinfo and drda tracing will work DERBY-3085 Fails to handle BLOB fields with a PreparedStatement with size >32750 bytes DERBY-3081 cannot create instance of generated class because of java.lang.VerifyError in 4 tests on IBM iseries DERBY-3080 With TERRITORY_BASED collation, when multiple characters map to a single collation element '_' matches a single collation element rather than a single character DERBY-3077 Trying to reconnect with derby client after bringing server down throws SQL Exception 58009 rather than 08XXX exception DERBY-3075 Client error: 08001 Error connecting to server.. throws SQLTransientConnectionException instead of SQLNonTransientConnectionException DERBY-3074 Database shutdown exception 08006 throws SQLTransientConnectionException instead of SQLNonTransientConnectionException DERBY-3061 Wrong results from query with two conjuncts DERBY-3046 setObj(int,Object,int) causes NPE if no parameter markers are present; should generate SQLException as for setObject(int,Object) DERBY-3038 SYSCS_IMPORT_TABLE FAILS with No current connection after shutdown/reconnect to encrypted database : 10.3.1.4 regression DERBY-3033 select query results in nullpointer exception in skipScan() DERBY-3032 java.lang.ClassCastException returning null from a case statement in subquery DERBY-3025 NPE when connecting to database with securityMechanism=8 DERBY-3007 Documentation - SYSCS EXPORT TABLE system procedures cannot export data to an existing file DERBY-3000 getTables() call with 10.3 causes java.sql.SQLException: The parameter position '8' is out of range. The number of parameters for this prepared statement is '7'. DERBY-2989 Insert into table with constraints fails if the table name is "indicator" (or any other SQL keyword) DERBY-2986 Query involving CASE statement significantly slower in 10.3.1.4 than in 10.2.2.0 DERBY-2972 Update or select with function in the where clause causes with TERRITORY_BASED collation fails with ERROR 42818: Comparisons between 'VARCHAR' and 'VARCHAR' are not supported. DERBY-2967 Single character does not match high value unicode character with collation TERRITORY_BASED DERBY-2961 TriggerTest.testTypesINActionStatement fails with 'ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLClob) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLClob) DERBY-2957 ASSERT FAILED col1.getClass() (class org.apache.derby.iapi.types.SQLChar) expected to be the same as col2.getClass() (class org.apache.derby.iapi.types.CollatorSQLChar) in NistScripts dml002 test with collated database DERBY-2910 SimpleStringOperatorNode in it's bindExpression method generates a character string CAST if required but does not set the correct collation. DERBY-2906 derbynet.jar & derbytools.jar incorrectly have a META-INF/services/java.sql.Driver entry DERBY-2902 AS IDENTITY (START WITH -9223372036854775808) fails DERBY-2564 ContextService.notifyAllActiveThreads() and network server code need a privileged block around the calls to Thread.interrupt() DERBY-2352 Assertion Failure with order by and group by expression DERBY-2351 ORDER BY with expression with distinct in the select list returns incorrect result DERBY-2297 In the Dev Guide example derby.database.readOnlyAccessUsers is incorrectly mentioned as derby.database.readAccessUsers DERBY-2188 Developer's Guide talks about a jdbc url property "locale" which is not supported by Derby. DERBY-2073 Inserting BigDecimal value in PreparedStatement into double column loses fractional digits DERBY-2016 ArrayIndexOutOfBoundsException for COALESCE with aggregate functions DERBY-1790 DatabaseMetaData.getTables() with passed in table type of SYNONYM returns system tables and not SYNONYMS DERBY-1769 Add mention that Derby supports rowUpdated, rowDeleted with a result set concurrency of CONCUR_READ_ONLY DERBY-974 ClientDriver can lose some connection properties DERBY-857 LDAP user authentication fails under a security manager
Compared with the previous release (10.3.1.4), Derby release 10.3.2.1 introduces the following new features and incompatibilities. These merit your special attention.
Note for DERBY-2967
Summary of Change
Databases with territory based collation might see the behavior of LIKE predicate in WHERE clause has changed.
Symptoms Seen by Applications Affected by Change
In territory based databases, the LIKE predicate will now comply with SQL specification(Derby already follows SQL specification for UCS_BASIC databases). SQL specification for LIKE predicate requires that database should do one character comparison at a time. Prior to the fix that went in as part of DERBY-2967, Derby did string comparison rather than character comparison for LIKE. This causes a problem with territory based database because the collation element(s) for a string of characters may not be same as the collation element(s) for inidivdual characters that make up that string. In addition, the metacharacter _ in the pattern in a LIKE predicate will now consume exactly one character rather than working on number of collation elements. To show the impact on application, consider following eg. Say we are working with a territory where character 'z' has same collation elements as 'xy'. For such a territory consider following LIKE predicate 'zcb' LIKE 'xy_b' Prior to DERBY-2967, Derby will return TRUE because collation elements for 'z' matched 'xy' and 'c' was consumed by '_' and 'b' matched 'b'. But this does not follow SQL specification. SQL specification requires one character comparison at a time in LIKE. With the fix for DERBY-2967, the LIKE predicate in this example will return FALSE because the collation element(s) for 'z' does not match collation element(s) for 'x'. In addition, the metacharacter _ in pattern for LIKE will consume *one* character in the string value. So for an eg clause 'xycb' LIKE '_cb' will return FALSE because metacharacter _ will consume 'x' and since 'c' does not match 'y', Derby will return FALSE.
Rationale for Change
The previous behavior violated the SQL specification. The new behavior is correct.
sun-javadb-10.3.2.1/index.html 0000644 0415062 0001750 00000014363 10727776726 015366 0 ustar lh136778 clustraDerby release 10.3.2.1 was built using the following environment:
- Branch - Source code came from the 10.3 branch.
- Machine - MKS Toolkit 8.1 on Microsoft Windows XP Professional Version 2002 Service Pack 2.
- Ant - Apache Ant version 1.7.0 compiled on December 13 2006.
- JDK 1.4 - Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_07-b05)
- Java 6 - Java(TM) SE Runtime Environment (build 1.6.0_01-b06).
- OSGi - The osgi.jar was used to build org.apache.derby.osgi.EmbeddedActivator.
- Compiler - The 1.4.2_07-b05 javac was used to compile all classes except for the JDBC4 drivers. The JDBC4 driver classes were compiled using the 1.6.0_01-b06 javac.
- JSR 169 - Java ME support was built using Java ME CDC/Foundation Specification 1.1 libraries from IBM WebSphere Everyplace Micro Environment 6.1
Relationship between Java DB and Derby
Java DB is Sun Microsystems' supported distribution of the open source Apache Derby 100% Java technology relational database system.The Java DB product includes Apache Derby without any modification whatsoever to the underlying source code.
Java DB technical support is available for purchase through Sun Microsystems.
Because Java DB and Apache Derby have the same functionality, the Java DB documentation refers to the core functionality as Derby.
If this is your first time using Derby, please look at the Getting Started Guide [HTML Book] [PDF] for assistance configuring your environment, creating a new database, and executing SQL statements.
Interested in seeing some code that makes use of Derby? There are also some simple demo applications included to help you understand how to start using Derby in your application.
Derby includes some tools to help you get started working with Derby databases. Additional information about these tools can be found in the Derby Tools and Utilities Guide [HTML Book] [PDF].
If you need more help getting started, the Apache Derby website has a Quick Start page with links to tutorials, more demo applications, and instructions on how to use Derby with a variety of different IDEs, tools, and web application servers.
If you need additional help, the Apache Derby Users mailing list can be helpful if you have specific questions regarding setting up and using Derby. For information on how to subscribe and post to the Apache Derby Users mailing list, please read the mailing lists page on the Apache Derby website.
For information on developing and deploying an application with Derby, see the Derby Developer's Guide [HTML Book] [PDF]. A complete reference to Derby's use of JDBC and SQL can be found in the Derby Reference Manual [HTML Book] [PDF].
Derby's JDBC API is documented in two sets of javadoc:
For information on setting up and using the Derby Network Server, which provides a client/server access model for Derby databases on machines connected over a network, please read the Derby Server and Administration Guide [HTML Book] [PDF].
Information on how to tune Derby for your specific needs can be found in Tuning Derby [HTML Book] [PDF]. This guide includes a reference to the properties which influence Derby's behavior as well as providing performance tips for certain situations.
Please consult the following documents for details on the contents of this distribution and how this distribution is licensed.
If you are looking for more resources on how to use Derby in your application or integrate Derby into a specific environment, please see:
Thank you for your interest in Derby!
sun-javadb-10.3.2.1/frameworks/ 0000755 0415062 0001750 00000000000 10723243372 015520 5 ustar lh136778 clustra sun-javadb-10.3.2.1/frameworks/NetworkServer/ 0000755 0415062 0001750 00000000000 10641441224 020333 5 ustar lh136778 clustra sun-javadb-10.3.2.1/frameworks/NetworkServer/bin/ 0000755 0415062 0001750 00000000000 10641441224 021103 5 ustar lh136778 clustra sun-javadb-10.3.2.1/frameworks/NetworkServer/bin/NetworkServerControl.bat 0000755 0415062 0001750 00000005224 10641441224 025762 0 ustar lh136778 clustra @echo. @echo The frameworks scripts have been deprecated. Please use the new scripts in @echo the /bin directory. See the file frameworks.DEPRECATED.txt for more @echo information. @echo. @REM Licensed to the Apache Software Foundation (ASF) under one or more @REM contributor license agreements. See the NOTICE file distributed with @REM this work for additional information regarding copyright ownership. @REM The ASF licenses this file to you under the Apache License, Version 2.0 @REM (the "License"); you may not use this file except in compliance with @REM the License. You may obtain a copy of the License at @REM @REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, software @REM distributed under the License is distributed on an "AS IS" BASIS, @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @REM See the License for the specific language governing permissions and @REM limitations under the License. @REM --------------------------------------------------------- @REM -- This batch file is an example of how to run commands @REM -- in the Network Server framework @REM -- @REM -- REQUIREMENTS: @REM -- You must have the derby jar files as well as the @REM -- derby network server class files in your classpath. @REM -- @REM -- Check the setNetworkServerCP.bat file for an example of @REM -- what to set. @REM -- @REM -- This file for use on Windows systems @REM --------------------------------------------------------- @echo off rem set DERBY_INSTALL= @if "%DERBY_HOME%"=="" set DERBY_HOME=%DERBY_INSTALL% @if "%DERBY_HOME%"=="" goto noderbyhome @if "%JAVA_HOME%"=="" goto nojavahome @if not exist "%JAVA_HOME%\bin\java.exe" goto nojavahome @REM --------------------------------------------------------- @REM -- start Derby as a Network server @REM --------------------------------------------------------- "%JAVA_HOME%\bin\java" -cp "%DERBY_HOME%\lib\derby.jar;%DERBY_HOME%\lib\derbytools.jar;%DERBY_HOME%\lib\derbynet.jar;%CLASSPATH%" org.apache.derby.drda.NetworkServerControl %* @goto end @REM --------------------------------------------------------- @REM -- To use a different JVM with a different syntax, simply edit @REM -- this file @REM --------------------------------------------------------- :nojavahome echo JAVA_HOME not set or could not find java executable in JAVA_HOME. echo Please set JAVA_HOME to the location of a valid Java installation. goto end :noderbyhome echo DERBY_HOME or DERBY_INSTALL not set. Set one of these variables echo to the location of your Derby installation. goto end :end sun-javadb-10.3.2.1/frameworks/NetworkServer/bin/sysinfo.ksh 0000755 0415062 0001750 00000005213 10641441224 023310 0 ustar lh136778 clustra echo echo The frameworks scripts have been deprecated. Please use the new scripts in echo the /bin directory. See the file frameworks.DEPRECATED.txt for more echo information echo # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to you under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --------------------------------------------------------- # -- This script file is an example of how to use sysinfo to get # -- important system information # -- # -- REQUIREMENTS: # -- # -- This utility will report important system info about # -- jar files which are in your classpath and the current setting of # -- Derby Network Server parameters. Jar files which are not # -- if your classpath will not be reported. # -- The Derby Network Server must be running for this utility to work. # -- # -- Check the setNetworkServerCP.ksh to see an example of adding the # -- the Derby jars to your classpath. # -- # -- # -- This file for use on Unix korn shell systems # --------------------------------------------------------- # DERBY_INSTALL= DERBY_HOME=${DERBY_HOME:-$DERBY_INSTALL} [ -z "$DERBY_HOME" ] && { echo "\$DERBY_HOME or \$DERBY_INSTALL not set. Please set one of these variables" echo "to the location of your Derby installation." exit 1 } [ -z "$JAVA_HOME" ] && { [ -x /usr/java/bin/java ] && { JAVA_HOME=/usr/java } [ -z "$JAVA_HOME" ] && { echo "JAVA_HOME not set. Please set JAVA_HOME to the location of your Java" echo "installation." exit 1 } } # --------------------------------------------------------- # -- start sysinfo # --------------------------------------------------------- "$JAVA_HOME/bin/java" -cp "${DERBY_HOME}/lib/derby.jar:${DERBY_HOME}/lib/derbytools.jar:${DERBY_HOME}/lib/derbynet.jar:${CLASSPATH}" org.apache.derby.drda.NetworkServerControl sysinfo $* # --------------------------------------------------------- # -- To use a different JVM with a different syntax, simply edit # -- this file # --------------------------------------------------------- sun-javadb-10.3.2.1/frameworks/NetworkServer/bin/setNetworkServerCP.ksh 0000755 0415062 0001750 00000003425 10641441224 025400 0 ustar lh136778 clustra echo echo The frameworks scripts have been deprecated. Please use the new scripts in echo the /bin directory. See the file frameworks.DEPRECATED.txt for more echo information echo # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to you under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --------------------------------------------------------- # -- This script file sets the CLASSPATH environment variable # -- for use with Derby products in NetworkServer mode # -- # -- To use this script from other locations, change the # -- value assigned to DERBY_INSTALL to be an absolute path # -- (export DERBY_INSTALL=/opt/derby) instead of the current relative path # -- # -- This file for use on Unix ksh systems # -- # --------------------------------------------------------- # DERBY_INSTALL= DERBY_HOME=${DERBY_HOME:-$DERBY_INSTALL} [ -z "$DERBY_HOME" ] && { echo "\$DERBY_HOME or \$DERBY_INSTALL not set. Please set one of these variables" echo "to the location of your Derby installation." exit 1 } export CLASSPATH="${DERBY_HOME}/lib/derby.jar:${DERBY_HOME}/lib/derbytools.jar:${DERBY_HOME}/lib/derbynet.jar:${CLASSPATH}" sun-javadb-10.3.2.1/frameworks/NetworkServer/bin/dblook.bat 0000755 0415062 0001750 00000005030 10641441224 023046 0 ustar lh136778 clustra @echo. @echo The frameworks scripts have been deprecated. Please use the new scripts in @echo the /bin directory. See the file frameworks.DEPRECATED.txt for more @echo information. @echo. @REM Licensed to the Apache Software Foundation (ASF) under one or more @REM contributor license agreements. See the NOTICE file distributed with @REM this work for additional information regarding copyright ownership. @REM The ASF licenses this file to you under the Apache License, Version 2.0 @REM (the "License"); you may not use this file except in compliance with @REM the License. You may obtain a copy of the License at @REM @REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, software @REM distributed under the License is distributed on an "AS IS" BASIS, @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @REM See the License for the specific language governing permissions and @REM limitations under the License. @REM --------------------------------------------------------- @REM -- This batch file is an example of how to start dblook in @REM -- an NetworkServer environment. @REM -- @REM -- REQUIREMENTS: @REM -- You must have the Derby libraries in your classpath @REM -- @REM -- See the setNetworkClientCP.bat for an example of @REM -- how to do this. @REM -- @REM -- This file for use on Windows systems @REM --------------------------------------------------------- @echo off rem set DERBY_INSTALL= @if "%DERBY_HOME%"=="" set DERBY_HOME=%DERBY_INSTALL% @if "%DERBY_HOME%"=="" goto noderbyhome @if "%JAVA_HOME%"=="" goto nojavahome @if not exist "%JAVA_HOME%\bin\java.exe" goto nojavahome @REM --------------------------------------------------------- @REM -- start dblook @REM --------------------------------------------------------- "%JAVA_HOME%\bin\java" -cp "%DERBY_HOME%\lib\derbyclient.jar;%DERBY_HOME%\lib\derbytools.jar;%CLASSPATH%" org.apache.derby.tools.dblook %* @GOTO end @REM --------------------------------------------------------- @REM -- To use a different JVM with a different syntax, simply edit @REM -- this file @REM --------------------------------------------------------- :nojavahome echo JAVA_HOME not set or could not find java executable in JAVA_HOME. echo Please set JAVA_HOME to the location of a valid Java installation. goto end :noderbyhome echo DERBY_HOME or DERBY_INSTALL not set. Set one of these variables echo to the location of your Derby installation. goto end :end sun-javadb-10.3.2.1/frameworks/NetworkServer/bin/startNetworkServer.ksh 0000755 0415062 0001750 00000005756 10641441224 025530 0 ustar lh136778 clustra echo echo The frameworks scripts have been deprecated. Please use the new scripts in echo the /bin directory. See the file frameworks.DEPRECATED.txt for more echo information echo # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to you under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ## --------------------------------------------------------- # -- This simple script is an example of how to start Derby # -- as a server inside the Network Server framework # -- # -- REQUIREMENTS: # -- You must have the derby and Network Server jar files in your CLASSPATH # -- # -- Check the setNetworkServerCP.ksh file for an example of # -- what to set. # -- # -- This file for use on Unix ksh systems # --------------------------------------------------------- # --------------------------------------------------------- # -- start Derby Network Server # --------------------------------------------------------- # DERBY_INSTALL= DERBY_HOME=${DERBY_HOME:-$DERBY_INSTALL} [ -z "$DERBY_HOME" ] && { echo "\$DERBY_HOME or \$DERBY_INSTALL not set. Please set one of these variables" echo "to the location of your Derby installation." exit 1 } [ -z "$JAVA_HOME" ] && { [ -x /usr/java/bin/java ] && { JAVA_HOME=/usr/java } [ -z "$JAVA_HOME" ] && { echo "JAVA_HOME not set. Please set JAVA_HOME to the location of your Java" echo "installation." exit 1 } } # --------------------------------------------------------- # -- Determine the host and port to use by: # -- 1. Check to see if the host and port are set on the command line # -- 2. Check to see if DERBY_SERVER_HOST and DERBY_SERVER_PORT # -- 3. Default to localhost/1527 # --------------------------------------------------------- if [ "$1" ] then DERBY_SERVER_HOST=$1 fi if [ -z "$DERBY_SERVER_HOST" ] then DERBY_SERVER_HOST=localhost fi if [ "$2" ] then DERBY_SERVER_PORT=$2 fi if [ -z "$DERBY_SERVER_PORT" ] then DERBY_SERVER_PORT=1527 fi "$JAVA_HOME/bin/java" -cp "${DERBY_HOME}/lib/derby.jar:${DERBY_HOME}/lib/derbytools.jar:${DERBY_HOME}/lib/derbynet.jar:${CLASSPATH}" org.apache.derby.drda.NetworkServerControl start -h $DERBY_SERVER_HOST -p $DERBY_SERVER_PORT # --------------------------------------------------------- # -- To use a different JVM with a different syntax, simply edit # -- this file # --------------------------------------------------------- sun-javadb-10.3.2.1/frameworks/NetworkServer/bin/sysinfo.bat 0000755 0415062 0001750 00000005357 10641441224 023302 0 ustar lh136778 clustra @echo. @echo The frameworks scripts have been deprecated. Please use the new scripts in @echo the /bin directory. See the file frameworks.DEPRECATED.txt for more @echo information. @echo. @REM Licensed to the Apache Software Foundation (ASF) under one or more @REM contributor license agreements. See the NOTICE file distributed with @REM this work for additional information regarding copyright ownership. @REM The ASF licenses this file to you under the Apache License, Version 2.0 @REM (the "License"); you may not use this file except in compliance with @REM the License. You may obtain a copy of the License at @REM @REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, software @REM distributed under the License is distributed on an "AS IS" BASIS, @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @REM See the License for the specific language governing permissions and @REM limitations under the License. @REM --------------------------------------------------------- @REM -- This batch file is an example of how to use sysinfo to get @REM -- important system information @REM -- @REM -- REQUIREMENTS: @REM -- @REM -- This utility will report important system info about @REM -- jar files which are in your classpath. Jar files which are not @REM -- if your classpath will not be reported. @REM -- @REM -- Check the setNetworkServerCP.bat to see an example of adding the @REM -- the Derby jars to your classpath. @REM -- @REM -- This file for use on Windows systems @REM --------------------------------------------------------- @echo off rem set DERBY_INSTALL= @if "%DERBY_HOME%"=="" set DERBY_HOME=%DERBY_INSTALL% @if "%DERBY_HOME%"=="" goto noderbyhome @if "%JAVA_HOME%"=="" goto nojavahome @if not exist "%JAVA_HOME%\bin\java.exe" goto nojavahome @REM --------------------------------------------------------- @REM -- start sysinfo @REM --------------------------------------------------------- "%JAVA_HOME%\bin\java" -cp "%DERBY_HOME%\lib\derby.jar;%DERBY_HOME%\lib\derbytools.jar;%DERBY_HOME%\lib\derbynet.jar;%CLASSPATH%" org.apache.derby.drda.NetworkServerControl sysinfo @GOTO end @REM --------------------------------------------------------- @REM -- To use a different JVM with a different syntax, simply edit @REM -- this file @REM --------------------------------------------------------- :nojavahome echo JAVA_HOME not set or could not find java executable in JAVA_HOME. echo Please set JAVA_HOME to the location of a valid Java installation. goto end :noderbyhome echo DERBY_HOME or DERBY_INSTALL not set. Set one of these variables echo to the location of your Derby installation. goto end :end sun-javadb-10.3.2.1/frameworks/NetworkServer/bin/setNetworkServerCP.bat 0000755 0415062 0001750 00000003753 10641441224 025365 0 ustar lh136778 clustra @echo. @echo The frameworks scripts have been deprecated. Please use the new scripts in @echo the /bin directory. See the file frameworks.DEPRECATED.txt for more @echo information. @echo. @REM Licensed to the Apache Software Foundation (ASF) under one or more @REM contributor license agreements. See the NOTICE file distributed with @REM this work for additional information regarding copyright ownership. @REM The ASF licenses this file to you under the Apache License, Version 2.0 @REM (the "License"); you may not use this file except in compliance with @REM the License. You may obtain a copy of the License at @REM @REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, software @REM distributed under the License is distributed on an "AS IS" BASIS, @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @REM See the License for the specific language governing permissions and @REM limitations under the License. @REM --------------------------------------------------------- @REM -- This batch file sets the CLASSPATH environment variable @REM -- for use with Derby products in NetworkServer mode @REM -- @REM -- To use this script from other locations, change the @REM -- value assigned to DERBY_INSTALL to be an absolute path @REM -- (set DERBY_INSTALL=C:\derby) instead of the current relative path @REM -- @REM -- This file for use on Windows systems @REM -- @REM --------------------------------------------------------- @echo off rem set DERBY_INSTALL= @if "%DERBY_HOME%"=="" set DERBY_HOME=%DERBY_INSTALL% @if "%DERBY_HOME%"=="" goto noderbyhome @FOR %%X in ("%DERBY_HOME%") DO SET DERBY_INSTALL=%%~sX set CLASSPATH=%DERBY_HOME%\lib\derby.jar;%DERBY_HOME%\lib\derbytools.jar;%DERBY_HOME%\lib\derbynet.jar;%CLASSPATH% @goto end :noderbyhome @echo DERBY_HOME or DERBY_INSTALL not set. Set one of these variables @echo to the location of your Derby installation. :end sun-javadb-10.3.2.1/frameworks/NetworkServer/bin/setNetworkClientCP.bat 0000755 0415062 0001750 00000003726 10641441224 025335 0 ustar lh136778 clustra @echo. @echo The frameworks scripts have been deprecated. Please use the new scripts in @echo the /bin directory. See the file frameworks.DEPRECATED.txt for more @echo information. @echo. @REM Licensed to the Apache Software Foundation (ASF) under one or more @REM contributor license agreements. See the NOTICE file distributed with @REM this work for additional information regarding copyright ownership. @REM The ASF licenses this file to you under the Apache License, Version 2.0 @REM (the "License"); you may not use this file except in compliance with @REM the License. You may obtain a copy of the License at @REM @REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, software @REM distributed under the License is distributed on an "AS IS" BASIS, @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @REM See the License for the specific language governing permissions and @REM limitations under the License. @REM --------------------------------------------------------- @REM -- This batch file sets the CLASSPATH environment variable @REM -- for use with Derby products in Network Server mode @REM -- @REM -- To use this script from other locations, change the @REM -- value assigned to DERBY_HOME to be an absolute path @REM -- (set DERBY_HOME=C:\derby) instead of the current relative path @REM -- @REM -- This file for use on Windows systems @REM -- @REM --------------------------------------------------------- @echo off rem set DERBY_INSTALL= @if "%DERBY_HOME%"=="" set DERBY_HOME=%DERBY_INSTALL% @if "%DERBY_HOME%"=="" goto noderbyhome @FOR %%X in ("%DERBY_HOME%") DO SET DERBY_HOME=%%~sX set CLASSPATH=%DERBY_HOME%\lib\derbyclient.jar;%DERBY_HOME%\lib\derbytools.jar;%CLASSPATH% @goto end :noderbyhome @echo DERBY_HOME or DERBY_INSTALL not set. Set one of these variables @echo to the location of your Derby installation. @goto end :end sun-javadb-10.3.2.1/frameworks/NetworkServer/bin/ij.bat 0000755 0415062 0001750 00000005645 10641441224 022212 0 ustar lh136778 clustra @echo. @echo The frameworks scripts have been deprecated. Please use the new scripts in @echo the /bin directory. See the file frameworks.DEPRECATED.txt for more @echo information. @echo. @REM Licensed to the Apache Software Foundation (ASF) under one or more @REM contributor license agreements. See the NOTICE file distributed with @REM this work for additional information regarding copyright ownership. @REM The ASF licenses this file to you under the Apache License, Version 2.0 @REM (the "License"); you may not use this file except in compliance with @REM the License. You may obtain a copy of the License at @REM @REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, software @REM distributed under the License is distributed on an "AS IS" BASIS, @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @REM See the License for the specific language governing permissions and @REM limitations under the License. @REM --------------------------------------------------------- @REM -- This batch file is an example of how to start ij in @REM -- an NetworkServer environment. @REM -- @REM -- REQUIREMENTS: @REM -- You must have the Derby and DB2 JCC libraries in your classpath @REM -- @REM -- See the setNetworkClientCP.bat for an example of @REM -- how to do this. @REM -- @REM -- You may need to modify the values below for a different @REM -- host, port, user, or password @REM -- @REM -- This file for use on Windows systems @REM --------------------------------------------------------- @echo off rem set DERBY_INSTALL= @if "%DERBY_HOME%"=="" set DERBY_HOME=%DERBY_INSTALL% @if "%DERBY_HOME%"=="" goto noderbyhome @if "%JAVA_HOME%"=="" goto nojavahome @if not exist "%JAVA_HOME%\bin\java.exe" goto nojavahome set IJ_HOST=localhost set IJ_PORT=1527 set IJ_USER=APP set IJ_PASSWORD=APP @REM --------------------------------------------------------- @REM -- start ij @REM -- host, port, user and password may need to be changed @REM --------------------------------------------------------- "%JAVA_HOME%\bin\java" -cp "%DERBY_HOME%\lib\derbyclient.jar;%DERBY_HOME%\lib\derbytools.jar;%CLASSPATH%" -Dij.driver=org.apache.derby.jdbc.ClientDriver -Dij.protocol=jdbc:derby://%IJ_HOST%:%IJ_PORT%/ -Dij.user=%IJ_USER% -Dij.password=%IJ_PASSWORD% org.apache.derby.tools.ij @goto end @REM --------------------------------------------------------- @REM -- To use a different JVM with a different syntax, simply edit @REM -- this file @REM --------------------------------------------------------- :nojavahome echo JAVA_HOME not set or could not find java executable in JAVA_HOME. echo Please set JAVA_HOME to the location of a valid Java installation. goto end :noderbyhome echo DERBY_HOME or DERBY_INSTALL not set. Set one of these variables echo to the location of your Derby installation. goto end :end sun-javadb-10.3.2.1/frameworks/NetworkServer/bin/dblook.ksh 0000755 0415062 0001750 00000004445 10641441224 023076 0 ustar lh136778 clustra echo echo The frameworks scripts have been deprecated. Please use the new scripts in echo the /bin directory. See the file frameworks.DEPRECATED.txt for more echo information echo # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to you under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --------------------------------------------------------- # -- This simple script is an example of how to start dblook in # -- a NetworkServer environment. # -- #-- REQUIREMENTS: # -- You must have the Derby libraries in your classpath # -- # -- See the setEmbeddedCP.ksh for an example of # -- how to do this. # -- # -- This file for use on Unix ksh systems # --------------------------------------------------------- # DERBY_INSTALL= DERBY_HOME=${DERBY_HOME:-$DERBY_INSTALL} [ -z "$DERBY_HOME" ] && { echo "\$DERBY_HOME or \$DERBY_INSTALL not set. Please set one of these variables" echo "to the location of your Derby installation." exit 1 } [ -z "$JAVA_HOME" ] && { [ -x /usr/java/bin/java ] && { JAVA_HOME=/usr/java } [ -z "$JAVA_HOME" ] && { echo "JAVA_HOME not set. Please set JAVA_HOME to the location of your Java" echo "installation." exit 1 } } # --------------------------------------------------------- # -- start dblook # --------------------------------------------------------- "$JAVA_HOME/bin/java" -cp "${DERBY_HOME}/lib/derbyclient.jar:${DERBY_HOME}/lib/derbytools.jar:${CLASSPATH}" org.apache.derby.tools.dblook $@ # --------------------------------------------------------- # -- To use a different JVM with a different syntax, simply edit # -- this file # --------------------------------------------------------- sun-javadb-10.3.2.1/frameworks/NetworkServer/bin/NetworkServerControl.ksh 0000755 0415062 0001750 00000004576 10641441224 026012 0 ustar lh136778 clustra echo echo The frameworks scripts have been deprecated. Please use the new scripts in echo the /bin directory. See the file frameworks.DEPRECATED.txt for more echo information echo # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to you under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ## --------------------------------------------------------- # -- This simple script is an example of how to run commands # -- for the Network Server framework # -- # -- REQUIREMENTS: # -- You must have the derby and Network Server jar files in your CLASSPATH # -- # -- Check the setNetworkServerCP.ksh file for an example of # -- what to set. # -- # -- This file for use on Unix ksh systems # --------------------------------------------------------- # DERBY_INSTALL= DERBY_HOME=${DERBY_HOME:-$DERBY_INSTALL} [ -z "$DERBY_HOME" ] && { echo "\$DERBY_HOME or \$DERBY_INSTALL not set. Please set one of these variables" echo "to the location of your Derby installation." exit 1 } [ -z "$JAVA_HOME" ] && { [ -x /usr/java/bin/java ] && { JAVA_HOME=/usr/java } [ -z "$JAVA_HOME" ] && { echo "JAVA_HOME not set. Please set JAVA_HOME to the location of your Java" echo "installation." exit 1 } } # --------------------------------------------------------- # -- start Derby Network Server # --------------------------------------------------------- "$JAVA_HOME/bin/java" -cp "${DERBY_HOME}/lib/derby.jar:${DERBY_HOME}/lib/derbytools.jar:${DERBY_HOME}/lib/derbynet.jar:${CLASSPATH}" org.apache.derby.drda.NetworkServerControl $* # --------------------------------------------------------- # -- To use a different JVM with a different syntax, simply edit # -- this file # --------------------------------------------------------- sun-javadb-10.3.2.1/frameworks/NetworkServer/bin/setNetworkClientCP.ksh 0000755 0415062 0001750 00000003375 10641441224 025354 0 ustar lh136778 clustra echo echo The frameworks scripts have been deprecated. Please use the new scripts in echo the /bin directory. See the file frameworks.DEPRECATED.txt for more echo information echo # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to you under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --------------------------------------------------------- # -- This script file sets the CLASSPATH environment variable # -- for use with Derby products in Network Server mode # -- # -- To use this script from other locations, change the # -- value assigned to DERBY_INSTALL to be an absolute path # -- (export DERBY_INSTALL=/opt/derby) instead of the current relative path # -- # -- This file for use on Unix ksh systems # -- # --------------------------------------------------------- # DERBY_INSTALL= DERBY_HOME=${DERBY_HOME:-$DERBY_INSTALL} [ -z "$DERBY_HOME" ] && { echo "\$DERBY_HOME or \$DERBY_INSTALL not set. Please set one of these variables" echo "to the location of your Derby installation." exit 1 } export CLASSPATH="${DERBY_HOME}/lib/derbyclient.jar:${DERBY_HOME}/lib/derbytools.jar:${CLASSPATH}" sun-javadb-10.3.2.1/frameworks/NetworkServer/bin/ij.ksh 0000755 0415062 0001750 00000005023 10641441224 022217 0 ustar lh136778 clustra echo echo The frameworks scripts have been deprecated. Please use the new scripts in echo the /bin directory. See the file frameworks.DEPRECATED.txt for more echo information echo # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to you under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --------------------------------------------------------- # -- This simple script is an example of how to start ij in # -- the Derby Network Server environment. # -- #-- REQUIREMENTS: # -- You must have the Derby and DB2 JCC libraries in your classpath # -- # -- See the setNetworkClientCP.ksh for an example of # -- how to do this. # -- # -- This file for use on Unix ksh systems # --------------------------------------------------------- # DERBY_INSTALL= DERBY_HOME=${DERBY_HOME:-$DERBY_INSTALL} [ -z "$DERBY_HOME" ] && { echo "\$DERBY_HOME or \$DERBY_INSTALL not set. Please set one of these variables" echo "to the location of your Derby installation." exit 1 } [ -z "$JAVA_HOME" ] && { [ -x /usr/java/bin/java ] && { JAVA_HOME=/usr/java } [ -z "$JAVA_HOME" ] && { echo "JAVA_HOME not set. Please set JAVA_HOME to the location of your Java" echo "installation." exit 1 } } export IJ_HOST=localhost export IJ_PORT=1527 export IJ_USER=APP export IJ_PASSWORD=APP # --------------------------------------------------------- # -- start ij # --------------------------------------------------------- "$JAVA_HOME/bin/java" -cp "${DERBY_HOME}/lib/derbyclient.jar:${DERBY_HOME}/lib/derbytools.jar:${CLASSPATH}" -Dij.driver=org.apache.derby.jdbc.ClientDriver -Dij.protocol=jdbc:derby://$IJ_HOST:$IJ_PORT/ -Dij.user=$IJ_USER -Dij.password=$IJ_PASSWORD org.apache.derby.tools.ij # --------------------------------------------------------- # -- To use a different JVM with a different syntax, simply edit # -- this file # --------------------------------------------------------- sun-javadb-10.3.2.1/frameworks/NetworkServer/bin/stopNetworkServer.ksh 0000755 0415062 0001750 00000005777 10641441224 025363 0 ustar lh136778 clustra echo echo The frameworks scripts have been deprecated. Please use the new scripts in echo the /bin directory. See the file frameworks.DEPRECATED.txt for more echo information echo # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to you under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ## --------------------------------------------------------- # -- This simple script is an example of how to shutdown Derby # -- running as a server inside the Network Server framework # -- # -- REQUIREMENTS: # -- You must have the derby and Network Server jar files in your CLASSPATH # -- # -- Check the setNetworkServerCP.ksh file for an example of # -- what to set. # -- # -- This file for use on Unix ksh systems # --------------------------------------------------------- # --------------------------------------------------------- # -- shutdown Derby Network Server # --------------------------------------------------------- # DERBY_INSTALL= DERBY_HOME=${DERBY_HOME:-$DERBY_INSTALL} [ -z "$DERBY_HOME" ] && { echo "\$DERBY_HOME or \$DERBY_INSTALL not set. Please set one of these variables" echo "to the location of your Derby installation." exit 1 } [ -z "$JAVA_HOME" ] && { [ -x /usr/java/bin/java ] && { JAVA_HOME=/usr/java } [ -z "$JAVA_HOME" ] && { echo "JAVA_HOME not set. Please set JAVA_HOME to the location of your Java" echo "installation." exit 1 } } # --------------------------------------------------------- # -- Determine the host and port to use by: # -- 1. Check to see if the host and port are set on the command line # -- 2. Check to see if DERBY_SERVER_HOST and DERBY_SERVER_PORT # -- 3. Default to localhost/1527 # --------------------------------------------------------- if [ "$1" ] then DERBY_SERVER_HOST=$1 fi if [ -z "$DERBY_SERVER_HOST" ] then DERBY_SERVER_HOST=localhost fi if [ "$2" ] then DERBY_SERVER_PORT=$2 fi if [ -z "$DERBY_SERVER_PORT" ] then DERBY_SERVER_PORT=1527 fi "$JAVA_HOME/bin/java" -cp "${DERBY_HOME}/lib/derby.jar:${DERBY_HOME}/lib/derbytools.jar:${DERBY_HOME}/lib/derbynet.jar:${CLASSPATH}" org.apache.derby.drda.NetworkServerControl shutdown -h $DERBY_SERVER_HOST -p $DERBY_SERVER_PORT # --------------------------------------------------------- # -- To use a different JVM with a different syntax, simply edit # -- this file # --------------------------------------------------------- sun-javadb-10.3.2.1/frameworks/NetworkServer/bin/startNetworkServer.bat 0000755 0415062 0001750 00000005467 10641441224 025510 0 ustar lh136778 clustra @echo. @echo The frameworks scripts have been deprecated. Please use the new scripts in @echo the /bin directory. See the file frameworks.DEPRECATED.txt for more @echo information. @echo. @REM Licensed to the Apache Software Foundation (ASF) under one or more @REM contributor license agreements. See the NOTICE file distributed with @REM this work for additional information regarding copyright ownership. @REM The ASF licenses this file to you under the Apache License, Version 2.0 @REM (the "License"); you may not use this file except in compliance with @REM the License. You may obtain a copy of the License at @REM @REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, software @REM distributed under the License is distributed on an "AS IS" BASIS, @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @REM See the License for the specific language governing permissions and @REM limitations under the License. @REM -- This file for use on Windows systems @REM --------------------------------------------------------- @echo off rem set DERBY_INSTALL= @if "%DERBY_HOME%"=="" set DERBY_HOME=%DERBY_INSTALL% @if "%DERBY_HOME%"=="" goto noderbyhome @if "%JAVA_HOME%"=="" goto nojavahome @if not exist "%JAVA_HOME%\bin\java.exe" goto nojavahome :set_host if "%1" == "" goto setServerHost set derbyHost=%1 goto set_port :setServerHost if not "%DERBY_SERVER_HOST%" == "" goto setServerHost2 set derbyHost=localhost goto set_port :setServerHost2 set derbyHost=%DERBY_SERVER_HOST% :set_port shift if "%1" == "" goto setServerPort set derbyPort=%1 goto start_server :setServerPort if not "%DERBY_SERVER_PORT%" == "" goto setServerPort2 set derbyPort=1527 goto start_server :setServerPort2 set derbyPort=%DERBY_SERVER_PORT% :start_server @REM --------------------------------------------------------- @REM -- start Derby as a Network server @REM --------------------------------------------------------- "%JAVA_HOME%\bin\java" -cp "%DERBY_HOME%\lib\derby.jar;%DERBY_HOME%\lib\derbytools.jar;%DERBY_HOME%\lib\derbynet.jar;%CLASSPATH%" org.apache.derby.drda.NetworkServerControl start -h %derbyHost% -p %derbyPort% goto end @REM --------------------------------------------------------- @REM -- To use a different JVM with a different syntax, simply edit @REM -- this file @REM --------------------------------------------------------- :nojavahome echo JAVA_HOME not set or could not find java executable in JAVA_HOME. echo Please set JAVA_HOME to the location of a valid Java installation. goto end :noderbyhome echo DERBY_HOME or DERBY_INSTALL not set. Set one of these variables echo to the location of your Derby installation. goto end :end set derbyPort= set derbyHost= sun-javadb-10.3.2.1/frameworks/NetworkServer/bin/stopNetworkServer.bat 0000755 0415062 0001750 00000006074 10641441224 025333 0 ustar lh136778 clustra @echo. @echo The frameworks scripts have been deprecated. Please use the new scripts in @echo the /bin directory. See the file frameworks.DEPRECATED.txt for more @echo information. @echo. @REM Licensed to the Apache Software Foundation (ASF) under one or more @REM contributor license agreements. See the NOTICE file distributed with @REM this work for additional information regarding copyright ownership. @REM The ASF licenses this file to you under the Apache License, Version 2.0 @REM (the "License"); you may not use this file except in compliance with @REM the License. You may obtain a copy of the License at @REM @REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, software @REM distributed under the License is distributed on an "AS IS" BASIS, @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @REM See the License for the specific language governing permissions and @REM limitations under the License. @REM -- @REM -- REQUIREMENTS: @REM -- You must have the derby jar files as well as the @REM -- derby network server class files in your classpath. @REM -- @REM -- Check the setNetworkServerCP.bat file for an example of @REM -- what to set. @REM -- This file for use on Windows systems @REM --------------------------------------------------------- @echo off rem set DERBY_INSTALL= @if "%DERBY_HOME%"=="" set DERBY_HOME=%DERBY_INSTALL% @if "%DERBY_HOME%"=="" goto noderbyhome @if "%JAVA_HOME%"=="" goto nojavahome @if not exist "%JAVA_HOME%\bin\java.exe" goto nojavahome :set_host if "%1" == "" goto setServerHost set derbyHost=%1 goto set_port :setServerHost if not "%DERBY_SERVER_HOST%" == "" goto setServerHost2 set derbyHost=localhost goto set_port :setServerHost2 set derbyHost=%DERBY_SERVER_HOST% :set_port shift if "%1" == "" goto setServerPort set derbyPort=%1 goto stop_server :setServerPort if not "%DERBY_SERVER_PORT%" == "" goto setServerPort2 set derbyPort=1527 goto stop_server :setServerPort2 set derbyPort=%DERBY_SERVER_PORT% :stop_server @REM --------------------------------------------------------- @REM -- shutdown Derby as a Network server @REM --------------------------------------------------------- %JAVA_HOME%\bin\java -cp "%DERBY_HOME%\lib\derby.jar;%DERBY_HOME%\lib\derbytools.jar;%DERBY_HOME%\lib\derbynet.jar;%CLASSPATH%" org.apache.derby.drda.NetworkServerControl shutdown -h %derbyHost% -p %derbyPort% goto end @REM --------------------------------------------------------- @REM -- To use a different JVM with a different syntax, simply edit @REM -- this file @REM --------------------------------------------------------- :nojavahome echo JAVA_HOME not set or could not find java executable in JAVA_HOME. echo Please set JAVA_HOME to the location of a valid Java installation. goto end :noderbyhome echo DERBY_HOME or DERBY_INSTALL not set. Set one of these variables echo to the location of your Derby installation. goto end :end set derbyPort= set derbyHost= sun-javadb-10.3.2.1/frameworks/NetworkServer/readme.html 0000644 0415062 0001750 00000002413 10641441224 022456 0 ustar lh136778 clustraDerby's Network Server framework
sun-javadb-10.3.2.1/frameworks/embedded/ 0000755 0415062 0001750 00000000000 10641441224 017244 5 ustar lh136778 clustra sun-javadb-10.3.2.1/frameworks/embedded/bin/ 0000755 0415062 0001750 00000000000 10641441224 020014 5 ustar lh136778 clustra sun-javadb-10.3.2.1/frameworks/embedded/bin/sysinfo.ksh 0000755 0415062 0001750 00000004701 10641441224 022222 0 ustar lh136778 clustra echo echo The frameworks scripts have been deprecated. Please use the new scripts in echo the /bin directory. See the file frameworks.DEPRECATED.txt for more echo information echo # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to you under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --------------------------------------------------------- # -- This script file is an example of how to use sysinfo to get # -- important system information # -- # -- REQUIREMENTS: # -- # -- This utility will report important system info about # -- jar files which are in your classpath. Jar files which are not # -- if your classpath will not be reported. # -- # -- Check the setCP.ksh to see an example of adding the # -- the Derby jars to your classpath. # -- # -- # -- This file for use on Unix korn shell systems # --------------------------------------------------------- # DERBY_INSTALL= DERBY_HOME=${DERBY_HOME:-$DERBY_INSTALL} [ -z "$DERBY_HOME" ] && { echo "\$DERBY_HOME or \$DERBY_INSTALL not set. Please set one of these variables" echo "to the location of your Derby installation." exit 1 } [ -z "$JAVA_HOME" ] && { [ -x /usr/java/bin/java ] && { JAVA_HOME=/usr/java } [ -z "$JAVA_HOME" ] && { echo "JAVA_HOME not set. Please set JAVA_HOME to the location of your Java" echo "installation." exit 1 } } # --------------------------------------------------------- # -- start sysinfo # --------------------------------------------------------- "$JAVA_HOME/bin/java" -cp "${DERBY_HOME}/lib/derby.jar:${DERBY_HOME}/lib/derbytools.jar:${CLASSPATH}" org.apache.derby.tools.sysinfo # --------------------------------------------------------- # -- To use a different JVM with a different syntax, simply edit # -- this file # --------------------------------------------------------- sun-javadb-10.3.2.1/frameworks/embedded/bin/dblook.bat 0000755 0415062 0001750 00000005012 10641441224 021757 0 ustar lh136778 clustra @echo. @echo The frameworks scripts have been deprecated. Please use the new scripts in @echo the /bin directory. See the file frameworks.DEPRECATED.txt for more @echo information. @echo. @REM Licensed to the Apache Software Foundation (ASF) under one or more @REM contributor license agreements. See the NOTICE file distributed with @REM this work for additional information regarding copyright ownership. @REM The ASF licenses this file to you under the Apache License, Version 2.0 @REM (the "License"); you may not use this file except in compliance with @REM the License. You may obtain a copy of the License at @REM @REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, software @REM distributed under the License is distributed on an "AS IS" BASIS, @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @REM See the License for the specific language governing permissions and @REM limitations under the License. @REM --------------------------------------------------------- @REM -- This batch file is an example of how to start dblook in @REM -- an embedded environment. @REM -- @REM -- REQUIREMENTS: @REM -- You must have the Derby libraries in your classpath @REM -- @REM -- See the setEmbeddedCP.bat for an example of @REM -- how to do this. @REM -- @REM -- This file for use on Windows systems @REM --------------------------------------------------------- @echo off rem set DERBY_INSTALL= @if "%DERBY_HOME%"=="" set DERBY_HOME=%DERBY_INSTALL% @if "%DERBY_HOME%"=="" goto noderbyhome @if "%JAVA_HOME%"=="" goto nojavahome @if not exist "%JAVA_HOME%\bin\java.exe" goto nojavahome @REM --------------------------------------------------------- @REM -- start dblook @REM --------------------------------------------------------- "%JAVA_HOME%\bin\java" -cp "%DERBY_HOME%\lib\derby.jar;%DERBY_HOME%\lib\derbytools.jar;%CLASSPATH%" org.apache.derby.tools.dblook %* @GOTO end @REM --------------------------------------------------------- @REM -- To use a different JVM with a different syntax, simply edit @REM -- this file @REM --------------------------------------------------------- :nojavahome echo JAVA_HOME not set or could not find java executable in JAVA_HOME. echo Please set JAVA_HOME to the location of a valid Java installation. goto end :noderbyhome echo DERBY_HOME or DERBY_INSTALL not set. Set one of these variables echo to the location of your Derby installation. goto end :end sun-javadb-10.3.2.1/frameworks/embedded/bin/sysinfo.bat 0000755 0415062 0001750 00000005637 10641441224 022214 0 ustar lh136778 clustra @echo. @echo The frameworks scripts have been deprecated. Please use the new scripts in @echo the /bin directory. See the file frameworks.DEPRECATED.txt for more @echo information. @echo. @REM Licensed to the Apache Software Foundation (ASF) under one or more @REM contributor license agreements. See the NOTICE file distributed with @REM this work for additional information regarding copyright ownership. @REM The ASF licenses this file to you under the Apache License, Version 2.0 @REM (the "License"); you may not use this file except in compliance with @REM the License. You may obtain a copy of the License at @REM @REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, software @REM distributed under the License is distributed on an "AS IS" BASIS, @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @REM See the License for the specific language governing permissions and @REM limitations under the License. @REM --------------------------------------------------------- @REM -- This batch file is an example of how to use sysinfo to get @REM -- important system information @REM -- @REM -- REQUIREMENTS: @REM -- @REM -- This utility will report important system info about @REM -- jar files which are in your classpath. Jar files which are not @REM -- if your classpath will not be reported. @REM -- @REM -- Check the setCP.bat to see an example of adding the @REM -- the Derby jars to your classpath. @REM -- @REM -- This file for use on Windows systems @REM --------------------------------------------------------- @echo off rem set DERBY_INSTALL= @if "%DERBY_HOME%"=="" set DERBY_HOME=%DERBY_INSTALL% @if "%DERBY_HOME%"=="" goto noderbyhome @if "%JAVA_HOME%"=="" goto nojavahome @if not exist "%JAVA_HOME%\bin\java.exe" goto nojavahome @REM --------------------------------------------------------- @REM -- start sysinfo @REM --------------------------------------------------------- "%JAVA_HOME%\bin\java" -cp "%DERBY_HOME%\lib\derby.jar;%DERBY_HOME%\lib\derbytools.jar;%CLASSPATH%" org.apache.derby.tools.sysinfo @GOTO end @REM --------------------------------------------------------- @REM -- To use Microsoft's JView JVM, use the following command @REM --------------------------------------------------------- @REM -- jview org.apache.derby.tools.sysinfo @REM --------------------------------------------------------- @REM -- To use a different JVM with a different syntax, simply edit @REM -- this file @REM --------------------------------------------------------- :nojavahome echo JAVA_HOME not set or could not find java executable in JAVA_HOME. echo Please set JAVA_HOME to the location of a valid Java installation. goto end :noderbyhome echo DERBY_HOME or DERBY_INSTALL not set. Set one of these variables echo to the location of your Derby installation. goto end :end sun-javadb-10.3.2.1/frameworks/embedded/bin/setEmbeddedCP.bat 0000755 0415062 0001750 00000003720 10641441224 023141 0 ustar lh136778 clustra @echo. @echo The frameworks scripts have been deprecated. Please use the new scripts in @echo the /bin directory. See the file frameworks.DEPRECATED.txt for more @echo information. @echo. @REM Licensed to the Apache Software Foundation (ASF) under one or more @REM contributor license agreements. See the NOTICE file distributed with @REM this work for additional information regarding copyright ownership. @REM The ASF licenses this file to you under the Apache License, Version 2.0 @REM (the "License"); you may not use this file except in compliance with @REM the License. You may obtain a copy of the License at @REM @REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, software @REM distributed under the License is distributed on an "AS IS" BASIS, @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @REM See the License for the specific language governing permissions and @REM limitations under the License. @REM --------------------------------------------------------- @REM -- This batch file sets the CLASSPATH environment variable @REM -- for use with Derby products in embedded mode @REM -- @REM -- To use this script from other locations, change the @REM -- value assigned to DERBY_INSTALL to be an absolute path @REM -- (set DERBY_INSTALL=C:\derby) instead of the current relative path @REM -- @REM -- This file for use on Windows systems @REM -- @REM --------------------------------------------------------- @echo off rem set DERBY_INSTALL= @if "%DERBY_HOME%"=="" set DERBY_HOME=%DERBY_INSTALL% @if "%DERBY_HOME%"=="" goto noderbyhome @FOR %%X in ("%DERBY_HOME%") DO SET DERBY_HOME=%%~sX set CLASSPATH=%DERBY_HOME%\lib\derby.jar;%DERBY_HOME%\lib\derbytools.jar;%CLASSPATH% @goto end :noderbyhome @echo DERBY_HOME or DERBY_INSTALL not set. Set one of these variables @echo to the location of your Derby installation. @goto end :end sun-javadb-10.3.2.1/frameworks/embedded/bin/ij.bat 0000755 0415062 0001750 00000005023 10641441224 021111 0 ustar lh136778 clustra @echo. @echo The frameworks scripts have been deprecated. Please use the new scripts in @echo the /bin directory. See the file frameworks.DEPRECATED.txt for more @echo information. @echo. @REM Licensed to the Apache Software Foundation (ASF) under one or more @REM contributor license agreements. See the NOTICE file distributed with @REM this work for additional information regarding copyright ownership. @REM The ASF licenses this file to you under the Apache License, Version 2.0 @REM (the "License"); you may not use this file except in compliance with @REM the License. You may obtain a copy of the License at @REM @REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, software @REM distributed under the License is distributed on an "AS IS" BASIS, @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @REM See the License for the specific language governing permissions and @REM limitations under the License. @REM --------------------------------------------------------- @REM -- This batch file is an example of how to start ij in @REM -- an embedded environment. @REM -- @REM -- REQUIREMENTS: @REM -- You must have the Derby libraries in your classpath @REM -- @REM -- See the setEmbeddedCP.bat for an example of @REM -- how to do this. @REM -- @REM -- This file for use on Windows systems @REM --------------------------------------------------------- @echo off rem set DERBY_INSTALL= @if "%DERBY_HOME%"=="" set DERBY_HOME=%DERBY_INSTALL% @if "%DERBY_HOME%"=="" goto noderbyhome @if "%JAVA_HOME%"=="" goto nojavahome @if not exist "%JAVA_HOME%\bin\java.exe" goto nojavahome @REM --------------------------------------------------------- @REM -- start ij @REM --------------------------------------------------------- "%JAVA_HOME%\bin\java" -cp "%DERBY_HOME%\lib\derby.jar;%DERBY_HOME%\lib\derbytools.jar;%CLASSPATH%" -Dij.protocol=jdbc:derby: org.apache.derby.tools.ij @goto end @REM --------------------------------------------------------- @REM -- To use a different JVM with a different syntax, simply edit @REM -- this file @REM --------------------------------------------------------- :nojavahome echo JAVA_HOME not set or could not find java executable in JAVA_HOME. echo Please set JAVA_HOME to the location of a valid Java installation. goto end :noderbyhome echo DERBY_HOME or DERBY_INSTALL not set. Set one of these variables echo to the location of your Derby installation. goto end :end sun-javadb-10.3.2.1/frameworks/embedded/bin/dblook.ksh 0000755 0415062 0001750 00000004432 10641441224 022003 0 ustar lh136778 clustra echo echo The frameworks scripts have been deprecated. Please use the new scripts in echo the /bin directory. See the file frameworks.DEPRECATED.txt for more echo information echo # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to you under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --------------------------------------------------------- # -- This simple script is an example of how to start dblook in # -- an embedded environment. # -- #-- REQUIREMENTS: # -- You must have the Derby libraries in your classpath # -- # -- See the setEmbeddedCP.ksh for an example of # -- how to do this. # -- # -- This file for use on Unix ksh systems # --------------------------------------------------------- # DERBY_INSTALL= DERBY_HOME=${DERBY_HOME:-$DERBY_INSTALL} [ -z "$DERBY_HOME" ] && { echo "\$DERBY_HOME or \$DERBY_INSTALL not set. Please set one of these variables" echo "to the location of your Derby installation." exit 1 } [ -z "$JAVA_HOME" ] && { [ -x /usr/java/bin/java ] && { JAVA_HOME=/usr/java } [ -z "$JAVA_HOME" ] && { echo "JAVA_HOME not set. Please set JAVA_HOME to the location of your Java" echo "installation." exit 1 } } # --------------------------------------------------------- # -- start dblook # --------------------------------------------------------- "$JAVA_HOME/bin/java" -cp "${DERBY_HOME}/lib/derby.jar:${DERBY_HOME}/lib/derbytools.jar:${CLASSPATH}" org.apache.derby.tools.dblook $@ # --------------------------------------------------------- # -- To use a different JVM with a different syntax, simply edit # -- this file # --------------------------------------------------------- sun-javadb-10.3.2.1/frameworks/embedded/bin/setEmbeddedCP.ksh 0000755 0415062 0001750 00000003362 10641441224 023162 0 ustar lh136778 clustra echo echo The frameworks scripts have been deprecated. Please use the new scripts in echo the /bin directory. See the file frameworks.DEPRECATED.txt for more echo information echo # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to you under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --------------------------------------------------------- # -- This script file sets the CLASSPATH environment variable # -- for use with Derby products in embedded mode # -- # -- To use this script from other locations, change the # -- value assigned to DERBY_INSTALL to be an absolute path # -- (export DERBY_INSTALL=/opt/derby) instead of the current relative path # -- # -- This file for use on Unix ksh systems # -- # --------------------------------------------------------- # DERBY_INSTALL= DERBY_HOME=${DERBY_HOME:-$DERBY_INSTALL} [ -z "$DERBY_HOME" ] && { echo "\$DERBY_HOME or \$DERBY_INSTALL not set. Please set one of these variables" echo "to the location of your Derby installation." exit 1 } export CLASSPATH="${DERBY_HOME}/lib/derby.jar:${DERBY_HOME}/lib/derbytools.jar:${CLASSPATH}" sun-javadb-10.3.2.1/frameworks/embedded/bin/ij.ksh 0000755 0415062 0001750 00000004447 10641441224 021141 0 ustar lh136778 clustra echo echo The frameworks scripts have been deprecated. Please use the new scripts in echo the /bin directory. See the file frameworks.DEPRECATED.txt for more echo information echo # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to you under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --------------------------------------------------------- # -- This simple script is an example of how to start ij in # -- and embedded environment. # -- #-- REQUIREMENTS: # -- You must have the Derby libraries in your classpath # -- # -- See the setEmbeddedCP.ksh for an example of # -- how to do this. # -- # -- This file for use on Unix ksh systems # --------------------------------------------------------- # DERBY_INSTALL= DERBY_HOME=${DERBY_HOME:-$DERBY_INSTALL} [ -z "$DERBY_HOME" ] && { echo "\$DERBY_HOME or \$DERBY_INSTALL not set. Please set one of these variables" echo "to the location of your Derby installation." exit 1 } [ -z "$JAVA_HOME" ] && { [ -x /usr/java/bin/java ] && { JAVA_HOME=/usr/java } [ -z "$JAVA_HOME" ] && { echo "JAVA_HOME not set. Please set JAVA_HOME to the location of your Java" echo "installation." exit 1 } } # --------------------------------------------------------- # -- start ij # --------------------------------------------------------- "$JAVA_HOME/bin/java" -cp "${DERBY_HOME}/lib/derby.jar:${DERBY_HOME}/lib/derbytools.jar:${CLASSPATH}" -Dij.protocol=jdbc:derby: org.apache.derby.tools.ij # --------------------------------------------------------- # -- To use a different JVM with a different syntax, simply edit # -- this file # --------------------------------------------------------- sun-javadb-10.3.2.1/frameworks/embedded/readme.html 0000644 0415062 0001750 00000002373 10641441224 021374 0 ustar lh136778 clustraA framework is the environment in which Derby runs. The framework in which you run Derby affects how you run applications against Derby.
The frameworks directory contains subdirectories for each framework with supporting files. Depending on the framework, the subdirectory includes:
bin Subdirectory
All subdirectories in this directory contain a bin subdirectory that has scripts that serve as examples of how to run some of the basic Derby tools and utilities tailored for the particular framework. For server frameworks, start and stop scripts are also provided.
To use the scripts for a particular framework, modify the scripts as necessary and put that framework's bin subdirectory first in your path.
For an easy-to-follow example of how to run an application in the two frameworks, see the simple example in the demos directory if your distribution includes it.
For more information about frameworks, see Getting Started with Derby.
An embedded framework is the most basic framework. Derby runs embedded in a Java application. When the application loads the local JDBC driver, it starts up the Derby engine. When the application shuts down, it shuts down the Derby engine. Only a single application can access a database at one time.
The bin subdirectory in frameworks/embedded contains scripts for running some of the Derby tools in an embedded environment. For working in an embedded environment, put the frameworks/embedded/bin subdirectory first in your path.
A server framework is a continuously running Java application that allows multiple, remote JDBC applications to connect to Derby.
The Derby Network Server is a server framework that comes with Derby. The Derby Network Server works with the Derby Client driver and the DB2 JCC JDBC driver. Please read the Derby documentation on the differences between the client and the embedded drivers.
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
Package org.apache.derby.authentication |
---|
Class org.apache.derby.authentication.DatabasePrincipal extends java.lang.Object implements Serializable |
---|
Serialized Fields |
---|
java.lang.String userName
Package org.apache.derby.drda |
---|
Class org.apache.derby.drda.NetServlet extends javax.servlet.http.HttpServlet implements Serializable |
---|
Serialized Fields |
---|
java.lang.String formHeader
java.lang.String host
int portNumber
java.lang.String tracingDirectory
boolean logStatus
boolean traceStatus
java.lang.String[] knownLang
java.lang.String locale
NetworkServerControl server
java.io.PrintWriter out
java.lang.Runnable service
Package org.apache.derby.jdbc |
---|
Class org.apache.derby.jdbc.ClientBaseDataSource extends java.lang.Object implements Serializable |
---|
serialVersionUID: -7660172643035173692L
Serialized Fields |
---|
int loginTimeout
java.lang.String databaseName
java.lang.String description
java.lang.String dataSourceName
int portNumber
java.lang.String serverName
java.lang.String user
short securityMechanism
boolean retrieveMessageText
java.lang.String traceFile
java.lang.String traceDirectory
boolean traceFileAppend
java.lang.String password
int sslMode
boolean createDatabase
boolean shutdownDatabase
java.lang.String connectionAttributes
int traceLevel
Class org.apache.derby.jdbc.ClientConnectionPoolDataSource extends ClientDataSource implements Serializable |
---|
serialVersionUID: -539234282156481377L
Class org.apache.derby.jdbc.ClientConnectionPoolDataSource40 extends ClientConnectionPoolDataSource implements Serializable |
---|
Class org.apache.derby.jdbc.ClientDataSource extends ClientBaseDataSource implements Serializable |
---|
serialVersionUID: 1894299584216955553L
Class org.apache.derby.jdbc.ClientDataSource40 extends ClientDataSource implements Serializable |
---|
Class org.apache.derby.jdbc.ClientXADataSource extends ClientDataSource implements Serializable |
---|
serialVersionUID: 7057075094707674880L
Class org.apache.derby.jdbc.ClientXADataSource40 extends ClientXADataSource implements Serializable |
---|
Class org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource extends EmbeddedDataSource implements Serializable |
---|
serialVersionUID: 7852784308039674160L
Class org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource40 extends EmbeddedConnectionPoolDataSource implements Serializable |
---|
Class org.apache.derby.jdbc.EmbeddedDataSource extends org.apache.derby.jdbc.ReferenceableDataSource implements Serializable |
---|
serialVersionUID: -4945135214995641181L
Serialized Fields |
---|
java.lang.String databaseName
java.lang.String dataSourceName
java.lang.String description
java.lang.String createDatabase
java.lang.String shutdownDatabase
java.lang.String connectionAttributes
boolean attributesAsPassword
Class org.apache.derby.jdbc.EmbeddedDataSource40 extends EmbeddedDataSource implements Serializable |
---|
Class org.apache.derby.jdbc.EmbeddedXADataSource extends EmbeddedDataSource implements Serializable |
---|
serialVersionUID: -5715798975598379738L
Class org.apache.derby.jdbc.EmbeddedXADataSource40 extends EmbeddedXADataSource implements Serializable |
---|
Class org.apache.derby.jdbc.ReferenceableDataSource extends java.lang.Object implements Serializable |
---|
serialVersionUID: 1872877359127597176L
Serialized Fields |
---|
java.lang.String description
java.lang.String dataSourceName
java.lang.String databaseName
java.lang.String password
java.lang.String user
int loginTimeout
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
See:
Description
Packages | |
---|---|
org.apache.derby.authentication | |
org.apache.derby.drda | |
org.apache.derby.jdbc | JDBC driver and data source implementations. |
org.apache.derby.tools |
Apache Derby is a pure Java, standards-based relational database engine. Derby provides an easy to use data management solution for software developers with zero administration for end users. Derby runs on any J2SE 1.4.2 or higher virtual machine and supports Java ME/CDC/Foundation. Derby's database format is platform independent allowing databases to be copied to any machine type.
Apache Derby is a subproject of the Apache DB project, and is
licensed under the Apache License, Version 2.0 (the "License"); you may not use these files except in compliance with the License. You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
You can find Derby on the web at:
http://db.apache.org/derby/
Apache Derby releases can be downloaded from the following page:
http://db.apache.org/derby/derby_downloads.html
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
jdbc:derby:
.
password
property for the data source.
user
property for the data source.
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:
- Interfaces (italic)
- Classes
- Enums
- Exceptions
- Errors
- Annotation Types
Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
- Class inheritance diagram
- Direct Subclasses
- All Known Subinterfaces
- All Known Implementing Classes
- Class/interface declaration
- Class/interface description
- Nested Class Summary
- Field Summary
- Constructor Summary
- Method Summary
- Field Detail
- Constructor Detail
- Method Detail
Each annotation type has its own separate page with the following sections:
- Annotation Type declaration
- Annotation Type description
- Required Element Summary
- Optional Element Summary
- Element Detail
Each enum has its own separate page with the following sections:
- Enum declaration
- Enum description
- Enum Constant Summary
- Enum Constant Detail
There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting withjava.lang.Object
. The interfaces do not inherit fromjava.lang.Object
.
- When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
- When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
This help file applies to API documentation generated using the standard doclet.
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
All Classes
Packages
|
sun-javadb-10.3.2.1/javadoc/jdbc3/org/ 0000755 0415062 0001750 00000000000 10723243306 016520 5 ustar lh136778 clustra sun-javadb-10.3.2.1/javadoc/jdbc3/org/apache/ 0000755 0415062 0001750 00000000000 10723243306 017741 5 ustar lh136778 clustra sun-javadb-10.3.2.1/javadoc/jdbc3/org/apache/derby/ 0000755 0415062 0001750 00000000000 10723243306 021046 5 ustar lh136778 clustra sun-javadb-10.3.2.1/javadoc/jdbc3/org/apache/derby/tools/ 0000755 0415062 0001750 00000000000 10723243310 022201 5 ustar lh136778 clustra sun-javadb-10.3.2.1/javadoc/jdbc3/org/apache/derby/tools/dblook.html 0000644 0415062 0001750 00000047623 10723243306 024362 0 ustar lh136778 clustra
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.tools.dblook
public final class dblook
Constructor Summary | |
---|---|
dblook(java.lang.String[] args)
|
Method Summary | |
---|---|
static java.lang.String |
addQuotes(java.lang.String name)
|
static java.lang.String |
addSingleQuotes(java.lang.String name)
|
static java.lang.String |
expandDoubleQuotes(java.lang.String name)
|
static java.lang.String |
getColNameFromNumber(java.lang.String tableId,
int colNum)
|
static java.lang.String |
getColumnListFromDescription(java.lang.String tableId,
java.lang.String description)
|
static boolean |
isExcludedTable(java.lang.String tableName)
|
static boolean |
isIgnorableSchema(java.lang.String schemaName)
|
static java.lang.String |
lookupMessage(java.lang.String key)
|
static java.lang.String |
lookupMessage(java.lang.String key,
java.lang.String[] vals)
|
static java.lang.String |
lookupSchemaId(java.lang.String schemaId)
|
static java.lang.String |
lookupTableId(java.lang.String tableId)
|
static void |
main(java.lang.String[] args)
|
static java.lang.String |
removeNewlines(java.lang.String str)
|
static boolean |
stringContainsTargetTable(java.lang.String str)
|
static java.lang.String |
stripQuotes(java.lang.String quotedName)
|
static void |
writeVerboseOutput(java.lang.String key,
java.lang.String value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public dblook(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public static void main(java.lang.String[] args)
public static java.lang.String getColumnListFromDescription(java.lang.String tableId, java.lang.String description) throws java.sql.SQLException
java.sql.SQLException
public static java.lang.String getColNameFromNumber(java.lang.String tableId, int colNum) throws java.sql.SQLException
java.sql.SQLException
public static java.lang.String addQuotes(java.lang.String name)
public static java.lang.String addSingleQuotes(java.lang.String name)
public static java.lang.String stripQuotes(java.lang.String quotedName)
public static boolean isExcludedTable(java.lang.String tableName)
public static boolean isIgnorableSchema(java.lang.String schemaName)
public static boolean stringContainsTargetTable(java.lang.String str)
public static java.lang.String expandDoubleQuotes(java.lang.String name)
public static java.lang.String lookupSchemaId(java.lang.String schemaId)
public static java.lang.String lookupTableId(java.lang.String tableId)
public static void writeVerboseOutput(java.lang.String key, java.lang.String value)
public static java.lang.String lookupMessage(java.lang.String key)
public static java.lang.String lookupMessage(java.lang.String key, java.lang.String[] vals)
public static java.lang.String removeNewlines(java.lang.String str)
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.tools.sysinfo
public class sysinfo
This class displays system information to system out. To run from the command-line, enter the following:
java org.apache.derby.tools.sysinfo
Also available on this class are methods which allow you to determine the version of the code for the system without actually booting a database. Please note that this is the Derby version of the .jar files, not of your databases.
The numbering scheme for released Derby products is m1.m2.m3
where m1
is the major release version, m2
is the minor release version,
and m3
is the maintenance level. Versions of the product with the same
major and minor version numbers are considered feature compatible.
Valid major and minor versions are always greater than zero. Valid maintenance versions are greater than or equal to zero.
Field Summary | |
---|---|
static java.lang.String |
CLIENT
The genus name for the client code. |
static java.lang.String |
DBMS
The genus name for the Apache Derby code. |
static java.lang.String |
NET
The genus name for the network server code. |
static java.lang.String |
TOOLS
The genus name for the tools code. |
Method Summary | |
---|---|
static java.lang.String |
getBuildNumber()
gets the build number for the Apache Derby embedded library |
static java.lang.String |
getBuildNumber(java.lang.String genus)
gets the build number for the specified library |
static void |
getInfo(java.io.PrintWriter out)
|
static int |
getMajorVersion()
gets the major version of the Apache Derby embedded code. |
static int |
getMajorVersion(java.lang.String genus)
gets the major version of the specified code library. |
static int |
getMinorVersion()
gets the minor version of the Apache Derby embedded code. |
static int |
getMinorVersion(java.lang.String genus)
gets the minor version of the specified code library. |
static java.lang.String |
getProductName()
gets the product name for the Apache Derby embedded library |
static java.lang.String |
getProductName(java.lang.String genus)
gets the external name for the specified code library. |
static java.lang.String |
getVersionString()
Return the version information string for the specified library including alpha or beta indicators. |
static java.lang.String |
getVersionString(java.lang.String genus)
Return the version information string for the Apache Derby embedded library including alpha or beta indicators. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DBMS
public static final java.lang.String TOOLS
public static final java.lang.String NET
public static final java.lang.String CLIENT
Method Detail |
---|
public static void main(java.lang.String[] args)
public static int getMajorVersion()
public static int getMajorVersion(java.lang.String genus)
genus
- which library to get the version of. Valid inputs include
DBMS, TOOLS, NET, CLIENT
public static int getMinorVersion()
public static int getMinorVersion(java.lang.String genus)
genus
- which library to get the version of. Valid inputs include
DBMS, TOOLS, NET, CLIENT.
public static java.lang.String getBuildNumber()
public static java.lang.String getBuildNumber(java.lang.String genus)
genus
- which library to get the build number for. Valid inputs are
DBMS, TOOLS, NET, CLIENT.
public static java.lang.String getProductName()
public static java.lang.String getProductName(java.lang.String genus)
genus
- which library to get the name for
public static java.lang.String getVersionString()
public static java.lang.String getVersionString(java.lang.String genus)
public static void getInfo(java.io.PrintWriter out)
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
Class Summary | |
---|---|
dblook | |
ij | ij is Derby's interactive JDBC scripting tool. |
sysinfo | This class displays system information to system out. |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.tools.ij
public class ij
ij is Derby's interactive JDBC scripting tool. It is a simple utility for running scripts against a Derby database. You can also use it interactively to run ad hoc queries. ij provides several commands for ease in accessing a variety of JDBC features.
To run from the command line enter the following:
java [options] org.apache.derby.tools.ij [arguments]
ij is can also be used with any database server that supports a JDBC driver.
Method Summary | |
---|---|
static java.lang.String |
getArg(java.lang.String param,
java.lang.String[] args)
|
static void |
getPropertyArg(java.lang.String[] args)
|
static void |
main(java.lang.String[] args)
|
static int |
runScript(java.sql.Connection conn,
java.io.InputStream sqlIn,
java.lang.String inputEncoding,
java.io.OutputStream sqlOut,
java.lang.String outputEncoding)
Run a SQL script from an InputStream and write the resulting output to the provided PrintStream. |
static java.sql.Connection |
startJBMS()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
- thrown if cannot access input or output files.public static int runScript(java.sql.Connection conn, java.io.InputStream sqlIn, java.lang.String inputEncoding, java.io.OutputStream sqlOut, java.lang.String outputEncoding) throws java.io.UnsupportedEncodingException
conn
- Connection to be used as the script's default connection.sqlIn
- InputStream for the script.inputEncoding
- Encoding of the script.sqlOut
- OutputStream for the script's outputoutputEncoding
- Output encoding to use.
java.io.UnsupportedEncodingException
public static java.lang.String getArg(java.lang.String param, java.lang.String[] args)
public static void getPropertyArg(java.lang.String[] args) throws java.io.IOException
java.io.IOException
public static java.sql.Connection startJBMS() throws java.sql.SQLException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException, java.lang.InstantiationException
java.sql.SQLException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
java.lang.InstantiationException
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
Classes
dblook ij sysinfo |
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
Interface Summary | |
---|---|
UserAuthenticator | The UserAuthenticator interface provides operations to authenticate a user's credentials in order to successfully connect to a database. |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserAuthenticator
The UserAuthenticator interface provides operations to authenticate a user's credentials in order to successfully connect to a database. Any user authentication schemes could be implemented using this interface and registered at start-up time.
If an application requires its own authentication scheme, then it can implement this interface and register as the authentication scheme that Derby should call upon connection requests to the system. See the dcoumentation for the property derby.authentication.provider
A typical example would be to implement user authentication using LDAP, Sun NIS+, or even Windows User Domain, using this interface.
Note: Additional connection attributes can be specified on the database connection URL and/or Properties object on jdbc connection. Values for these attributes can be retrieved at runtime by the (specialized) authentication scheme to further help user authentication, if one needs additional info other than user, password, and database name.
Method Summary | |
---|---|
boolean |
authenticateUser(java.lang.String userName,
java.lang.String userPassword,
java.lang.String databaseName,
java.util.Properties info)
Authenticate a user's credentials. |
Method Detail |
---|
boolean authenticateUser(java.lang.String userName, java.lang.String userPassword, java.lang.String databaseName, java.util.Properties info) throws java.sql.SQLException
jdbc:derby:testdb;user=Fred;password=ScT7dmM2
then the userName will be Fred and within the Derby user authorization
system, Fred becomes a case-insensitive authorization identifier and
is known as FRED
jdbc:derby:testdb;user="Fred";password=ScT7dmM2
then the userName will be "Fred" and within the Derby user authorization
system, Fred becomes a case-sensitive authorization identifier and is
known as Fred
userName
- The user's name for the connection request. May be
null. The user name is passed in as is from the
connection request.
Derby will pass in the user name that is set on
connection request as is, without changing the
casing and without removing the delimiter quotes
if any.userPassword
- The user's password for the connection request.
May be null.databaseName
- The database that the user wants to connect to.
Will be null if this is system level authentication.info
- A Properties object that contains additional
connection information, that can help to
authenticate the user. It has properties of the
'info' object passed as part of
DriverManager.getConnection() call and any
attributes set on the JDBC URL.
java.sql.SQLException
- An exception processing the request,
connection request will be denied. The SQL exception will
be returned to the connection attempt.
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interfaces
UserAuthenticator |
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
Class Summary | |
---|---|
NetServlet | This servlet can be used to start Derby Network Server from a remote location. |
NetworkServerControl | NetworkServerControl provides the ability to start a Network Server or connect to a running Network Server to shutdown, configure or retreive diagnostic information. |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.derby.drda.NetServlet
public class NetServlet
This servlet can be used to start Derby Network Server from a remote location.
These servlet configuration parameters are understood by this servlet.
portNumber- Port number to use. The default is 1527.
startNetworkServerOnInit- Starts the Derby Network Server at servlet initialization if 'true'.
tracingDirectory- Directory for trace files
Constructor Summary | |
---|---|
NetServlet()
|
Method Summary | |
---|---|
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get the form of NetServlet. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get the form of NetServlet. |
java.lang.String |
getHtmlLabelledMessageInstance(org.apache.derby.iapi.tools.i18n.LocalizedResource localUtil,
java.lang.String key,
java.lang.String id)
get an HTML labelled message from the resource bundle file, according to the given key. |
void |
init(javax.servlet.ServletConfig config)
Initialize the servlet. |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NetServlet()
Method Detail |
---|
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
portNumber- Port number
host- Host name
traceDirectory- location of trace directory
startNetworkServerOnInit- start the server on initialization
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
public java.lang.String getHtmlLabelledMessageInstance(org.apache.derby.iapi.tools.i18n.LocalizedResource localUtil, java.lang.String key, java.lang.String id)
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.drda.NetworkServerControl
public class NetworkServerControl
NetworkServerControl provides the ability to start a Network Server or connect to a running Network Server to shutdown, configure or retreive diagnostic information. With the exception of ping, these commands can only be performed from the machine on which the server is running. Commands can be performed from the command line with the following arguments:
Properties can be set in the derby.properties file or on the command line. Properties on the command line take precedence over properties in the derby.properties file. Arguments on the command line take precedence over properties. The following is a list of properties that can be set for NetworkServerControl:
Examples.
This is an example of shutting down the server on port 1621.
java org.apache.derby.drda.NetworkServerControl shutdown -p 1621
This is an example of turning tracing on for session 3
java org.apache.derby.drda.NetworkServerControl trace on -s 3
This is an example of starting and then shutting down the network server on port 1621 on machine myhost
java org.apache.derby.drda.NetworkServerControl start -h myhost -p 1621 java org.apache.derby.drda.NetworkServerControl shutdown -h myhost -p 1621
This is an example of starting and shutting down the Network Server in the example above with the API.
NetworkServerControl serverControl = new NetworkServerControl(InetAddress.getByName("myhost"),1621) serverControl.shutdown();
Field Summary | |
---|---|
static int |
DEFAULT_PORTNUMBER
|
Constructor Summary | |
---|---|
NetworkServerControl()
Creates a NetworkServerControl object that is configured to control a Network Server on the default host(localhost) and the default port(1527) unless derby.drda.portNumber and derby.drda.host are set. |
|
NetworkServerControl(java.net.InetAddress address,
int portNumber)
Creates a NetworkServerControl object that is configured to control a Network Server on a specified port and InetAddress. |
Method Summary | |
---|---|
java.util.Properties |
getCurrentProperties()
Get current Network server properties |
int |
getMaxThreads()
Returns the current maxThreads setting for the running Network Server |
java.lang.String |
getRuntimeInfo()
Return detailed session runtime information about sessions, prepared statements, and memory usage for the running Network Server. |
java.lang.String |
getSysinfo()
Return classpath and version information about the running Network Server. |
int |
getTimeSlice()
Return the current timeSlice setting for the running Network Server |
void |
logConnections(boolean on)
Turn logging connections on or off. |
static void |
main(java.lang.String[] args)
main routine for NetworkServerControl |
void |
ping()
Check if Network Server is started Excecutes and returns without error if the server has started |
protected void |
setClientLocale(java.lang.String locale)
set the client locale. |
void |
setMaxThreads(int max)
Set Network Server maxthread parameter. |
void |
setTimeSlice(int timeslice)
Set Network Server connection time slice parameter. |
void |
setTraceDirectory(java.lang.String traceDirectory)
Set directory for trace files. |
void |
shutdown()
Shutdown a Network Server. |
void |
start(java.io.PrintWriter consoleWriter)
Start a Network Server This method will launch a separate thread and start Network Server. |
void |
trace(boolean on)
Turn tracing on or off for the specified connection on the Network Server. |
void |
trace(int connNum,
boolean on)
Turn tracing on or off for all connections on the Network Server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_PORTNUMBER
Constructor Detail |
---|
public NetworkServerControl(java.net.InetAddress address, int portNumber) throws java.lang.Exception
Examples:
To configure for port 1621 and listen on the loopback address:
NetworkServerControl util = new NetworkServerControl(InetAddress.getByName("localhost"), 1621);
address
- The IP address of the Network Server host.
address cannot be null.portNumber
- port number server is to used. If <= 0,
default port number is used
java.lang.Exception
- on errorpublic NetworkServerControl() throws java.lang.Exception
new NetworkServerControl() is equivalent to calling new NetworkServerControl(InetAddress.getByName("localhost"),1527);
java.lang.Exception
- on errorMethod Detail |
---|
public static void main(java.lang.String[] args)
args
- array of arguments indicating command to be executed.
See class comments for more informationpublic void start(java.io.PrintWriter consoleWriter) throws java.lang.Exception
Note: an alternate method to starting the Network Server with the API, is to use the derby.drda.startNetworkServer property in derby.properties.
consoleWriter
- PrintWriter to which server console will be
output. Null will disable console output.
java.lang.Exception
- if there is an error starting the server.shutdown()
public void shutdown() throws java.lang.Exception
java.lang.Exception
- throws an exception if an error occurspublic void ping() throws java.lang.Exception
java.lang.Exception
- throws an exception if an error occurspublic void trace(boolean on) throws java.lang.Exception
on
- true to turn tracing on, false to turn tracing off.
java.lang.Exception
- throws an exception if an error occurspublic void trace(int connNum, boolean on) throws java.lang.Exception
connNum
- connection number. Note: Connection numbers will print
in the Derby error log if logConnections is onon
- true to turn tracing on, false to turn tracing off.
java.lang.Exception
- throws an exception if an error occurspublic void logConnections(boolean on) throws java.lang.Exception
on
- true to turn on, false to turn off
java.lang.Exception
- throws an exception if an error occurspublic void setTraceDirectory(java.lang.String traceDirectory) throws java.lang.Exception
traceDirectory
- directory for trace files on machine
where server is running
java.lang.Exception
- throws an exception if an error occurspublic java.lang.String getSysinfo() throws java.lang.Exception
java.lang.Exception
- throws an exception if an error occurspublic java.lang.String getRuntimeInfo() throws java.lang.Exception
java.lang.Exception
- throws an exception if an error occurspublic void setMaxThreads(int max) throws java.lang.Exception
max
- maximum number of connection threads.
If <= 0, connection threads will be created when
there are no free connection threads.
java.lang.Exception
- throws an exception if an error occurssetTimeSlice(int)
public int getMaxThreads() throws java.lang.Exception
java.lang.Exception
- throws an exception if an error occurssetMaxThreads(int)
public void setTimeSlice(int timeslice) throws java.lang.Exception
timeslice
- number of milliseconds given to each session before yielding to
another session, if <=0, never yield.
java.lang.Exception
- throws an exception if an error occurssetMaxThreads(int)
public int getTimeSlice() throws java.lang.Exception
java.lang.Exception
- throws an exception if an error occurssetTimeSlice(int)
public java.util.Properties getCurrentProperties() throws java.lang.Exception
java.lang.Exception
- throws an exception if an error occursprotected void setClientLocale(java.lang.String locale)
locale
- Locale to use
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Classes
NetServlet NetworkServerControl |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.ReferenceableDataSource
org.apache.derby.jdbc.EmbeddedDataSource
public class EmbeddedDataSource
EmbeddedDataSource is Derby's DataSource implementation for JDBC3.0.
A DataSource is a factory for Connection objects. An object that implements the DataSource interface will typically be registered with a JNDI service provider.
EmbeddedDataSource automatically supports the correct JDBC specification version for the Java Virtual Machine's environment.
The following is a list of properties that can be set on a Derby DataSource object:
Standard DataSource properties (from JDBC 3.0 specification).
databaseName
(String): Mandatory
setDatabaseName("g:/db/wombat")
on the data source object.dataSourceName
(String): Optional
description
(String): Optional
password
(String): Optional
DataSource.getConnection()
,
ConnectionPoolDataSource.getPooledConnection()
and XADataSource.getXAConnection()
methods.
user
(String): Optional
DataSource.getConnection()
,
ConnectionPoolDataSource.getPooledConnection()
and XADataSource.getXAConnection()
methods.
attributesAsPassword
(Boolean): Optional
DataSource.getConnection(String user, String password)
,
ConnectionPoolDataSource.getPooledConnection(String user, String password)
or XADataSource.getXAConnection(String user, String password)
as a set
of connection attributes. The format of the attributes is the same as the format
of the attributes in the property connectionAttributes. If false the password value
is treated normally as the password for the given user.
Setting this property to true allows a connection request from an application to
provide more authentication information that just a password, for example the request
can include the user's password and an encrypted database's boot password.connectionAttributes
(String): Optional
attribute=value
, each separated by semi-colon (';').
E.g. setConnectionAttributes("bootPassword=erd3234dggd3kazkj3000");
.
databaseName
and not by setting the databaseName
connection attribute in the connectionAttributes
property.
createDatabase
(String): Optional
databaseName
if that database does not already
exist. The database is created when a connection object is obtained from
the data source. shutdownDatabase
(String): Optional
Examples.
This is an example of setting a property directly using Derby's EmbeddedDataSource object. This code is typically written by a system integrator :
import org.apache.derby.jdbc.*; // dbname is the database name // if create is true, create the database if necessary javax.sql.DataSource makeDataSource (String dbname, boolean create) throws Throwable { EmbeddedDataSource ds = new EmbeddedDataSource(); ds.setDatabaseName(dbname); if (create) ds.setCreateDatabase("create"); return ds; }
Example of setting properties thru reflection. This code is typically generated by tools or written by a system integrator:
javax.sql.DataSource makeDataSource(String dbname) throws Throwable { Class[] parameter = new Class[1]; parameter[0] = dbname.getClass(); DataSource ds = new EmbeddedDataSource(); Class cl = ds.getClass(); Method setName = cl.getMethod("setDatabaseName", parameter); Object[] arg = new Object[1]; arg[0] = dbname; setName.invoke(ds, arg); return ds; }
Example on how to register a data source object with a JNDI naming service.
DataSource ds = makeDataSource("mydb"); Context ctx = new InitialContext(); ctx.bind("jdbc/MyDB", ds);
Example on how to retrieve a data source object from a JNDI naming service.
Context ctx = new InitialContext(); DataSource ds = (DataSource)ctx.lookup("jdbc/MyDB");
Constructor Summary | |
---|---|
EmbeddedDataSource()
No-arg constructor. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object p0)
|
boolean |
getAttributesAsPassword()
Return the value of the attributesAsPassword property. |
java.sql.Connection |
getConnection()
Attempt to establish a database connection. |
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password)
Attempt to establish a database connection with the given username and password. |
java.lang.String |
getConnectionAttributes()
|
java.lang.String |
getCreateDatabase()
|
java.lang.String |
getShutdownDatabase()
|
void |
setAttributesAsPassword(boolean attributesAsPassword)
Set attributeAsPassword property to enable passing connection request attributes in the password argument of getConnection. |
void |
setConnectionAttributes(java.lang.String prop)
Set this property to pass in more Derby specific connection URL attributes. |
void |
setCreateDatabase(java.lang.String create)
Set this property to create a new database. |
void |
setShutdownDatabase(java.lang.String shutdown)
Set this property if one wishes to shutdown the database identified by databaseName. |
Methods inherited from class org.apache.derby.jdbc.ReferenceableDataSource |
---|
getDatabaseName, getDataSourceName, getDescription, getLoginTimeout, getLogWriter, getObjectInstance, getPassword, getReference, getUser, setDatabaseName, setDataSourceName, setDescription, setLoginTimeout, setLogWriter, setPassword, setUser |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sql.CommonDataSource |
---|
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
Methods inherited from interface java.sql.Wrapper |
---|
isWrapperFor, unwrap |
Constructor Detail |
---|
public EmbeddedDataSource()
Method Detail |
---|
public boolean equals(java.lang.Object p0)
equals
in class java.lang.Object
public final void setCreateDatabase(java.lang.String create)
create
- if set to the string "create", this data source will try
to create a new database of databaseName, or boot the database if one
by that name already exists.public final java.lang.String getCreateDatabase()
public final void setShutdownDatabase(java.lang.String shutdown)
shutdown
- if set to the string "shutdown", this data source will
shutdown the database if it is running.public final java.lang.String getShutdownDatabase()
public final void setConnectionAttributes(java.lang.String prop)
prop
- set to the list of Derby connection
attributes separated by semi-colons. E.g., to specify an encryption
bootPassword of "x8hhk2adf", and set upgrade to true, do the following:
ds.setConnectionAttributes("bootPassword=x8hhk2adf;upgrade=true");See the Derby documentation for complete list.
public final java.lang.String getConnectionAttributes()
public final void setAttributesAsPassword(boolean attributesAsPassword)
attributesAsPassword
- true to encode password argument as a set of connection attributes in a connection request.public final boolean getAttributesAsPassword()
public final java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
- if a database-access error occurs.public final java.sql.Connection getConnection(java.lang.String username, java.lang.String password) throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
username
- the database user on whose behalf the Connection is
being madepassword
- the user's password
java.sql.SQLException
- if a database-access error occurs.
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.ClientBaseDataSource
org.apache.derby.jdbc.ClientDataSource
org.apache.derby.jdbc.ClientConnectionPoolDataSource
public class ClientConnectionPoolDataSource
ClientConnectionPoolDataSource is a factory for PooledConnection objects. An object that implements this interface will typically be registered with a naming service that is based on the Java Naming and Directory Interface (JNDI). Use ClientConnectionPoolDataSource if your application runs under JDBC3.0 or JDBC2.0, that is, on the following Java Virtual Machines:
Field Summary | |
---|---|
static java.lang.String |
className__
|
Constructor Summary | |
---|---|
ClientConnectionPoolDataSource()
|
Method Summary | |
---|---|
javax.sql.PooledConnection |
getPooledConnection()
|
javax.sql.PooledConnection |
getPooledConnection(java.lang.String user,
java.lang.String password)
|
Methods inherited from class org.apache.derby.jdbc.ClientDataSource |
---|
getConnection, getConnection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sql.CommonDataSource |
---|
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
Methods inherited from interface java.sql.Wrapper |
---|
isWrapperFor, unwrap |
Field Detail |
---|
public static final java.lang.String className__
Constructor Detail |
---|
public ClientConnectionPoolDataSource()
Method Detail |
---|
public javax.sql.PooledConnection getPooledConnection() throws java.sql.SQLException
getPooledConnection
in interface javax.sql.ConnectionPoolDataSource
java.sql.SQLException
public javax.sql.PooledConnection getPooledConnection(java.lang.String user, java.lang.String password) throws java.sql.SQLException
getPooledConnection
in interface javax.sql.ConnectionPoolDataSource
java.sql.SQLException
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.ClientBaseDataSource
public abstract class ClientBaseDataSource
Base class for client-side DataSource implementations.
Method Summary | |
---|---|
static org.apache.derby.client.am.LogWriter |
computeDncLogWriter(org.apache.derby.client.am.Connection connection,
java.io.PrintWriter logWriter,
java.lang.String traceDirectory,
java.lang.String traceFile,
boolean traceFileAppend,
java.lang.String logWriterInUseSuffix,
int traceFileSuffixIndex,
int traceLevel)
|
static int |
getClientSSLMode(java.util.Properties properties)
|
java.lang.String |
getConnectionAttributes()
|
java.lang.String |
getCreateDatabase()
|
java.lang.String |
getDatabaseName()
|
java.lang.String |
getDataSourceName()
|
java.lang.String |
getDescription()
|
int |
getLoginTimeout()
|
java.io.PrintWriter |
getLogWriter()
|
java.lang.String |
getPassword()
|
static java.lang.String |
getPassword(java.util.Properties properties)
|
int |
getPortNumber()
|
javax.naming.Reference |
getReference()
|
boolean |
getRetrieveMessageText()
|
static boolean |
getRetrieveMessageText(java.util.Properties properties)
|
short |
getSecurityMechanism()
Return the security mechanism. |
static short |
getSecurityMechanism(java.util.Properties properties)
Return security mechanism if it is set, else upgrade the security mechanism if possible and return the upgraded security mechanism |
short |
getSecurityMechanism(java.lang.String password)
Return the security mechanism for this datasource object. |
java.lang.String |
getServerName()
|
java.lang.String |
getShutdownDatabase()
|
java.lang.String |
getSsl()
|
static int |
getSSLModeFromString(java.lang.String s)
|
java.lang.String |
getTraceDirectory()
|
static java.lang.String |
getTraceDirectory(java.util.Properties properties)
Check if derby.client.traceDirectory is provided as a JVM property. |
java.lang.String |
getTraceFile()
|
static java.lang.String |
getTraceFile(java.util.Properties properties)
|
boolean |
getTraceFileAppend()
|
static boolean |
getTraceFileAppend(java.util.Properties properties)
|
int |
getTraceLevel()
|
static int |
getTraceLevel(java.util.Properties properties)
Check if derby.client.traceLevel is provided as a JVM property. |
static short |
getUpgradedSecurityMechanism(java.lang.String password)
This method has logic to upgrade security mechanism to a better (more secure) one if it is possible. |
java.lang.String |
getUser()
|
static java.lang.String |
getUser(java.util.Properties properties)
|
void |
setConnectionAttributes(java.lang.String prop)
Set this property to pass in more Derby specific connection URL attributes. |
void |
setCreateDatabase(java.lang.String create)
Set this property to create a new database. |
void |
setDatabaseName(java.lang.String databaseName)
|
void |
setDataSourceName(java.lang.String dataSourceName)
|
void |
setDescription(java.lang.String description)
|
void |
setLoginTimeout(int seconds)
|
void |
setLogWriter(java.io.PrintWriter logWriter)
|
void |
setPassword(java.lang.String password)
|
void |
setPortNumber(int portNumber)
|
void |
setRetrieveMessageText(boolean retrieveMessageText)
|
void |
setSecurityMechanism(short securityMechanism)
Sets the security mechanism. |
void |
setServerName(java.lang.String serverName)
|
void |
setShutdownDatabase(java.lang.String shutdown)
Set this property if one wishes to shutdown the database identified by databaseName. |
void |
setSsl(int mode)
|
void |
setSsl(java.lang.String mode)
|
void |
setTraceDirectory(java.lang.String traceDirectory)
|
void |
setTraceFile(java.lang.String traceFile)
|
void |
setTraceFileAppend(boolean traceFileAppend)
|
void |
setTraceLevel(int traceLevel)
|
void |
setUser(java.lang.String user)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int propertyDefault_portNumber
public static final java.lang.String propertyDefault_serverName
public static final int SSL_OFF
public static final int SSL_BASIC
public static final int SSL_PEER_AUTHENTICATION
public static final java.lang.String propertyDefault_user
protected short securityMechanism
public static final short propertyDefault_securityMechanism
public static final boolean propertyDefault_retrieveMessageText
public static final boolean propertyDefault_traceFileAppend
public static final short USER_ONLY_SECURITY
public static final short CLEAR_TEXT_PASSWORD_SECURITY
public static final short ENCRYPTED_PASSWORD_SECURITY
public static final short ENCRYPTED_USER_AND_PASSWORD_SECURITY
public static final short STRONG_PASSWORD_SUBSTITUTE_SECURITY
protected java.lang.String connectionAttributes
public static final int TRACE_NONE
public static final int TRACE_CONNECTION_CALLS
public static final int TRACE_STATEMENT_CALLS
public static final int TRACE_RESULT_SET_CALLS
public static final int TRACE_DRIVER_CONFIGURATION
public static final int TRACE_CONNECTS
public static final int TRACE_PROTOCOL_FLOWS
public static final int TRACE_RESULT_SET_META_DATA
public static final int TRACE_PARAMETER_META_DATA
public static final int TRACE_DIAGNOSTICS
public static final int TRACE_XA_CALLS
public static final int TRACE_ALL
public static final int propertyDefault_traceLevel
protected int traceLevel
Method Detail |
---|
public void setLoginTimeout(int seconds)
public int getLoginTimeout()
public void setLogWriter(java.io.PrintWriter logWriter)
public java.io.PrintWriter getLogWriter()
public static final int getSSLModeFromString(java.lang.String s) throws org.apache.derby.client.am.SqlException
org.apache.derby.client.am.SqlException
public static final int getClientSSLMode(java.util.Properties properties) throws org.apache.derby.client.am.SqlException
org.apache.derby.client.am.SqlException
public static java.lang.String getUser(java.util.Properties properties)
public static short getSecurityMechanism(java.util.Properties properties)
properties
- Look in the properties if securityMechanism is set or not
if set, return this security mechanism
public static short getUpgradedSecurityMechanism(java.lang.String password)
password
- password argument
public static boolean getRetrieveMessageText(java.util.Properties properties)
public static java.lang.String getTraceFile(java.util.Properties properties)
public static java.lang.String getTraceDirectory(java.util.Properties properties)
properties
- jdbc url properties
public static boolean getTraceFileAppend(java.util.Properties properties)
public static java.lang.String getPassword(java.util.Properties properties)
public final void setPassword(java.lang.String password)
public final java.lang.String getPassword()
public javax.naming.Reference getReference() throws javax.naming.NamingException
getReference
in interface javax.naming.Referenceable
javax.naming.NamingException
public static org.apache.derby.client.am.LogWriter computeDncLogWriter(org.apache.derby.client.am.Connection connection, java.io.PrintWriter logWriter, java.lang.String traceDirectory, java.lang.String traceFile, boolean traceFileAppend, java.lang.String logWriterInUseSuffix, int traceFileSuffixIndex, int traceLevel) throws org.apache.derby.client.am.SqlException
org.apache.derby.client.am.SqlException
public void setDatabaseName(java.lang.String databaseName)
public java.lang.String getDatabaseName()
public void setDataSourceName(java.lang.String dataSourceName)
public java.lang.String getDataSourceName()
public void setDescription(java.lang.String description)
public java.lang.String getDescription()
public void setPortNumber(int portNumber)
public int getPortNumber()
public void setServerName(java.lang.String serverName)
public java.lang.String getServerName()
public void setUser(java.lang.String user)
public java.lang.String getUser()
public void setRetrieveMessageText(boolean retrieveMessageText)
public boolean getRetrieveMessageText()
public void setSecurityMechanism(short securityMechanism)
securityMechanism
- to setpublic short getSecurityMechanism()
getUpgradedSecurityMechanism(String)
public short getSecurityMechanism(java.lang.String password)
password
- password of user
getUpgradedSecurityMechanism(String)
public void setSsl(java.lang.String mode) throws org.apache.derby.client.am.SqlException
org.apache.derby.client.am.SqlException
public void setSsl(int mode)
public java.lang.String getSsl()
public final void setCreateDatabase(java.lang.String create)
create
- if set to the string "create", this data source will try
to create a new database of databaseName, or boot the
database if one by that name already exists.public final java.lang.String getCreateDatabase()
public final void setShutdownDatabase(java.lang.String shutdown)
shutdown
- if set to the string "shutdown", this data source will
shutdown the database if it is running.public final java.lang.String getShutdownDatabase()
public final void setConnectionAttributes(java.lang.String prop)
prop
- set to the list of Derby connection attributes separated by semi-colons. E.g., to specify an
encryption bootPassword of "x8hhk2adf", and set upgrade to true, do the following: ds.setConnectionAttributes("bootPassword=x8hhk2adf;upgrade=true");See Derby documentation for complete list.
public final java.lang.String getConnectionAttributes()
public static int getTraceLevel(java.util.Properties properties)
properties
- jdbc url properties
public void setTraceLevel(int traceLevel)
public int getTraceLevel()
public void setTraceFile(java.lang.String traceFile)
public java.lang.String getTraceFile()
public void setTraceDirectory(java.lang.String traceDirectory)
public java.lang.String getTraceDirectory()
public void setTraceFileAppend(boolean traceFileAppend)
public boolean getTraceFileAppend()
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.ClientBaseDataSource
org.apache.derby.jdbc.ClientDataSource
org.apache.derby.jdbc.ClientXADataSource
public class ClientXADataSource
This is Derby's network XADataSource for use with JDBC3.0 and JDBC2.0.
An XADataSource is a factory for XAConnection objects. It represents a RM in a DTP environment. An object that implements the XADataSource interface is typically registered with a JNDI service provider.ClientXADataSource automatically supports the correct JDBC specification version for the Java Virtual Machine's environment.
ClientXADataSource is serializable and referenceable.
See ClientDataSource for DataSource properties.
Field Summary | |
---|---|
static java.lang.String |
className__
|
Constructor Summary | |
---|---|
ClientXADataSource()
|
Method Summary | |
---|---|
javax.sql.XAConnection |
getXAConnection()
|
javax.sql.XAConnection |
getXAConnection(java.lang.String user,
java.lang.String password)
|
Methods inherited from class org.apache.derby.jdbc.ClientDataSource |
---|
getConnection, getConnection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sql.CommonDataSource |
---|
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
Methods inherited from interface java.sql.Wrapper |
---|
isWrapperFor, unwrap |
Field Detail |
---|
public static final java.lang.String className__
Constructor Detail |
---|
public ClientXADataSource()
Method Detail |
---|
public javax.sql.XAConnection getXAConnection() throws java.sql.SQLException
getXAConnection
in interface javax.sql.XADataSource
java.sql.SQLException
public javax.sql.XAConnection getXAConnection(java.lang.String user, java.lang.String password) throws java.sql.SQLException
getXAConnection
in interface javax.sql.XADataSource
java.sql.SQLException
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Class Summary | |
---|---|
ClientBaseDataSource | Base class for client-side DataSource implementations. |
ClientConnectionPoolDataSource | ClientConnectionPoolDataSource is a factory for PooledConnection objects. |
ClientDataSource | ClientDataSource is a simple data source implementation that can be used for establishing connections in a non-pooling, non-distributed environment. |
ClientDriver | |
ClientXADataSource | This is Derby's network XADataSource for use with JDBC3.0 and JDBC2.0. |
EmbeddedConnectionPoolDataSource | EmbeddedConnectionPoolDataSource is Derby's ConnectionPoolDataSource implementation for the JDBC3.0 environment. |
EmbeddedDataSource | EmbeddedDataSource is Derby's DataSource implementation for JDBC3.0. |
EmbeddedDriver | The embedded JDBC driver (Type 4) for Derby. |
EmbeddedSimpleDataSource | EmbeddedSimpleDataSource is Derby's DataSource implementation for J2ME/CDC/Foundation. |
EmbeddedXADataSource | EmbeddedXADataSource is Derby's XADataSource implementation for JDBC3.0. |
Client/Remote driver and data sources, used to connect to the network server
Embedded driver and data sources, used when the database engine is embedded with the application.
Derby's JDBC api is defined by its entry point classes, the drivers and data source implementations
and the standard JDBC api definitions of the java.sql
and javax.sql
classes.
Derby does not provide non-standard extensions to standard JDBC classes such as Connection
,
to encourage portable JDBC applications.
JDBC Implementation notes by JDBC class | ||
java.sql.Blob | java.sql.Clob | java.sql.Connection |
java.sql.PreparedStatement | java.sql.ResultSet | |
JDBC Implementation notes by SQL type | ||
SQL DATE and JDBC | SQL TIME and JDBC | SQL TIMESTAMP and JDBC |
Stream parameter values are not re-used. [JDBC3] says in the last paragraph of 13.2.2 that parameters are re-used but nothing special about streams. However javadoc for java.sql.PreparedStatement.clearParamters() says 'In general, parameter values remain in force for repeated use of a statement'. Maybe 'in general' can be interpreted to mean 'except for streams'. Stream parameter values are not re-used and if a stream is re-used, the statement execution will fail with 'Stream has already been read and end-of-file reached and cannot be re-used.'.
An ASCII character is defined as an eight bit character (range 0x00 to 0xff), see CHAR() function definition by [JDBC3] in appendix C.2.
For character types (Types.CHAR, Types.VARCHAR & Types.LONGVARCHAR), each character in the value is translated to one byte in the ASCII stream:
Derby’s SQL DATE type represents a date in the form yyyy-mm-dd with no associated time zone information.
A JDBC Date (java.sql.Date) by definition represents a point in time on a given date in a given time zone.
[JDBC3] intends that the point in time for a java.sql.Date object is 00:00 (midnight), but this is not enforced by the class.
JDBC drivers are required to return java.sql.Date objects that are normalized to 00:00 according to the required time zone.
Applications are expected to pass in java.sql.Date instances that are normalized to 00:00 (see section 18.1.1 of [TUTORIAL3]).
setDate() without a Calendar object or passing null for a Calendar object:
The yyyy-mm-dd values will be calculated from the milli-seconds value of the java.sql.Date instance using a Calendar object set to the time zone of the virtual machine.
This yyyy-mm-dd value will match the output of java.sql.Date.toString().
setDate() with a Calendar object:
The yyyy-mm-dd values will be calculated from the milliseconds value of the java.sql.Date instance using the passed in Calendar.
The code for this is
cal.setTimeInMillis(value.getTime());
yyyy = cal.get(Calendar.YEAR);
mm = cal.get(Calendar.MONTH) + 1;
dd = cal.get(Calendar.DAY_OF_MONTH);
This yyyy-mm-dd value may not match the output of java.sql.Date.toString() for the value, since this method always uses the time zone of the virtual machine.
Derby does not require that the application’s java.sql.Date value is normalized to 00:00 according to the required time zone.
In both cases no time zone information is stored with the SQL DATE value.
getDate() without a Calendar object or passing null for a Calendar object:
A java.sql.Date instance is returned with a millisecond value corresponding to 00:00 on yyyy-mm-dd according to the time zone of the java virtual machine
The toString() method of the returned value will return ‘yyyy-mm-dd’
getDate() with a Calendar object:
A java.sql.Date instance is returned with a millisecond value corresponding to 00:00 on yyyy-mm-dd according to the time zone of the Calendar
The toString() method of the returned value may not return ‘yyyy-mm-dd’, since this method always uses the time zone of the virtual machine.
Three different date formats are built into Derby.
(ISO/JIS) yyyy-mm-dd e.g. “1980-03-21”,
(IBM USA) mm/dd/yyyy e.g. “03/21/1980”, and
(IBM European) dd.mm.yyyy e.g. “21.03.1980”.
If the format of the string matches one of the built in formats then a conversion to a java.sql.Date matches that of a SQL DATE value with value yyyy-mm-dd.
If the string does not match any of the built in formats Derby attempts to use the Java locale specific parser to interpret the string as a date.
Derby’s SQL TIME type represents a time of day in the form hh:mm:ss with no associated time zone information.
A JDBC Time (java.sql.Time) by definition represents a point in time on an unspecified day in a given time zone.
Java.sql.Time extends java.util.date, so it includes a date. [JDBC3] intends that the date stored in a java.sql.Time be Jan 1 1970, but this is not enforced by the class.
JDBC drivers are required to return java.sql.Time objects that are normalized to Jan. 1 1970 according to the required time zone.
Applications are expected to pass in java.sql.Time instances that are normalized to Jan. 1 1970.
setTime() without a Calendar object or passing null for a Calendar object
The hh:mm:ss values will be calculated from the milli-seconds value of the java.sql.Time instance using a Calendar object set to the time zone of the virtual machine.
This hh:mm:ss value will match the output of java.sql.Date.toString().
setTime() with a Calendar object
The hh:mm:ss values will be calculated from the milliseconds value of the java.sql.Date instance using the passed in Calendar.
The code for this is
cal.setTimeInMillis(value.getTime());
hh = cal.get(Calendar.HOUR);
mm = cal.get(Calendar.MINUTE);
ss = cal.get(Calendar.SECOND);
This hh:mm:dd value may not match the output of java.sql.Date.toString() for the value, since this method always uses the time zone of the virtual machine.
Derby does not require that the application’s java.sql.Time value be normalized to Jan 1 1970 according to the required time zone.
In both cases no time zone information is stored with the SQL TIME value.
getTime() without a Calendar object or passing null for a Calendar object
A java.sql.Time instance is returned with a millisecond value corresponding to hh:mm:ss on Jan. 1 1970 according to the time zone of the java virtual machine
The toString() method of the returned value will return ‘hh:mm:ss’.
getTime() with a Calendar object
A java.sql.Time instance is returned with a millisecond value corresponding to hh:mm:ss on Jan. 1 1970 according to the time zone of the Calendar
The toString() method of the returned value may not return ‘hh:mm:ss’, since this method always uses the time zone of the virtual machine.
Three different time formats are built into Derby:
(ISO/EUR) hh.mm.ss e.g. “13.52.03”,
(IBM USA) hh:mm [AM|PM] e.g. “1:52 PM”, and
(JIS) hh:mm:ss e.g. “13:52:03”.
If the format of the string matches one of the built in formats then a conversion to a java.sql.Time matches that of a SQL TIME value with value hh:mm:ss.
If the string does not match any of the built in formats Derby attempts to use the Java locale specific parser to interpret the string as a date.
Derby’s SQL TIMESTAMP type represents a time of day in the form yyyy-mm-dd hh:mm:ss.fffffffff (nanosecond granularity) with no associated time zone information.
A JDBC Timestamp (java.sql.Timestamp) by definition represents a point in time, with nanosecond resolution, in a given time zone.
setTimestamp() without a Calendar object or passing null for a Calendar object
The year, month, day, hour, minute, and second values will be calculated from the milli-seconds value of the java.sql.Timestamp instance using a Calendar object set to the time zone of the virtual machine. The nanosecond value will be calculated from the nanoseconds value of the java.sql.Timestamp.
The timestamp component values will match the output of java.sql.Timestamp.toString().
setTime() with a Calendar object
The year, month, day, hour, minute, and second values will be calculated from the milliseconds value of the java.sql.Date instance using the passed in Calendar. The nanosecond value will be calculated from the nanoseconds value of the java.sql.Timestamp.
The code for this is
cal.setTimeInMillis(value.getTime());
year = cal.get(Calendar.YEAR);
month = cal.get(Calendar.MONTH) + 1;
day = cal.get(Calendar.DAY_OF_MONTH);
hour = cal.get(Calendar.HOUR);
minute = cal.get(Calendar.MINUTE);
second = cal.get(Calendar.SECOND);
nanos = value.getNanos();
This stored timestamp component value may not match the output of java.sql.Timestamp.toString() for the value, since this method always uses the time zone of the virtual machine.
getTimestamp() without a Calendar object or passing null for a Calendar object
A java.sql.Timestamp instance is returned with a nanosecond value corresponding to yyyy-mm-dd hh:mm:ss.fffffffff according to the time zone of the java virtual machine
The toString() method of the returned value will return ‘yyyy-mm-dd hh:mm:ss.fffffffff’.
getTime() with a Calendar object
A java.sql.Time instance is returned with a nanosecond value corresponding to yyyy-mm-dd hh:mm:ss.fffffffff according to the time zone of the Calendar
The toString() method of the returned value may not return ‘yyyy-mm-dd hh:mm:ss.fffffffff’, since this method always uses the time zone of the virtual machine.
Two different timestamp formats are built into Derby:
(ISO) yyyy-mm-dd hh:mm:ss[.ffffff]e.g. “1980-10-25 13:01:23.123456”, and
(IBM) yyyy-mm-dd-hh.mm.ss[.ffffff]e.g. “1980-10-25-13.01.23.123456”.
Note that only microsecond resolution is supported in converting strings to timestamps.
If the format of the string matches one of the built in formats then a conversion to a java.sql.Timestamp matches that of a SQL TIMESTAMP value with value yyyy-mm-dd hh:mm:ss.ffffff.
If the string does not match any of the built in formats Derby attempts to use the Java locale specific parser to interpret the string as a date.
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.ReferenceableDataSource
org.apache.derby.jdbc.EmbeddedDataSource
org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource
public class EmbeddedConnectionPoolDataSource
EmbeddedConnectionPoolDataSource is Derby's ConnectionPoolDataSource implementation for the JDBC3.0 environment.
A ConnectionPoolDataSource is a factory for PooledConnection objects. An object that implements this interface will typically be registered with a JNDI service.
EmbeddedConnectionPoolDataSource automatically supports the correct JDBC specification version for the Java Virtual Machine's environment.
EmbeddedConnectionPoolDataSource is serializable and referenceable.
See EmbeddedDataSource for DataSource properties.
Constructor Summary | |
---|---|
EmbeddedConnectionPoolDataSource()
No-arg constructor. |
Method Summary | |
---|---|
protected javax.sql.PooledConnection |
createPooledConnection(java.lang.String user,
java.lang.String password,
boolean requestPassword)
Create and return an EmbedPooledConnection from this instance of EmbeddedConnectionPoolDataSource. |
javax.sql.PooledConnection |
getPooledConnection()
Attempt to establish a database connection. |
javax.sql.PooledConnection |
getPooledConnection(java.lang.String username,
java.lang.String password)
Attempt to establish a database connection. |
Methods inherited from class org.apache.derby.jdbc.EmbeddedDataSource |
---|
equals, getAttributesAsPassword, getConnection, getConnection, getConnectionAttributes, getCreateDatabase, getShutdownDatabase, setAttributesAsPassword, setConnectionAttributes, setCreateDatabase, setShutdownDatabase |
Methods inherited from class org.apache.derby.jdbc.ReferenceableDataSource |
---|
getDatabaseName, getDataSourceName, getDescription, getLoginTimeout, getLogWriter, getObjectInstance, getPassword, getReference, getUser, setDatabaseName, setDataSourceName, setDescription, setLoginTimeout, setLogWriter, setPassword, setUser |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sql.CommonDataSource |
---|
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
Methods inherited from interface java.sql.Wrapper |
---|
isWrapperFor, unwrap |
Constructor Detail |
---|
public EmbeddedConnectionPoolDataSource()
Method Detail |
---|
public final javax.sql.PooledConnection getPooledConnection() throws java.sql.SQLException
getPooledConnection
in interface javax.sql.ConnectionPoolDataSource
java.sql.SQLException
- if a database-access error occurs.public final javax.sql.PooledConnection getPooledConnection(java.lang.String username, java.lang.String password) throws java.sql.SQLException
getPooledConnection
in interface javax.sql.ConnectionPoolDataSource
username
- the database user on whose behalf the Connection is being madepassword
- the user's password
java.sql.SQLException
- if a database-access error occurs.protected javax.sql.PooledConnection createPooledConnection(java.lang.String user, java.lang.String password, boolean requestPassword) throws java.sql.SQLException
java.sql.SQLException
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.ReferenceableDataSource
org.apache.derby.jdbc.EmbeddedDataSource
org.apache.derby.jdbc.EmbeddedXADataSource
public class EmbeddedXADataSource
EmbeddedXADataSource is Derby's XADataSource implementation for JDBC3.0.
An XADataSource is a factory for XAConnection objects. It represents a RM in a DTP environment. An object that implements the XADataSource interface is typically registered with a JNDI service provider.
EmbeddedXADataSource automatically supports the correct JDBC specification version for the Java Virtual Machine's environment.
EmbeddedXADataSource object only works on a local database. There is no client/server support. An EmbeddedXADataSource object must live in the same jvm as the database.
EmbeddedXADataSource is serializable and referenceable.
See EmbeddedDataSource for DataSource properties.
Constructor Summary | |
---|---|
EmbeddedXADataSource()
no-arg constructor |
Method Summary | |
---|---|
protected javax.sql.XAConnection |
createXAConnection(org.apache.derby.iapi.jdbc.ResourceAdapter ra,
java.lang.String user,
java.lang.String password,
boolean requestPassword)
Intantiate and return an EmbedXAConnection from this instance of EmbeddedXADataSource. |
javax.sql.XAConnection |
getXAConnection()
Attempt to establish a database connection. |
javax.sql.XAConnection |
getXAConnection(java.lang.String user,
java.lang.String password)
Attempt to establish a database connection with the given user name and password. |
Methods inherited from class org.apache.derby.jdbc.EmbeddedDataSource |
---|
equals, getAttributesAsPassword, getConnection, getConnection, getConnectionAttributes, getCreateDatabase, getShutdownDatabase, setAttributesAsPassword, setConnectionAttributes, setCreateDatabase, setShutdownDatabase |
Methods inherited from class org.apache.derby.jdbc.ReferenceableDataSource |
---|
getDatabaseName, getDataSourceName, getDescription, getLoginTimeout, getLogWriter, getObjectInstance, getPassword, getReference, getUser, setDatabaseName, setDataSourceName, setDescription, setLoginTimeout, setLogWriter, setPassword, setUser |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sql.CommonDataSource |
---|
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
Methods inherited from interface java.sql.Wrapper |
---|
isWrapperFor, unwrap |
Constructor Detail |
---|
public EmbeddedXADataSource()
Method Detail |
---|
public final javax.sql.XAConnection getXAConnection() throws java.sql.SQLException
getXAConnection
in interface javax.sql.XADataSource
java.sql.SQLException
- if a database-access error occurs.public final javax.sql.XAConnection getXAConnection(java.lang.String user, java.lang.String password) throws java.sql.SQLException
getXAConnection
in interface javax.sql.XADataSource
user
- the database user on whose behalf the Connection is being madepassword
- the user's password
java.sql.SQLException
- if a database-access error occurs.protected javax.sql.XAConnection createXAConnection(org.apache.derby.iapi.jdbc.ResourceAdapter ra, java.lang.String user, java.lang.String password, boolean requestPassword) throws java.sql.SQLException
user
- password
-
java.sql.SQLException
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.ClientBaseDataSource
org.apache.derby.jdbc.ClientDataSource
public class ClientDataSource
ClientDataSource is a simple data source implementation that can be used for establishing connections in a non-pooling, non-distributed environment. The class ClientConnectionPoolDataSource can be used in a connection pooling environment, and the class ClientXADataSource can be used in a distributed, and pooling environment. Use these DataSources if your application runs under JDBC3.0 or JDBC2.0, that is, on the following Java Virtual Machines:
The example below registers a DNC data source object with a JNDI naming service.
org.apache.derby.client.ClientDataSource dataSource = new org.apache.derby.client.ClientDataSource (); dataSource.setServerName ("my_derby_database_server"); dataSource.setDatabaseName ("my_derby_database_name"); javax.naming.Context context = new javax.naming.InitialContext(); context.bind ("jdbc/my_datasource_name", dataSource);The first line of code in the example creates a data source object. The next two lines initialize the data source's properties. Then a Java object that references the initial JNDI naming context is created by calling the InitialContext() constructor, which is provided by JNDI. System properties (not shown) are used to tell JNDI the service provider to use. The JNDI name space is hierarchical, similar to the directory structure of many file systems. The data source object is bound to a logical JNDI name by calling Context.bind(). In this case the JNDI name identifies a subcontext, "jdbc", of the root naming context and a logical name, "my_datasource_name", within the jdbc subcontext. This is all of the code required to deploy a data source object within JNDI. This example is provided mainly for illustrative purposes. We expect that developers or system administrators will normally use a GUI tool to deploy a data source object. Once a data source has been registered with JNDI, it can then be used by a JDBC application, as is shown in the following example.
javax.naming.Context context = new javax.naming.InitialContext (); javax.sql.DataSource dataSource = (javax.sql.DataSource) context.lookup ("jdbc/my_datasource_name"); java.sql.Connection connection = dataSource.getConnection ("user", "password");The first line in the example creates a Java object that references the initial JNDI naming context. Next, the initial naming context is used to do a lookup operation using the logical name of the data source. The Context.lookup() method returns a reference to a Java Object, which is narrowed to a javax.sql.DataSource object. In the last line, the DataSource.getConnection() method is called to produce a database connection. This simple data source subclass of ClientBaseDataSource maintains it's own private
password
property.
The specified password, along with the user, is validated by DERBY.
This property can be overwritten by specifing
the password parameter on the DataSource.getConnection() method call.
This password property is not declared transient, and therefore
may be serialized to a file in clear-text, or stored
to a JNDI server in clear-text when the data source is saved.
Care must taken by the user to prevent security
breaches.
Field Summary | |
---|---|
static java.lang.String |
className__
|
Constructor Summary | |
---|---|
ClientDataSource()
Creates a simple DERBY data source with default property values for a non-pooling, non-distributed environment. |
Method Summary | |
---|---|
java.sql.Connection |
getConnection()
Attempt to establish a database connection in a non-pooling, non-distributed environment. |
java.sql.Connection |
getConnection(java.lang.String user,
java.lang.String password)
Attempt to establish a database connection in a non-pooling, non-distributed environment. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sql.CommonDataSource |
---|
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
Methods inherited from interface java.sql.Wrapper |
---|
isWrapperFor, unwrap |
Field Detail |
---|
public static final java.lang.String className__
Constructor Detail |
---|
public ClientDataSource()
Method Detail |
---|
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
- if a database-access error occurs.public java.sql.Connection getConnection(java.lang.String user, java.lang.String password) throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
user
- the database user on whose behalf the Connection is being madepassword
- the user's password
java.sql.SQLException
- if a database-access error occurs.
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.ClientDriver
public class ClientDriver
Constructor Summary | |
---|---|
ClientDriver()
|
Method Summary | |
---|---|
boolean |
acceptsURL(java.lang.String url)
|
java.sql.Connection |
connect(java.lang.String url,
java.util.Properties properties)
|
static org.apache.derby.client.am.ClientJDBCObjectFactory |
getFactory()
This method returns an Implementation of ClientJDBCObjectFactory depending on VM under use Currently it returns either ClientJDBCObjectFactoryImpl (or) ClientJDBCObjectFactoryImpl40 |
int |
getMajorVersion()
|
int |
getMinorVersion()
|
java.sql.DriverPropertyInfo[] |
getPropertyInfo(java.lang.String url,
java.util.Properties properties)
|
boolean |
jdbcCompliant()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClientDriver()
Method Detail |
---|
public java.sql.Connection connect(java.lang.String url, java.util.Properties properties) throws java.sql.SQLException
connect
in interface java.sql.Driver
java.sql.SQLException
public boolean acceptsURL(java.lang.String url) throws java.sql.SQLException
acceptsURL
in interface java.sql.Driver
java.sql.SQLException
public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties properties) throws java.sql.SQLException
getPropertyInfo
in interface java.sql.Driver
java.sql.SQLException
public int getMajorVersion()
getMajorVersion
in interface java.sql.Driver
public int getMinorVersion()
getMinorVersion
in interface java.sql.Driver
public boolean jdbcCompliant()
jdbcCompliant
in interface java.sql.Driver
public static org.apache.derby.client.am.ClientJDBCObjectFactory getFactory()
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.EmbeddedDriver
public class EmbeddedDriver
The embedded JDBC driver (Type 4) for Derby.
The driver automatically supports the correct JDBC specification version for the Java Virtual Machine's environment.
Loading this JDBC driver boots the database engine within the same Java virtual machine.
The correct code to load the Derby engine using this driver is (with approriate try/catch blocks):
Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance(); // or new org.apache.derby.jdbc.EmbeddedDriver();When loaded in this way, the class boots the actual JDBC driver indirectly. The JDBC specification recommends the Class.ForName method without the .newInstance() method call, but adding the newInstance() guarantees that Derby will be booted on any Java Virtual Machine.
Note that you do not need to manually load the driver this way if you are running on Jave SE 6 or later. In that environment, the driver will be automatically loaded for you when your application requests a connection to a Derby database.
Any initial error messages are placed in the PrintStream supplied by the DriverManager. If the PrintStream is null error messages are sent to System.err. Once the Derby engine has set up an error logging facility (by default to derby.log) all subsequent messages are sent to it.
By convention, the class used in the Class.forName() method to boot a JDBC driver implements java.sql.Driver. This class is not the actual JDBC driver that gets registered with the Driver Manager. It proxies requests to the registered Derby JDBC driver.
DriverManager
,
DriverManager.getLogStream()
,
Driver
,
SQLException
Constructor Summary | |
---|---|
EmbeddedDriver()
|
Method Summary | |
---|---|
boolean |
acceptsURL(java.lang.String url)
Accept anything that starts with jdbc:derby: . |
java.sql.Connection |
connect(java.lang.String url,
java.util.Properties info)
Connect to the URL if possible |
int |
getMajorVersion()
Returns the driver's major version number. |
int |
getMinorVersion()
Returns the driver's minor version number. |
java.sql.DriverPropertyInfo[] |
getPropertyInfo(java.lang.String url,
java.util.Properties info)
Returns an array of DriverPropertyInfo objects describing possible properties. |
boolean |
jdbcCompliant()
Report whether the Driver is a genuine JDBC COMPLIANT (tm) driver. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EmbeddedDriver()
Method Detail |
---|
public boolean acceptsURL(java.lang.String url) throws java.sql.SQLException
jdbc:derby:
.
acceptsURL
in interface java.sql.Driver
java.sql.SQLException
- if a database-access error occurs.Driver
public java.sql.Connection connect(java.lang.String url, java.util.Properties info) throws java.sql.SQLException
connect
in interface java.sql.Driver
java.sql.SQLException
- illegal url or problem with connectiongDriver
public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties info) throws java.sql.SQLException
getPropertyInfo
in interface java.sql.Driver
java.sql.SQLException
- if a database-access error occurs.Driver
public int getMajorVersion()
getMajorVersion
in interface java.sql.Driver
Driver
public int getMinorVersion()
getMinorVersion
in interface java.sql.Driver
Driver
public boolean jdbcCompliant()
jdbcCompliant
in interface java.sql.Driver
Driver
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.EmbeddedSimpleDataSource
public final class EmbeddedSimpleDataSource
EmbeddedSimpleDataSource is Derby's DataSource implementation for J2ME/CDC/Foundation. It is also supports J2SE platforms. Supports the same properties as EmbeddedDataSource, see that class for details.
EmbeddedSimpleDataSource automatically supports the correct JDBC specification version for the Java Virtual Machine's environment.
EmbeddedDataSource
Constructor Summary | |
---|---|
EmbeddedSimpleDataSource()
No-arg constructor. |
Method Summary | |
---|---|
java.sql.Connection |
getConnection()
Attempt to establish a database connection. |
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password)
Attempt to establish a database connection with the given username and password. |
java.lang.String |
getConnectionAttributes()
|
java.lang.String |
getCreateDatabase()
|
java.lang.String |
getDatabaseName()
|
java.lang.String |
getDataSourceName()
|
java.lang.String |
getDescription()
|
int |
getLoginTimeout()
Gets the maximum time in seconds that this data source can wait while attempting to connect to a database. |
java.io.PrintWriter |
getLogWriter()
Get the log writer for this data source. |
java.lang.String |
getPassword()
|
java.lang.String |
getShutdownDatabase()
|
java.lang.String |
getUser()
|
void |
setConnectionAttributes(java.lang.String prop)
Set this property to pass in more Derby specific connection URL attributes. |
void |
setCreateDatabase(java.lang.String create)
Set this property to create a new database. |
void |
setDatabaseName(java.lang.String databaseName)
Set the database name. |
void |
setDataSourceName(java.lang.String dsn)
Set the data source name. |
void |
setDescription(java.lang.String desc)
Set the data source descripton. |
void |
setLoginTimeout(int seconds)
Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. |
void |
setLogWriter(java.io.PrintWriter out)
Set the log writer for this data source. |
void |
setPassword(java.lang.String password)
Set the password property for the data source. |
void |
setShutdownDatabase(java.lang.String shutdown)
Set this property if one wishes to shutdown the database identified by databaseName. |
void |
setUser(java.lang.String user)
Set the user property for the data source. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.sql.Wrapper |
---|
isWrapperFor, unwrap |
Constructor Detail |
---|
public EmbeddedSimpleDataSource()
Method Detail |
---|
public int getLoginTimeout() throws java.sql.SQLException
getLoginTimeout
in interface javax.sql.CommonDataSource
java.sql.SQLException
- if a database access error occurs.public void setLoginTimeout(int seconds) throws java.sql.SQLException
Derby ignores this property.
setLoginTimeout
in interface javax.sql.CommonDataSource
seconds
- the data source login time limit
java.sql.SQLException
- if a database access error occurs.public java.io.PrintWriter getLogWriter() throws java.sql.SQLException
The log writer is a character output stream to which all logging and tracing messages for this data source object instance will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.Drivermanager class. When a data source object is created the log writer is initially null, in other words, logging is disabled.
getLogWriter
in interface javax.sql.CommonDataSource
java.sql.SQLException
- if a database-access error occurs.public void setLogWriter(java.io.PrintWriter out) throws java.sql.SQLException
The log writer is a character output stream to which all logging and tracing messages for this data source object instance will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.Drivermanager class. When a data source object is created the log writer is initially null, in other words, logging is disabled.
setLogWriter
in interface javax.sql.CommonDataSource
out
- the new log writer; to disable, set to null
java.sql.SQLException
- if a database-access error occurs.public final void setDatabaseName(java.lang.String databaseName)
databaseName
- the name of the databasepublic java.lang.String getDatabaseName()
public final void setDataSourceName(java.lang.String dsn)
dsn
- the name of the data sourcepublic final java.lang.String getDataSourceName()
public final void setDescription(java.lang.String desc)
desc
- the description of the data sourcepublic final java.lang.String getDescription()
public final void setUser(java.lang.String user)
user
property for the data source. This is user
name for any data source getConnection() call that takes no arguments.
public final java.lang.String getUser()
public final void setPassword(java.lang.String password)
password
property for the data source. This is
user's password for any data source getConnection() call that takes no
arguments.
public final java.lang.String getPassword()
public final void setCreateDatabase(java.lang.String create)
create
- if set to the string "create", this data source will try to
create a new database of databaseName, or boot the database if
one by that name already exists.public final java.lang.String getCreateDatabase()
public final void setShutdownDatabase(java.lang.String shutdown)
shutdown
- if set to the string "shutdown", this data source will
shutdown the database if it is running.public final java.lang.String getShutdownDatabase()
public final void setConnectionAttributes(java.lang.String prop)
prop
- set to the list of Derby connection attributes separated
by semi-colons. E.g., to specify an encryption bootPassword of
"x8hhk2adf", and set upgrade to true, do the following:
ds.setConnectionAttributes("bootPassword=x8hhk2adf;upgrade=true");See Derby's documentation for complete list.
public final java.lang.String getConnectionAttributes()
public final java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
- if a database-access error occurs.public final java.sql.Connection getConnection(java.lang.String username, java.lang.String password) throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
username
- the database user on whose behalf the Connection is being madepassword
- the user's password
java.sql.SQLException
- if a database-access error occurs.
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
org.apache.* |
---|
org.apache.derby.drda.NetworkServerControl | ||
---|---|---|
public static final int |
DEFAULT_PORTNUMBER |
1527 |
org.apache.derby.jdbc.ClientBaseDataSource | ||
---|---|---|
public static final short |
CLEAR_TEXT_PASSWORD_SECURITY |
3 |
public static final short |
ENCRYPTED_PASSWORD_SECURITY |
7 |
public static final short |
ENCRYPTED_USER_AND_PASSWORD_SECURITY |
9 |
public static final int |
propertyDefault_portNumber |
1527 |
public static final boolean |
propertyDefault_retrieveMessageText |
true |
public static final short |
propertyDefault_securityMechanism |
4 |
public static final java.lang.String |
propertyDefault_serverName |
"localhost" |
public static final boolean |
propertyDefault_traceFileAppend |
false |
public static final int |
propertyDefault_traceLevel |
-1 |
public static final java.lang.String |
propertyDefault_user |
"APP" |
public static final int |
SSL_BASIC |
1 |
public static final int |
SSL_OFF |
0 |
public static final int |
SSL_PEER_AUTHENTICATION |
2 |
public static final short |
STRONG_PASSWORD_SUBSTITUTE_SECURITY |
8 |
public static final int |
TRACE_ALL |
-1 |
public static final int |
TRACE_CONNECTION_CALLS |
1 |
public static final int |
TRACE_CONNECTS |
32 |
public static final int |
TRACE_DIAGNOSTICS |
512 |
public static final int |
TRACE_DRIVER_CONFIGURATION |
16 |
public static final int |
TRACE_NONE |
0 |
public static final int |
TRACE_PARAMETER_META_DATA |
256 |
public static final int |
TRACE_PROTOCOL_FLOWS |
64 |
public static final int |
TRACE_RESULT_SET_CALLS |
4 |
public static final int |
TRACE_RESULT_SET_META_DATA |
128 |
public static final int |
TRACE_STATEMENT_CALLS |
2 |
public static final int |
TRACE_XA_CALLS |
2048 |
public static final short |
USER_ONLY_SECURITY |
4 |
org.apache.derby.jdbc.ClientConnectionPoolDataSource | ||
---|---|---|
public static final java.lang.String |
className__ |
"org.apache.derby.jdbc.ClientConnectionPoolDataSource" |
org.apache.derby.jdbc.ClientDataSource | ||
---|---|---|
public static final java.lang.String |
className__ |
"org.apache.derby.jdbc.ClientDataSource" |
org.apache.derby.jdbc.ClientXADataSource | ||
---|---|---|
public static final java.lang.String |
className__ |
"org.apache.derby.jdbc.ClientXADataSource" |
org.apache.derby.tools.sysinfo | ||
---|---|---|
public static final java.lang.String |
CLIENT |
"dnc" |
public static final java.lang.String |
DBMS |
"DBMS" |
public static final java.lang.String |
NET |
"net" |
public static final java.lang.String |
TOOLS |
"tools" |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
Package org.apache.derby.authentication |
---|
Class org.apache.derby.authentication.DatabasePrincipal extends java.lang.Object implements Serializable |
---|
Serialized Fields |
---|
java.lang.String userName
Package org.apache.derby.drda |
---|
Class org.apache.derby.drda.NetServlet extends javax.servlet.http.HttpServlet implements Serializable |
---|
Serialized Fields |
---|
java.lang.String formHeader
java.lang.String host
int portNumber
java.lang.String tracingDirectory
boolean logStatus
boolean traceStatus
java.lang.String[] knownLang
java.lang.String locale
NetworkServerControl server
java.io.PrintWriter out
java.lang.Runnable service
Package org.apache.derby.jdbc |
---|
Class org.apache.derby.jdbc.ClientBaseDataSource extends java.lang.Object implements Serializable |
---|
serialVersionUID: -7660172643035173692L
Serialized Fields |
---|
int loginTimeout
java.lang.String databaseName
java.lang.String description
java.lang.String dataSourceName
int portNumber
java.lang.String serverName
java.lang.String user
short securityMechanism
boolean retrieveMessageText
java.lang.String traceFile
java.lang.String traceDirectory
boolean traceFileAppend
java.lang.String password
int sslMode
boolean createDatabase
boolean shutdownDatabase
java.lang.String connectionAttributes
int traceLevel
Class org.apache.derby.jdbc.ClientConnectionPoolDataSource extends org.apache.derby.jdbc.ClientDataSource implements Serializable |
---|
serialVersionUID: -539234282156481377L
Class org.apache.derby.jdbc.ClientConnectionPoolDataSource40 extends org.apache.derby.jdbc.ClientConnectionPoolDataSource implements Serializable |
---|
Class org.apache.derby.jdbc.ClientDataSource extends ClientBaseDataSource implements Serializable |
---|
serialVersionUID: 1894299584216955553L
Class org.apache.derby.jdbc.ClientDataSource40 extends org.apache.derby.jdbc.ClientDataSource implements Serializable |
---|
Class org.apache.derby.jdbc.ClientXADataSource extends org.apache.derby.jdbc.ClientDataSource implements Serializable |
---|
serialVersionUID: 7057075094707674880L
Class org.apache.derby.jdbc.ClientXADataSource40 extends org.apache.derby.jdbc.ClientXADataSource implements Serializable |
---|
Class org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource extends org.apache.derby.jdbc.EmbeddedDataSource implements Serializable |
---|
serialVersionUID: 7852784308039674160L
Class org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource40 extends org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource implements Serializable |
---|
Class org.apache.derby.jdbc.EmbeddedDataSource extends org.apache.derby.jdbc.ReferenceableDataSource implements Serializable |
---|
serialVersionUID: -4945135214995641181L
Serialized Fields |
---|
java.lang.String databaseName
java.lang.String dataSourceName
java.lang.String description
java.lang.String createDatabase
java.lang.String shutdownDatabase
java.lang.String connectionAttributes
boolean attributesAsPassword
Class org.apache.derby.jdbc.EmbeddedDataSource40 extends org.apache.derby.jdbc.EmbeddedDataSource implements Serializable |
---|
Class org.apache.derby.jdbc.EmbeddedXADataSource extends org.apache.derby.jdbc.EmbeddedDataSource implements Serializable |
---|
serialVersionUID: -5715798975598379738L
Class org.apache.derby.jdbc.EmbeddedXADataSource40 extends org.apache.derby.jdbc.EmbeddedXADataSource implements Serializable |
---|
Class org.apache.derby.jdbc.ReferenceableDataSource extends java.lang.Object implements Serializable |
---|
serialVersionUID: 1872877359127597176L
Serialized Fields |
---|
java.lang.String description
java.lang.String dataSourceName
java.lang.String databaseName
java.lang.String password
java.lang.String user
int loginTimeout
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
Link toNon-frame version.
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
See:
Description
Packages | |
---|---|
org.apache.derby.authentication | |
org.apache.derby.drda | |
org.apache.derby.jdbc | JDBC driver and data source implementations. |
org.apache.derby.tools |
Apache Derby is a pure Java, standards-based relational database engine. Derby provides an easy to use data management solution for software developers with zero administration for end users. Derby runs on any J2SE 1.4.2 or higher virtual machine and supports Java ME/CDC/Foundation. Derby's database format is platform independent allowing databases to be copied to any machine type.
Apache Derby is a subproject of the Apache DB project, and is
licensed under the Apache License, Version 2.0 (the "License"); you may not use these files except in compliance with the License. You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
You can find Derby on the web at:
http://db.apache.org/derby/
Apache Derby releases can be downloaded from the following page:
http://db.apache.org/derby/derby_downloads.html
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
jdbc:derby:
.
interfaces
is implemented
interfaces
is implemented
interfaces
is implemented
interfaces
is implemented
interfaces
is implemented
interfaces
is implemented
this
if this class implements the interface
this
if this class implements the interface
this
if this class implements the interface
this
if this class implements the interface
this
if this class implements the interface
this
if this class implements the interface
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:
- Interfaces (italic)
- Classes
- Enums
- Exceptions
- Errors
- Annotation Types
Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
- Class inheritance diagram
- Direct Subclasses
- All Known Subinterfaces
- All Known Implementing Classes
- Class/interface declaration
- Class/interface description
- Nested Class Summary
- Field Summary
- Constructor Summary
- Method Summary
- Field Detail
- Constructor Detail
- Method Detail
Each annotation type has its own separate page with the following sections:
- Annotation Type declaration
- Annotation Type description
- Required Element Summary
- Optional Element Summary
- Element Detail
Each enum has its own separate page with the following sections:
- Enum declaration
- Enum description
- Enum Constant Summary
- Enum Constant Detail
There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting withjava.lang.Object
. The interfaces do not inherit fromjava.lang.Object
.
- When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
- When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
This help file applies to API documentation generated using the standard doclet.
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
All Classes
Packages
|
sun-javadb-10.3.2.1/javadoc/jdbc4/org/ 0000755 0415062 0001750 00000000000 10723243314 016520 5 ustar lh136778 clustra sun-javadb-10.3.2.1/javadoc/jdbc4/org/apache/ 0000755 0415062 0001750 00000000000 10723243314 017741 5 ustar lh136778 clustra sun-javadb-10.3.2.1/javadoc/jdbc4/org/apache/derby/ 0000755 0415062 0001750 00000000000 10723243314 021046 5 ustar lh136778 clustra sun-javadb-10.3.2.1/javadoc/jdbc4/org/apache/derby/tools/ 0000755 0415062 0001750 00000000000 10723243314 022206 5 ustar lh136778 clustra sun-javadb-10.3.2.1/javadoc/jdbc4/org/apache/derby/tools/dblook.html 0000644 0415062 0001750 00000047623 10723243314 024362 0 ustar lh136778 clustra
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.tools.dblook
public final class dblook
Constructor Summary | |
---|---|
dblook(java.lang.String[] args)
|
Method Summary | |
---|---|
static java.lang.String |
addQuotes(java.lang.String name)
|
static java.lang.String |
addSingleQuotes(java.lang.String name)
|
static java.lang.String |
expandDoubleQuotes(java.lang.String name)
|
static java.lang.String |
getColNameFromNumber(java.lang.String tableId,
int colNum)
|
static java.lang.String |
getColumnListFromDescription(java.lang.String tableId,
java.lang.String description)
|
static boolean |
isExcludedTable(java.lang.String tableName)
|
static boolean |
isIgnorableSchema(java.lang.String schemaName)
|
static java.lang.String |
lookupMessage(java.lang.String key)
|
static java.lang.String |
lookupMessage(java.lang.String key,
java.lang.String[] vals)
|
static java.lang.String |
lookupSchemaId(java.lang.String schemaId)
|
static java.lang.String |
lookupTableId(java.lang.String tableId)
|
static void |
main(java.lang.String[] args)
|
static java.lang.String |
removeNewlines(java.lang.String str)
|
static boolean |
stringContainsTargetTable(java.lang.String str)
|
static java.lang.String |
stripQuotes(java.lang.String quotedName)
|
static void |
writeVerboseOutput(java.lang.String key,
java.lang.String value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public dblook(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public static void main(java.lang.String[] args)
public static java.lang.String getColumnListFromDescription(java.lang.String tableId, java.lang.String description) throws java.sql.SQLException
java.sql.SQLException
public static java.lang.String getColNameFromNumber(java.lang.String tableId, int colNum) throws java.sql.SQLException
java.sql.SQLException
public static java.lang.String addQuotes(java.lang.String name)
public static java.lang.String addSingleQuotes(java.lang.String name)
public static java.lang.String stripQuotes(java.lang.String quotedName)
public static boolean isExcludedTable(java.lang.String tableName)
public static boolean isIgnorableSchema(java.lang.String schemaName)
public static boolean stringContainsTargetTable(java.lang.String str)
public static java.lang.String expandDoubleQuotes(java.lang.String name)
public static java.lang.String lookupSchemaId(java.lang.String schemaId)
public static java.lang.String lookupTableId(java.lang.String tableId)
public static void writeVerboseOutput(java.lang.String key, java.lang.String value)
public static java.lang.String lookupMessage(java.lang.String key)
public static java.lang.String lookupMessage(java.lang.String key, java.lang.String[] vals)
public static java.lang.String removeNewlines(java.lang.String str)
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.tools.sysinfo
public class sysinfo
This class displays system information to system out. To run from the command-line, enter the following:
java org.apache.derby.tools.sysinfo
Also available on this class are methods which allow you to determine the version of the code for the system without actually booting a database. Please note that this is the Derby version of the .jar files, not of your databases.
The numbering scheme for released Derby products is m1.m2.m3
where m1
is the major release version, m2
is the minor release version,
and m3
is the maintenance level. Versions of the product with the same
major and minor version numbers are considered feature compatible.
Valid major and minor versions are always greater than zero. Valid maintenance versions are greater than or equal to zero.
Field Summary | |
---|---|
static java.lang.String |
CLIENT
The genus name for the client code. |
static java.lang.String |
DBMS
The genus name for the Apache Derby code. |
static java.lang.String |
NET
The genus name for the network server code. |
static java.lang.String |
TOOLS
The genus name for the tools code. |
Method Summary | |
---|---|
static java.lang.String |
getBuildNumber()
gets the build number for the Apache Derby embedded library |
static java.lang.String |
getBuildNumber(java.lang.String genus)
gets the build number for the specified library |
static void |
getInfo(java.io.PrintWriter out)
|
static int |
getMajorVersion()
gets the major version of the Apache Derby embedded code. |
static int |
getMajorVersion(java.lang.String genus)
gets the major version of the specified code library. |
static int |
getMinorVersion()
gets the minor version of the Apache Derby embedded code. |
static int |
getMinorVersion(java.lang.String genus)
gets the minor version of the specified code library. |
static java.lang.String |
getProductName()
gets the product name for the Apache Derby embedded library |
static java.lang.String |
getProductName(java.lang.String genus)
gets the external name for the specified code library. |
static java.lang.String |
getVersionString()
Return the version information string for the specified library including alpha or beta indicators. |
static java.lang.String |
getVersionString(java.lang.String genus)
Return the version information string for the Apache Derby embedded library including alpha or beta indicators. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DBMS
public static final java.lang.String TOOLS
public static final java.lang.String NET
public static final java.lang.String CLIENT
Method Detail |
---|
public static void main(java.lang.String[] args)
public static int getMajorVersion()
public static int getMajorVersion(java.lang.String genus)
genus
- which library to get the version of. Valid inputs include
DBMS, TOOLS, NET, CLIENT
public static int getMinorVersion()
public static int getMinorVersion(java.lang.String genus)
genus
- which library to get the version of. Valid inputs include
DBMS, TOOLS, NET, CLIENT.
public static java.lang.String getBuildNumber()
public static java.lang.String getBuildNumber(java.lang.String genus)
genus
- which library to get the build number for. Valid inputs are
DBMS, TOOLS, NET, CLIENT.
public static java.lang.String getProductName()
public static java.lang.String getProductName(java.lang.String genus)
genus
- which library to get the name for
public static java.lang.String getVersionString()
public static java.lang.String getVersionString(java.lang.String genus)
public static void getInfo(java.io.PrintWriter out)
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
Class Summary | |
---|---|
dblook | |
ij | ij is Derby's interactive JDBC scripting tool. |
sysinfo | This class displays system information to system out. |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.tools.ij
public class ij
ij is Derby's interactive JDBC scripting tool. It is a simple utility for running scripts against a Derby database. You can also use it interactively to run ad hoc queries. ij provides several commands for ease in accessing a variety of JDBC features.
To run from the command line enter the following:
java [options] org.apache.derby.tools.ij [arguments]
ij is can also be used with any database server that supports a JDBC driver.
Method Summary | |
---|---|
static java.lang.String |
getArg(java.lang.String param,
java.lang.String[] args)
|
static void |
getPropertyArg(java.lang.String[] args)
|
static void |
main(java.lang.String[] args)
|
static int |
runScript(java.sql.Connection conn,
java.io.InputStream sqlIn,
java.lang.String inputEncoding,
java.io.OutputStream sqlOut,
java.lang.String outputEncoding)
Run a SQL script from an InputStream and write the resulting output to the provided PrintStream. |
static java.sql.Connection |
startJBMS()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
- thrown if cannot access input or output files.public static int runScript(java.sql.Connection conn, java.io.InputStream sqlIn, java.lang.String inputEncoding, java.io.OutputStream sqlOut, java.lang.String outputEncoding) throws java.io.UnsupportedEncodingException
conn
- Connection to be used as the script's default connection.sqlIn
- InputStream for the script.inputEncoding
- Encoding of the script.sqlOut
- OutputStream for the script's outputoutputEncoding
- Output encoding to use.
java.io.UnsupportedEncodingException
public static java.lang.String getArg(java.lang.String param, java.lang.String[] args)
public static void getPropertyArg(java.lang.String[] args) throws java.io.IOException
java.io.IOException
public static java.sql.Connection startJBMS() throws java.sql.SQLException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException, java.lang.InstantiationException
java.sql.SQLException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
java.lang.InstantiationException
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
Classes
dblook ij sysinfo |
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
Interface Summary | |
---|---|
UserAuthenticator | The UserAuthenticator interface provides operations to authenticate a user's credentials in order to successfully connect to a database. |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserAuthenticator
The UserAuthenticator interface provides operations to authenticate a user's credentials in order to successfully connect to a database. Any user authentication schemes could be implemented using this interface and registered at start-up time.
If an application requires its own authentication scheme, then it can implement this interface and register as the authentication scheme that Derby should call upon connection requests to the system. See the dcoumentation for the property derby.authentication.provider
A typical example would be to implement user authentication using LDAP, Sun NIS+, or even Windows User Domain, using this interface.
Note: Additional connection attributes can be specified on the database connection URL and/or Properties object on jdbc connection. Values for these attributes can be retrieved at runtime by the (specialized) authentication scheme to further help user authentication, if one needs additional info other than user, password, and database name.
Method Summary | |
---|---|
boolean |
authenticateUser(java.lang.String userName,
java.lang.String userPassword,
java.lang.String databaseName,
java.util.Properties info)
Authenticate a user's credentials. |
Method Detail |
---|
boolean authenticateUser(java.lang.String userName, java.lang.String userPassword, java.lang.String databaseName, java.util.Properties info) throws java.sql.SQLException
jdbc:derby:testdb;user=Fred;password=ScT7dmM2
then the userName will be Fred and within the Derby user authorization
system, Fred becomes a case-insensitive authorization identifier and
is known as FRED
jdbc:derby:testdb;user="Fred";password=ScT7dmM2
then the userName will be "Fred" and within the Derby user authorization
system, Fred becomes a case-sensitive authorization identifier and is
known as Fred
userName
- The user's name for the connection request. May be
null. The user name is passed in as is from the
connection request.
Derby will pass in the user name that is set on
connection request as is, without changing the
casing and without removing the delimiter quotes
if any.userPassword
- The user's password for the connection request.
May be null.databaseName
- The database that the user wants to connect to.
Will be null if this is system level authentication.info
- A Properties object that contains additional
connection information, that can help to
authenticate the user. It has properties of the
'info' object passed as part of
DriverManager.getConnection() call and any
attributes set on the JDBC URL.
java.sql.SQLException
- An exception processing the request,
connection request will be denied. The SQL exception will
be returned to the connection attempt.
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interfaces
UserAuthenticator |
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
Class Summary | |
---|---|
NetServlet | This servlet can be used to start Derby Network Server from a remote location. |
NetworkServerControl | NetworkServerControl provides the ability to start a Network Server or connect to a running Network Server to shutdown, configure or retreive diagnostic information. |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.derby.drda.NetServlet
public class NetServlet
This servlet can be used to start Derby Network Server from a remote location.
These servlet configuration parameters are understood by this servlet.
portNumber- Port number to use. The default is 1527.
startNetworkServerOnInit- Starts the Derby Network Server at servlet initialization if 'true'.
tracingDirectory- Directory for trace files
Constructor Summary | |
---|---|
NetServlet()
|
Method Summary | |
---|---|
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get the form of NetServlet. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get the form of NetServlet. |
java.lang.String |
getHtmlLabelledMessageInstance(org.apache.derby.iapi.tools.i18n.LocalizedResource localUtil,
java.lang.String key,
java.lang.String id)
get an HTML labelled message from the resource bundle file, according to the given key. |
void |
init(javax.servlet.ServletConfig config)
Initialize the servlet. |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NetServlet()
Method Detail |
---|
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
portNumber- Port number
host- Host name
traceDirectory- location of trace directory
startNetworkServerOnInit- start the server on initialization
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
public java.lang.String getHtmlLabelledMessageInstance(org.apache.derby.iapi.tools.i18n.LocalizedResource localUtil, java.lang.String key, java.lang.String id)
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.drda.NetworkServerControl
public class NetworkServerControl
NetworkServerControl provides the ability to start a Network Server or connect to a running Network Server to shutdown, configure or retreive diagnostic information. With the exception of ping, these commands can only be performed from the machine on which the server is running. Commands can be performed from the command line with the following arguments:
Properties can be set in the derby.properties file or on the command line. Properties on the command line take precedence over properties in the derby.properties file. Arguments on the command line take precedence over properties. The following is a list of properties that can be set for NetworkServerControl:
Examples.
This is an example of shutting down the server on port 1621.
java org.apache.derby.drda.NetworkServerControl shutdown -p 1621
This is an example of turning tracing on for session 3
java org.apache.derby.drda.NetworkServerControl trace on -s 3
This is an example of starting and then shutting down the network server on port 1621 on machine myhost
java org.apache.derby.drda.NetworkServerControl start -h myhost -p 1621 java org.apache.derby.drda.NetworkServerControl shutdown -h myhost -p 1621
This is an example of starting and shutting down the Network Server in the example above with the API.
NetworkServerControl serverControl = new NetworkServerControl(InetAddress.getByName("myhost"),1621) serverControl.shutdown();
Field Summary | |
---|---|
static int |
DEFAULT_PORTNUMBER
|
Constructor Summary | |
---|---|
NetworkServerControl()
Creates a NetworkServerControl object that is configured to control a Network Server on the default host(localhost) and the default port(1527) unless derby.drda.portNumber and derby.drda.host are set. |
|
NetworkServerControl(java.net.InetAddress address,
int portNumber)
Creates a NetworkServerControl object that is configured to control a Network Server on a specified port and InetAddress. |
Method Summary | |
---|---|
java.util.Properties |
getCurrentProperties()
Get current Network server properties |
int |
getMaxThreads()
Returns the current maxThreads setting for the running Network Server |
java.lang.String |
getRuntimeInfo()
Return detailed session runtime information about sessions, prepared statements, and memory usage for the running Network Server. |
java.lang.String |
getSysinfo()
Return classpath and version information about the running Network Server. |
int |
getTimeSlice()
Return the current timeSlice setting for the running Network Server |
void |
logConnections(boolean on)
Turn logging connections on or off. |
static void |
main(java.lang.String[] args)
main routine for NetworkServerControl |
void |
ping()
Check if Network Server is started Excecutes and returns without error if the server has started |
protected void |
setClientLocale(java.lang.String locale)
set the client locale. |
void |
setMaxThreads(int max)
Set Network Server maxthread parameter. |
void |
setTimeSlice(int timeslice)
Set Network Server connection time slice parameter. |
void |
setTraceDirectory(java.lang.String traceDirectory)
Set directory for trace files. |
void |
shutdown()
Shutdown a Network Server. |
void |
start(java.io.PrintWriter consoleWriter)
Start a Network Server This method will launch a separate thread and start Network Server. |
void |
trace(boolean on)
Turn tracing on or off for the specified connection on the Network Server. |
void |
trace(int connNum,
boolean on)
Turn tracing on or off for all connections on the Network Server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_PORTNUMBER
Constructor Detail |
---|
public NetworkServerControl(java.net.InetAddress address, int portNumber) throws java.lang.Exception
Examples:
To configure for port 1621 and listen on the loopback address:
NetworkServerControl util = new NetworkServerControl(InetAddress.getByName("localhost"), 1621);
address
- The IP address of the Network Server host.
address cannot be null.portNumber
- port number server is to used. If <= 0,
default port number is used
java.lang.Exception
- on errorpublic NetworkServerControl() throws java.lang.Exception
new NetworkServerControl() is equivalent to calling new NetworkServerControl(InetAddress.getByName("localhost"),1527);
java.lang.Exception
- on errorMethod Detail |
---|
public static void main(java.lang.String[] args)
args
- array of arguments indicating command to be executed.
See class comments for more informationpublic void start(java.io.PrintWriter consoleWriter) throws java.lang.Exception
Note: an alternate method to starting the Network Server with the API, is to use the derby.drda.startNetworkServer property in derby.properties.
consoleWriter
- PrintWriter to which server console will be
output. Null will disable console output.
java.lang.Exception
- if there is an error starting the server.shutdown()
public void shutdown() throws java.lang.Exception
java.lang.Exception
- throws an exception if an error occurspublic void ping() throws java.lang.Exception
java.lang.Exception
- throws an exception if an error occurspublic void trace(boolean on) throws java.lang.Exception
on
- true to turn tracing on, false to turn tracing off.
java.lang.Exception
- throws an exception if an error occurspublic void trace(int connNum, boolean on) throws java.lang.Exception
connNum
- connection number. Note: Connection numbers will print
in the Derby error log if logConnections is onon
- true to turn tracing on, false to turn tracing off.
java.lang.Exception
- throws an exception if an error occurspublic void logConnections(boolean on) throws java.lang.Exception
on
- true to turn on, false to turn off
java.lang.Exception
- throws an exception if an error occurspublic void setTraceDirectory(java.lang.String traceDirectory) throws java.lang.Exception
traceDirectory
- directory for trace files on machine
where server is running
java.lang.Exception
- throws an exception if an error occurspublic java.lang.String getSysinfo() throws java.lang.Exception
java.lang.Exception
- throws an exception if an error occurspublic java.lang.String getRuntimeInfo() throws java.lang.Exception
java.lang.Exception
- throws an exception if an error occurspublic void setMaxThreads(int max) throws java.lang.Exception
max
- maximum number of connection threads.
If <= 0, connection threads will be created when
there are no free connection threads.
java.lang.Exception
- throws an exception if an error occurssetTimeSlice(int)
public int getMaxThreads() throws java.lang.Exception
java.lang.Exception
- throws an exception if an error occurssetMaxThreads(int)
public void setTimeSlice(int timeslice) throws java.lang.Exception
timeslice
- number of milliseconds given to each session before yielding to
another session, if <=0, never yield.
java.lang.Exception
- throws an exception if an error occurssetMaxThreads(int)
public int getTimeSlice() throws java.lang.Exception
java.lang.Exception
- throws an exception if an error occurssetTimeSlice(int)
public java.util.Properties getCurrentProperties() throws java.lang.Exception
java.lang.Exception
- throws an exception if an error occursprotected void setClientLocale(java.lang.String locale)
locale
- Locale to use
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Classes
NetServlet NetworkServerControl |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.ReferenceableDataSource
org.apache.derby.jdbc.EmbeddedDataSource
org.apache.derby.jdbc.EmbeddedXADataSource
org.apache.derby.jdbc.EmbeddedXADataSource40
public class EmbeddedXADataSource40
EmbeddedXADataSource40 is Derby's XADataSource implementation for JDBC4.0.
An XADataSource is a factory for XAConnection objects. It represents a RM in a DTP environment. An object that implements the XADataSource interface is typically registered with a JNDI service provider.
EmbeddedXADataSource40 supports the JDBC 4.0 specification for the J2SE 6.0 Java Virtual Machine environment. Use EmbeddedXADataSource if your application runs in the following environments:
EmbeddedXADataSource40 object only works on a local database. There is no client/server support. An EmbeddedXADataSource40 object must live in the same jvm as the database.
EmbeddedXADataSource40 is serializable and referenceable.
See EmbeddedDataSource40 for DataSource properties.
Constructor Summary | |
---|---|
EmbeddedXADataSource40()
Creates a new instance of EmbeddedXADataSource40 |
Method Summary | ||
---|---|---|
boolean |
isWrapperFor(java.lang.Class<?> interfaces)
Returns false unless interfaces is implemented |
|
|
unwrap(java.lang.Class<T> interfaces)
Returns this if this class implements the interface |
Methods inherited from class org.apache.derby.jdbc.EmbeddedXADataSource |
---|
createXAConnection, getXAConnection, getXAConnection |
Methods inherited from class org.apache.derby.jdbc.EmbeddedDataSource |
---|
equals, getAttributesAsPassword, getConnection, getConnection, getConnectionAttributes, getCreateDatabase, getShutdownDatabase, setAttributesAsPassword, setConnectionAttributes, setCreateDatabase, setShutdownDatabase |
Methods inherited from class org.apache.derby.jdbc.ReferenceableDataSource |
---|
getDatabaseName, getDataSourceName, getDescription, getLoginTimeout, getLogWriter, getObjectInstance, getPassword, getReference, getUser, setDatabaseName, setDataSourceName, setDescription, setLoginTimeout, setLogWriter, setPassword, setUser |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sql.CommonDataSource |
---|
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
Constructor Detail |
---|
public EmbeddedXADataSource40()
Method Detail |
---|
public boolean isWrapperFor(java.lang.Class<?> interfaces) throws java.sql.SQLException
interfaces
is implemented
interfaces
- a Class defining an interface.
java.sql.SQLException
- if an error occurs while determining
whether this is a wrapper for an object
with the given interface.public <T> T unwrap(java.lang.Class<T> interfaces) throws java.sql.SQLException
this
if this class implements the interface
interfaces
- a Class defining an interface
java.sql.SQLExption
- if no object if found that implements the
interface
java.sql.SQLException
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.ClientBaseDataSource
org.apache.derby.jdbc.ClientDataSource
org.apache.derby.jdbc.ClientDataSource40
public class ClientDataSource40
ClientDataSource40 is a simple data source implementation that can be used for establishing connections in a non-pooling, non-distributed environment. The class ClientConnectionPoolDataSource40 can be used in a connection pooling environment, and the class ClientXADataSource40 can be used in a distributed, and pooling environment. Use these DataSources if your application runs under JDBC4.0. Use the corresponding ClientDataSource, ClientConnectionPoolDataSource, and ClientXADataSource classes if your application runs in the following environments:
The example below registers a DNC data source object with a JNDI naming service.
org.apache.derby.client.ClientDataSource40 dataSource = new org.apache.derby.client.ClientDataSource40 (); dataSource.setServerName ("my_derby_database_server"); dataSource.setDatabaseName ("my_derby_database_name"); javax.naming.Context context = new javax.naming.InitialContext(); context.bind ("jdbc/my_datasource_name", dataSource);The first line of code in the example creates a data source object. The next two lines initialize the data source's properties. Then a Java object that references the initial JNDI naming context is created by calling the InitialContext() constructor, which is provided by JNDI. System properties (not shown) are used to tell JNDI the service provider to use. The JNDI name space is hierarchical, similar to the directory structure of many file systems. The data source object is bound to a logical JNDI name by calling Context.bind(). In this case the JNDI name identifies a subcontext, "jdbc", of the root naming context and a logical name, "my_datasource_name", within the jdbc subcontext. This is all of the code required to deploy a data source object within JNDI. This example is provided mainly for illustrative purposes. We expect that developers or system administrators will normally use a GUI tool to deploy a data source object. Once a data source has been registered with JNDI, it can then be used by a JDBC application, as is shown in the following example.
javax.naming.Context context = new javax.naming.InitialContext (); javax.sql.DataSource dataSource = (javax.sql.DataSource) context.lookup ("jdbc/my_datasource_name"); java.sql.Connection connection = dataSource.getConnection ("user", "password");The first line in the example creates a Java object that references the initial JNDI naming context. Next, the initial naming context is used to do a lookup operation using the logical name of the data source. The Context.lookup() method returns a reference to a Java Object, which is narrowed to a javax.sql.DataSource object. In the last line, the DataSource.getConnection() method is called to produce a database connection. This simple data source subclass of ClientBaseDataSource maintains it's own private
password
property.
The specified password, along with the user, is validated by DERBY.
This property can be overwritten by specifing
the password parameter on the DataSource.getConnection() method call.
This password property is not declared transient, and therefore
may be serialized to a file in clear-text, or stored
to a JNDI server in clear-text when the data source is saved.
Care must taken by the user to prevent security
breaches.
Field Summary |
---|
Fields inherited from class org.apache.derby.jdbc.ClientDataSource |
---|
className__ |
Constructor Summary | |
---|---|
ClientDataSource40()
|
Method Summary | ||
---|---|---|
boolean |
isWrapperFor(java.lang.Class<?> interfaces)
Returns false unless interfaces is implemented |
|
|
unwrap(java.lang.Class<T> interfaces)
Returns this if this class implements the interface |
Methods inherited from class org.apache.derby.jdbc.ClientDataSource |
---|
getConnection, getConnection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sql.CommonDataSource |
---|
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
Constructor Detail |
---|
public ClientDataSource40()
Method Detail |
---|
public boolean isWrapperFor(java.lang.Class<?> interfaces) throws java.sql.SQLException
interfaces
is implemented
interfaces
- a Class defining an interface.
java.sql.SQLException
- if an error occurs while determining
whether this is a wrapper for an object
with the given interface.public <T> T unwrap(java.lang.Class<T> interfaces) throws java.sql.SQLException
this
if this class implements the interface
interfaces
- a Class defining an interface
java.sql.SQLExption
- if no object if found that implements the
interface
java.sql.SQLException
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.ClientBaseDataSource
public abstract class ClientBaseDataSource
Base class for client-side DataSource implementations.
Method Summary | |
---|---|
static org.apache.derby.client.am.LogWriter |
computeDncLogWriter(org.apache.derby.client.am.Connection connection,
java.io.PrintWriter logWriter,
java.lang.String traceDirectory,
java.lang.String traceFile,
boolean traceFileAppend,
java.lang.String logWriterInUseSuffix,
int traceFileSuffixIndex,
int traceLevel)
|
static int |
getClientSSLMode(java.util.Properties properties)
|
java.lang.String |
getConnectionAttributes()
|
java.lang.String |
getCreateDatabase()
|
java.lang.String |
getDatabaseName()
|
java.lang.String |
getDataSourceName()
|
java.lang.String |
getDescription()
|
int |
getLoginTimeout()
|
java.io.PrintWriter |
getLogWriter()
|
java.lang.String |
getPassword()
|
static java.lang.String |
getPassword(java.util.Properties properties)
|
int |
getPortNumber()
|
javax.naming.Reference |
getReference()
|
boolean |
getRetrieveMessageText()
|
static boolean |
getRetrieveMessageText(java.util.Properties properties)
|
short |
getSecurityMechanism()
Return the security mechanism. |
static short |
getSecurityMechanism(java.util.Properties properties)
Return security mechanism if it is set, else upgrade the security mechanism if possible and return the upgraded security mechanism |
short |
getSecurityMechanism(java.lang.String password)
Return the security mechanism for this datasource object. |
java.lang.String |
getServerName()
|
java.lang.String |
getShutdownDatabase()
|
java.lang.String |
getSsl()
|
static int |
getSSLModeFromString(java.lang.String s)
|
java.lang.String |
getTraceDirectory()
|
static java.lang.String |
getTraceDirectory(java.util.Properties properties)
Check if derby.client.traceDirectory is provided as a JVM property. |
java.lang.String |
getTraceFile()
|
static java.lang.String |
getTraceFile(java.util.Properties properties)
|
boolean |
getTraceFileAppend()
|
static boolean |
getTraceFileAppend(java.util.Properties properties)
|
int |
getTraceLevel()
|
static int |
getTraceLevel(java.util.Properties properties)
Check if derby.client.traceLevel is provided as a JVM property. |
static short |
getUpgradedSecurityMechanism(java.lang.String password)
This method has logic to upgrade security mechanism to a better (more secure) one if it is possible. |
java.lang.String |
getUser()
|
static java.lang.String |
getUser(java.util.Properties properties)
|
void |
setConnectionAttributes(java.lang.String prop)
Set this property to pass in more Derby specific connection URL attributes. |
void |
setCreateDatabase(java.lang.String create)
Set this property to create a new database. |
void |
setDatabaseName(java.lang.String databaseName)
|
void |
setDataSourceName(java.lang.String dataSourceName)
|
void |
setDescription(java.lang.String description)
|
void |
setLoginTimeout(int seconds)
|
void |
setLogWriter(java.io.PrintWriter logWriter)
|
void |
setPassword(java.lang.String password)
|
void |
setPortNumber(int portNumber)
|
void |
setRetrieveMessageText(boolean retrieveMessageText)
|
void |
setSecurityMechanism(short securityMechanism)
Sets the security mechanism. |
void |
setServerName(java.lang.String serverName)
|
void |
setShutdownDatabase(java.lang.String shutdown)
Set this property if one wishes to shutdown the database identified by databaseName. |
void |
setSsl(int mode)
|
void |
setSsl(java.lang.String mode)
|
void |
setTraceDirectory(java.lang.String traceDirectory)
|
void |
setTraceFile(java.lang.String traceFile)
|
void |
setTraceFileAppend(boolean traceFileAppend)
|
void |
setTraceLevel(int traceLevel)
|
void |
setUser(java.lang.String user)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int propertyDefault_portNumber
public static final java.lang.String propertyDefault_serverName
public static final int SSL_OFF
public static final int SSL_BASIC
public static final int SSL_PEER_AUTHENTICATION
public static final java.lang.String propertyDefault_user
protected short securityMechanism
public static final short propertyDefault_securityMechanism
public static final boolean propertyDefault_retrieveMessageText
public static final boolean propertyDefault_traceFileAppend
public static final short USER_ONLY_SECURITY
public static final short CLEAR_TEXT_PASSWORD_SECURITY
public static final short ENCRYPTED_PASSWORD_SECURITY
public static final short ENCRYPTED_USER_AND_PASSWORD_SECURITY
public static final short STRONG_PASSWORD_SUBSTITUTE_SECURITY
protected java.lang.String connectionAttributes
public static final int TRACE_NONE
public static final int TRACE_CONNECTION_CALLS
public static final int TRACE_STATEMENT_CALLS
public static final int TRACE_RESULT_SET_CALLS
public static final int TRACE_DRIVER_CONFIGURATION
public static final int TRACE_CONNECTS
public static final int TRACE_PROTOCOL_FLOWS
public static final int TRACE_RESULT_SET_META_DATA
public static final int TRACE_PARAMETER_META_DATA
public static final int TRACE_DIAGNOSTICS
public static final int TRACE_XA_CALLS
public static final int TRACE_ALL
public static final int propertyDefault_traceLevel
protected int traceLevel
Method Detail |
---|
public void setLoginTimeout(int seconds)
public int getLoginTimeout()
public void setLogWriter(java.io.PrintWriter logWriter)
public java.io.PrintWriter getLogWriter()
public static final int getSSLModeFromString(java.lang.String s) throws org.apache.derby.client.am.SqlException
org.apache.derby.client.am.SqlException
public static final int getClientSSLMode(java.util.Properties properties) throws org.apache.derby.client.am.SqlException
org.apache.derby.client.am.SqlException
public static java.lang.String getUser(java.util.Properties properties)
public static short getSecurityMechanism(java.util.Properties properties)
properties
- Look in the properties if securityMechanism is set or not
if set, return this security mechanism
public static short getUpgradedSecurityMechanism(java.lang.String password)
password
- password argument
public static boolean getRetrieveMessageText(java.util.Properties properties)
public static java.lang.String getTraceFile(java.util.Properties properties)
public static java.lang.String getTraceDirectory(java.util.Properties properties)
properties
- jdbc url properties
public static boolean getTraceFileAppend(java.util.Properties properties)
public static java.lang.String getPassword(java.util.Properties properties)
public final void setPassword(java.lang.String password)
public final java.lang.String getPassword()
public javax.naming.Reference getReference() throws javax.naming.NamingException
getReference
in interface javax.naming.Referenceable
javax.naming.NamingException
public static org.apache.derby.client.am.LogWriter computeDncLogWriter(org.apache.derby.client.am.Connection connection, java.io.PrintWriter logWriter, java.lang.String traceDirectory, java.lang.String traceFile, boolean traceFileAppend, java.lang.String logWriterInUseSuffix, int traceFileSuffixIndex, int traceLevel) throws org.apache.derby.client.am.SqlException
org.apache.derby.client.am.SqlException
public void setDatabaseName(java.lang.String databaseName)
public java.lang.String getDatabaseName()
public void setDataSourceName(java.lang.String dataSourceName)
public java.lang.String getDataSourceName()
public void setDescription(java.lang.String description)
public java.lang.String getDescription()
public void setPortNumber(int portNumber)
public int getPortNumber()
public void setServerName(java.lang.String serverName)
public java.lang.String getServerName()
public void setUser(java.lang.String user)
public java.lang.String getUser()
public void setRetrieveMessageText(boolean retrieveMessageText)
public boolean getRetrieveMessageText()
public void setSecurityMechanism(short securityMechanism)
securityMechanism
- to setpublic short getSecurityMechanism()
getUpgradedSecurityMechanism(String)
public short getSecurityMechanism(java.lang.String password)
password
- password of user
getUpgradedSecurityMechanism(String)
public void setSsl(java.lang.String mode) throws org.apache.derby.client.am.SqlException
org.apache.derby.client.am.SqlException
public void setSsl(int mode)
public java.lang.String getSsl()
public final void setCreateDatabase(java.lang.String create)
create
- if set to the string "create", this data source will try
to create a new database of databaseName, or boot the
database if one by that name already exists.public final java.lang.String getCreateDatabase()
public final void setShutdownDatabase(java.lang.String shutdown)
shutdown
- if set to the string "shutdown", this data source will
shutdown the database if it is running.public final java.lang.String getShutdownDatabase()
public final void setConnectionAttributes(java.lang.String prop)
prop
- set to the list of Derby connection attributes separated by semi-colons. E.g., to specify an
encryption bootPassword of "x8hhk2adf", and set upgrade to true, do the following: ds.setConnectionAttributes("bootPassword=x8hhk2adf;upgrade=true");See Derby documentation for complete list.
public final java.lang.String getConnectionAttributes()
public static int getTraceLevel(java.util.Properties properties)
properties
- jdbc url properties
public void setTraceLevel(int traceLevel)
public int getTraceLevel()
public void setTraceFile(java.lang.String traceFile)
public java.lang.String getTraceFile()
public void setTraceDirectory(java.lang.String traceDirectory)
public java.lang.String getTraceDirectory()
public void setTraceFileAppend(boolean traceFileAppend)
public boolean getTraceFileAppend()
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.ClientBaseDataSource
org.apache.derby.jdbc.ClientDataSource
org.apache.derby.jdbc.ClientXADataSource
org.apache.derby.jdbc.ClientXADataSource40
public class ClientXADataSource40
This is Derby's network XADataSource for use with JDBC4.0.
An XADataSource is a factory for XAConnection objects. It represents a RM in a DTP environment. An object that implements the XADataSource interface is typically registered with a JNDI service provider.ClientXADataSource40 supports the JDBC 4.0 specification for the J2SE 6.0 Java Virtual Machine environment. Use ClientXADataSource if your application runs in the following environments:
ClientXADataSource40 is serializable and referenceable.
See ClientDataSource40 for DataSource properties.
Field Summary |
---|
Fields inherited from class org.apache.derby.jdbc.ClientXADataSource |
---|
className__ |
Constructor Summary | |
---|---|
ClientXADataSource40()
|
Method Summary | ||
---|---|---|
boolean |
isWrapperFor(java.lang.Class<?> interfaces)
Returns false unless interfaces is implemented |
|
|
unwrap(java.lang.Class<T> interfaces)
Returns this if this class implements the interface |
Methods inherited from class org.apache.derby.jdbc.ClientXADataSource |
---|
getXAConnection, getXAConnection |
Methods inherited from class org.apache.derby.jdbc.ClientDataSource |
---|
getConnection, getConnection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sql.CommonDataSource |
---|
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
Constructor Detail |
---|
public ClientXADataSource40()
Method Detail |
---|
public boolean isWrapperFor(java.lang.Class<?> interfaces) throws java.sql.SQLException
interfaces
is implemented
interfaces
- a Class defining an interface.
java.sql.SQLException
- if an error occurs while determining
whether this is a wrapper for an object
with the given interface.public <T> T unwrap(java.lang.Class<T> interfaces) throws java.sql.SQLException
this
if this class implements the interface
interfaces
- a Class defining an interface
java.sql.SQLExption
- if no object if found that implements the
interface
java.sql.SQLException
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Class Summary | |
---|---|
ClientBaseDataSource | Base class for client-side DataSource implementations. |
ClientConnectionPoolDataSource40 | ClientConnectionPoolDataSource40 is a factory for PooledConnection objects. |
ClientDataSource40 | ClientDataSource40 is a simple data source implementation that can be used for establishing connections in a non-pooling, non-distributed environment. |
ClientDriver | |
ClientXADataSource40 | This is Derby's network XADataSource for use with JDBC4.0. |
EmbeddedConnectionPoolDataSource40 | EmbeddedConnectionPoolDataSource40 is Derby's ConnectionPoolDataSource implementation for the JDBC4.0 environment. |
EmbeddedDataSource40 | EmbeddedDataSource40 is Derby's DataSource implementation for JDBC4.0. |
EmbeddedDriver | The embedded JDBC driver (Type 4) for Derby. |
EmbeddedXADataSource40 | EmbeddedXADataSource40 is Derby's XADataSource implementation for JDBC4.0. |
Client/Remote driver and data sources, used to connect to the network server
Embedded driver and data sources, used when the database engine is embedded with the application.
Derby's JDBC api is defined by its entry point classes, the drivers and data source implementations
and the standard JDBC api definitions of the java.sql
and javax.sql
classes.
Derby does not provide non-standard extensions to standard JDBC classes such as Connection
,
to encourage portable JDBC applications.
JDBC Implementation notes by JDBC class | ||
java.sql.Blob | java.sql.Clob | java.sql.Connection |
java.sql.PreparedStatement | java.sql.ResultSet | |
JDBC Implementation notes by SQL type | ||
SQL DATE and JDBC | SQL TIME and JDBC | SQL TIMESTAMP and JDBC |
Stream parameter values are not re-used. [JDBC3] says in the last paragraph of 13.2.2 that parameters are re-used but nothing special about streams. However javadoc for java.sql.PreparedStatement.clearParamters() says 'In general, parameter values remain in force for repeated use of a statement'. Maybe 'in general' can be interpreted to mean 'except for streams'. Stream parameter values are not re-used and if a stream is re-used, the statement execution will fail with 'Stream has already been read and end-of-file reached and cannot be re-used.'.
An ASCII character is defined as an eight bit character (range 0x00 to 0xff), see CHAR() function definition by [JDBC3] in appendix C.2.
For character types (Types.CHAR, Types.VARCHAR & Types.LONGVARCHAR), each character in the value is translated to one byte in the ASCII stream:
Derby’s SQL DATE type represents a date in the form yyyy-mm-dd with no associated time zone information.
A JDBC Date (java.sql.Date) by definition represents a point in time on a given date in a given time zone.
[JDBC3] intends that the point in time for a java.sql.Date object is 00:00 (midnight), but this is not enforced by the class.
JDBC drivers are required to return java.sql.Date objects that are normalized to 00:00 according to the required time zone.
Applications are expected to pass in java.sql.Date instances that are normalized to 00:00 (see section 18.1.1 of [TUTORIAL3]).
setDate() without a Calendar object or passing null for a Calendar object:
The yyyy-mm-dd values will be calculated from the milli-seconds value of the java.sql.Date instance using a Calendar object set to the time zone of the virtual machine.
This yyyy-mm-dd value will match the output of java.sql.Date.toString().
setDate() with a Calendar object:
The yyyy-mm-dd values will be calculated from the milliseconds value of the java.sql.Date instance using the passed in Calendar.
The code for this is
cal.setTimeInMillis(value.getTime());
yyyy = cal.get(Calendar.YEAR);
mm = cal.get(Calendar.MONTH) + 1;
dd = cal.get(Calendar.DAY_OF_MONTH);
This yyyy-mm-dd value may not match the output of java.sql.Date.toString() for the value, since this method always uses the time zone of the virtual machine.
Derby does not require that the application’s java.sql.Date value is normalized to 00:00 according to the required time zone.
In both cases no time zone information is stored with the SQL DATE value.
getDate() without a Calendar object or passing null for a Calendar object:
A java.sql.Date instance is returned with a millisecond value corresponding to 00:00 on yyyy-mm-dd according to the time zone of the java virtual machine
The toString() method of the returned value will return ‘yyyy-mm-dd’
getDate() with a Calendar object:
A java.sql.Date instance is returned with a millisecond value corresponding to 00:00 on yyyy-mm-dd according to the time zone of the Calendar
The toString() method of the returned value may not return ‘yyyy-mm-dd’, since this method always uses the time zone of the virtual machine.
Three different date formats are built into Derby.
(ISO/JIS) yyyy-mm-dd e.g. “1980-03-21”,
(IBM USA) mm/dd/yyyy e.g. “03/21/1980”, and
(IBM European) dd.mm.yyyy e.g. “21.03.1980”.
If the format of the string matches one of the built in formats then a conversion to a java.sql.Date matches that of a SQL DATE value with value yyyy-mm-dd.
If the string does not match any of the built in formats Derby attempts to use the Java locale specific parser to interpret the string as a date.
Derby’s SQL TIME type represents a time of day in the form hh:mm:ss with no associated time zone information.
A JDBC Time (java.sql.Time) by definition represents a point in time on an unspecified day in a given time zone.
Java.sql.Time extends java.util.date, so it includes a date. [JDBC3] intends that the date stored in a java.sql.Time be Jan 1 1970, but this is not enforced by the class.
JDBC drivers are required to return java.sql.Time objects that are normalized to Jan. 1 1970 according to the required time zone.
Applications are expected to pass in java.sql.Time instances that are normalized to Jan. 1 1970.
setTime() without a Calendar object or passing null for a Calendar object
The hh:mm:ss values will be calculated from the milli-seconds value of the java.sql.Time instance using a Calendar object set to the time zone of the virtual machine.
This hh:mm:ss value will match the output of java.sql.Date.toString().
setTime() with a Calendar object
The hh:mm:ss values will be calculated from the milliseconds value of the java.sql.Date instance using the passed in Calendar.
The code for this is
cal.setTimeInMillis(value.getTime());
hh = cal.get(Calendar.HOUR);
mm = cal.get(Calendar.MINUTE);
ss = cal.get(Calendar.SECOND);
This hh:mm:dd value may not match the output of java.sql.Date.toString() for the value, since this method always uses the time zone of the virtual machine.
Derby does not require that the application’s java.sql.Time value be normalized to Jan 1 1970 according to the required time zone.
In both cases no time zone information is stored with the SQL TIME value.
getTime() without a Calendar object or passing null for a Calendar object
A java.sql.Time instance is returned with a millisecond value corresponding to hh:mm:ss on Jan. 1 1970 according to the time zone of the java virtual machine
The toString() method of the returned value will return ‘hh:mm:ss’.
getTime() with a Calendar object
A java.sql.Time instance is returned with a millisecond value corresponding to hh:mm:ss on Jan. 1 1970 according to the time zone of the Calendar
The toString() method of the returned value may not return ‘hh:mm:ss’, since this method always uses the time zone of the virtual machine.
Three different time formats are built into Derby:
(ISO/EUR) hh.mm.ss e.g. “13.52.03”,
(IBM USA) hh:mm [AM|PM] e.g. “1:52 PM”, and
(JIS) hh:mm:ss e.g. “13:52:03”.
If the format of the string matches one of the built in formats then a conversion to a java.sql.Time matches that of a SQL TIME value with value hh:mm:ss.
If the string does not match any of the built in formats Derby attempts to use the Java locale specific parser to interpret the string as a date.
Derby’s SQL TIMESTAMP type represents a time of day in the form yyyy-mm-dd hh:mm:ss.fffffffff (nanosecond granularity) with no associated time zone information.
A JDBC Timestamp (java.sql.Timestamp) by definition represents a point in time, with nanosecond resolution, in a given time zone.
setTimestamp() without a Calendar object or passing null for a Calendar object
The year, month, day, hour, minute, and second values will be calculated from the milli-seconds value of the java.sql.Timestamp instance using a Calendar object set to the time zone of the virtual machine. The nanosecond value will be calculated from the nanoseconds value of the java.sql.Timestamp.
The timestamp component values will match the output of java.sql.Timestamp.toString().
setTime() with a Calendar object
The year, month, day, hour, minute, and second values will be calculated from the milliseconds value of the java.sql.Date instance using the passed in Calendar. The nanosecond value will be calculated from the nanoseconds value of the java.sql.Timestamp.
The code for this is
cal.setTimeInMillis(value.getTime());
year = cal.get(Calendar.YEAR);
month = cal.get(Calendar.MONTH) + 1;
day = cal.get(Calendar.DAY_OF_MONTH);
hour = cal.get(Calendar.HOUR);
minute = cal.get(Calendar.MINUTE);
second = cal.get(Calendar.SECOND);
nanos = value.getNanos();
This stored timestamp component value may not match the output of java.sql.Timestamp.toString() for the value, since this method always uses the time zone of the virtual machine.
getTimestamp() without a Calendar object or passing null for a Calendar object
A java.sql.Timestamp instance is returned with a nanosecond value corresponding to yyyy-mm-dd hh:mm:ss.fffffffff according to the time zone of the java virtual machine
The toString() method of the returned value will return ‘yyyy-mm-dd hh:mm:ss.fffffffff’.
getTime() with a Calendar object
A java.sql.Time instance is returned with a nanosecond value corresponding to yyyy-mm-dd hh:mm:ss.fffffffff according to the time zone of the Calendar
The toString() method of the returned value may not return ‘yyyy-mm-dd hh:mm:ss.fffffffff’, since this method always uses the time zone of the virtual machine.
Two different timestamp formats are built into Derby:
(ISO) yyyy-mm-dd hh:mm:ss[.ffffff]e.g. “1980-10-25 13:01:23.123456”, and
(IBM) yyyy-mm-dd-hh.mm.ss[.ffffff]e.g. “1980-10-25-13.01.23.123456”.
Note that only microsecond resolution is supported in converting strings to timestamps.
If the format of the string matches one of the built in formats then a conversion to a java.sql.Timestamp matches that of a SQL TIMESTAMP value with value yyyy-mm-dd hh:mm:ss.ffffff.
If the string does not match any of the built in formats Derby attempts to use the Java locale specific parser to interpret the string as a date.
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.ReferenceableDataSource
org.apache.derby.jdbc.EmbeddedDataSource
org.apache.derby.jdbc.EmbeddedDataSource40
public class EmbeddedDataSource40
EmbeddedDataSource40 is Derby's DataSource implementation for JDBC4.0.
A DataSource is a factory for Connection objects. An object that implements the DataSource interface will typically be registered with a JNDI service provider.
EmbeddedDataSource40 supports the JDBC 4.0 specification for the J2SE 6.0 Java Virtual Machine environment. Use EmbeddedDataSource if your application is running in one of the following older environments:
The following is a list of properties that can be set on a Derby DataSource object:
Standard DataSource properties (from JDBC 3.0 specification).
databaseName
(String): Mandatory
setDatabaseName("g:/db/wombat")
on the data source object.dataSourceName
(String): Optional
description
(String): Optional
password
(String): Optional
DataSource.getConnection()
,
ConnectionPoolDataSource.getPooledConnection()
and XADataSource.getXAConnection()
methods.
user
(String): Optional
DataSource.getConnection()
,
ConnectionPoolDataSource.getPooledConnection()
and XADataSource.getXAConnection()
methods.
attributesAsPassword
(Boolean): Optional
DataSource.getConnection(String user, String password)
,
ConnectionPoolDataSource.getPooledConnection(String user, String password)
or XADataSource.getXAConnection(String user, String password)
as a set
of connection attributes. The format of the attributes is the same as the format
of the attributes in the property connectionAttributes. If false the password value
is treated normally as the password for the given user.
Setting this property to true allows a connection request from an application to
provide more authentication information that just a password, for example the request
can include the user's password and an encrypted database's boot password.connectionAttributes
(String): Optional
attribute=value
, each separated by semi-colon (';').
E.g. setConnectionAttributes("bootPassword=erd3234dggd3kazkj3000");
.
databaseName
and not by setting the databaseName
connection attribute in the connectionAttributes
property.
createDatabase
(String): Optional
databaseName
if that database does not already
exist. The database is created when a connection object is obtained from
the data source. shutdownDatabase
(String): Optional
Examples.
This is an example of setting a property directly using Derby's EmbeddedDataSource40 object. This code is typically written by a system integrator :
import org.apache.derby.jdbc.*; // dbname is the database name // if create is true, create the database if necessary javax.sql.DataSource makeDataSource (String dbname, boolean create) throws Throwable { EmbeddedDataSource40 ds = new EmbeddedDataSource40(); ds.setDatabaseName(dbname); if (create) ds.setCreateDatabase("create"); return ds; }
Example of setting properties thru reflection. This code is typically generated by tools or written by a system integrator:
javax.sql.DataSource makeDataSource(String dbname) throws Throwable { Class[] parameter = new Class[1]; parameter[0] = dbname.getClass(); DataSource ds = new EmbeddedDataSource40(); Class cl = ds.getClass(); Method setName = cl.getMethod("setDatabaseName", parameter); Object[] arg = new Object[1]; arg[0] = dbname; setName.invoke(ds, arg); return ds; }
Example on how to register a data source object with a JNDI naming service.
DataSource ds = makeDataSource("mydb"); Context ctx = new InitialContext(); ctx.bind("jdbc/MyDB", ds);
Example on how to retrieve a data source object from a JNDI naming service.
Context ctx = new InitialContext(); DataSource ds = (DataSource)ctx.lookup("jdbc/MyDB");
Constructor Summary | |
---|---|
EmbeddedDataSource40()
|
Method Summary | ||
---|---|---|
boolean |
isWrapperFor(java.lang.Class<?> interfaces)
Returns false unless interfaces is implemented |
|
|
unwrap(java.lang.Class<T> interfaces)
Returns this if this class implements the interface |
Methods inherited from class org.apache.derby.jdbc.EmbeddedDataSource |
---|
equals, getAttributesAsPassword, getConnection, getConnection, getConnectionAttributes, getCreateDatabase, getShutdownDatabase, setAttributesAsPassword, setConnectionAttributes, setCreateDatabase, setShutdownDatabase |
Methods inherited from class org.apache.derby.jdbc.ReferenceableDataSource |
---|
getDatabaseName, getDataSourceName, getDescription, getLoginTimeout, getLogWriter, getObjectInstance, getPassword, getReference, getUser, setDatabaseName, setDataSourceName, setDescription, setLoginTimeout, setLogWriter, setPassword, setUser |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sql.CommonDataSource |
---|
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
Constructor Detail |
---|
public EmbeddedDataSource40()
Method Detail |
---|
public boolean isWrapperFor(java.lang.Class<?> interfaces) throws java.sql.SQLException
interfaces
is implemented
interfaces
- a Class defining an interface.
java.sql.SQLException
- if an error occurs while determining
whether this is a wrapper for an object
with the given interface.public <T> T unwrap(java.lang.Class<T> interfaces) throws java.sql.SQLException
this
if this class implements the interface
interfaces
- a Class defining an interface
java.sql.SQLExption
- if no object if found that implements the
interface
java.sql.SQLException
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.ClientDriver
public class ClientDriver
Constructor Summary | |
---|---|
ClientDriver()
|
Method Summary | |
---|---|
boolean |
acceptsURL(java.lang.String url)
|
java.sql.Connection |
connect(java.lang.String url,
java.util.Properties properties)
|
static org.apache.derby.client.am.ClientJDBCObjectFactory |
getFactory()
This method returns an Implementation of ClientJDBCObjectFactory depending on VM under use Currently it returns either ClientJDBCObjectFactoryImpl (or) ClientJDBCObjectFactoryImpl40 |
int |
getMajorVersion()
|
int |
getMinorVersion()
|
java.sql.DriverPropertyInfo[] |
getPropertyInfo(java.lang.String url,
java.util.Properties properties)
|
boolean |
jdbcCompliant()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClientDriver()
Method Detail |
---|
public java.sql.Connection connect(java.lang.String url, java.util.Properties properties) throws java.sql.SQLException
connect
in interface java.sql.Driver
java.sql.SQLException
public boolean acceptsURL(java.lang.String url) throws java.sql.SQLException
acceptsURL
in interface java.sql.Driver
java.sql.SQLException
public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties properties) throws java.sql.SQLException
getPropertyInfo
in interface java.sql.Driver
java.sql.SQLException
public int getMajorVersion()
getMajorVersion
in interface java.sql.Driver
public int getMinorVersion()
getMinorVersion
in interface java.sql.Driver
public boolean jdbcCompliant()
jdbcCompliant
in interface java.sql.Driver
public static org.apache.derby.client.am.ClientJDBCObjectFactory getFactory()
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.ReferenceableDataSource
org.apache.derby.jdbc.EmbeddedDataSource
org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource
org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource40
public class EmbeddedConnectionPoolDataSource40
EmbeddedConnectionPoolDataSource40 is Derby's ConnectionPoolDataSource implementation for the JDBC4.0 environment.
A ConnectionPoolDataSource is a factory for PooledConnection objects. An object that implements this interface will typically be registered with a JNDI service.
EmbeddedConnectionPoolDataSource40 supports the JDBC 4.0 specification for the J2SE 6.0 Java Virtual Machine environment. Use EmbeddedConnectionPoolDataSource if your application runs in the following environments:
EmbeddedConnectionPoolDataSource40 is serializable and referenceable.
See EmbeddedDataSource40 for DataSource properties.
Constructor Summary | |
---|---|
EmbeddedConnectionPoolDataSource40()
|
Method Summary | ||
---|---|---|
boolean |
isWrapperFor(java.lang.Class<?> interfaces)
Returns false unless interfaces is implemented |
|
|
unwrap(java.lang.Class<T> interfaces)
Returns this if this class implements the interface |
Methods inherited from class org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource |
---|
createPooledConnection, getPooledConnection, getPooledConnection |
Methods inherited from class org.apache.derby.jdbc.EmbeddedDataSource |
---|
equals, getAttributesAsPassword, getConnection, getConnection, getConnectionAttributes, getCreateDatabase, getShutdownDatabase, setAttributesAsPassword, setConnectionAttributes, setCreateDatabase, setShutdownDatabase |
Methods inherited from class org.apache.derby.jdbc.ReferenceableDataSource |
---|
getDatabaseName, getDataSourceName, getDescription, getLoginTimeout, getLogWriter, getObjectInstance, getPassword, getReference, getUser, setDatabaseName, setDataSourceName, setDescription, setLoginTimeout, setLogWriter, setPassword, setUser |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sql.ConnectionPoolDataSource |
---|
getPooledConnection, getPooledConnection |
Methods inherited from interface javax.sql.CommonDataSource |
---|
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
Constructor Detail |
---|
public EmbeddedConnectionPoolDataSource40()
Method Detail |
---|
public boolean isWrapperFor(java.lang.Class<?> interfaces) throws java.sql.SQLException
interfaces
is implemented
isWrapperFor
in interface java.sql.Wrapper
interfaces
- a Class defining an interface.
java.sql.SQLException
- if an error occurs while determining
whether this is a wrapper for an object
with the given interface.public <T> T unwrap(java.lang.Class<T> interfaces) throws java.sql.SQLException
this
if this class implements the interface
unwrap
in interface java.sql.Wrapper
interfaces
- a Class defining an interface
java.sql.SQLExption
- if no object if found that implements the
interface
java.sql.SQLException
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.EmbeddedDriver
public class EmbeddedDriver
The embedded JDBC driver (Type 4) for Derby.
The driver automatically supports the correct JDBC specification version for the Java Virtual Machine's environment.
Loading this JDBC driver boots the database engine within the same Java virtual machine.
The correct code to load the Derby engine using this driver is (with approriate try/catch blocks):
Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance(); // or new org.apache.derby.jdbc.EmbeddedDriver();When loaded in this way, the class boots the actual JDBC driver indirectly. The JDBC specification recommends the Class.ForName method without the .newInstance() method call, but adding the newInstance() guarantees that Derby will be booted on any Java Virtual Machine.
Note that you do not need to manually load the driver this way if you are running on Jave SE 6 or later. In that environment, the driver will be automatically loaded for you when your application requests a connection to a Derby database.
Any initial error messages are placed in the PrintStream supplied by the DriverManager. If the PrintStream is null error messages are sent to System.err. Once the Derby engine has set up an error logging facility (by default to derby.log) all subsequent messages are sent to it.
By convention, the class used in the Class.forName() method to boot a JDBC driver implements java.sql.Driver. This class is not the actual JDBC driver that gets registered with the Driver Manager. It proxies requests to the registered Derby JDBC driver.
DriverManager
,
DriverManager.getLogStream()
,
Driver
,
SQLException
Constructor Summary | |
---|---|
EmbeddedDriver()
|
Method Summary | |
---|---|
boolean |
acceptsURL(java.lang.String url)
Accept anything that starts with jdbc:derby: . |
java.sql.Connection |
connect(java.lang.String url,
java.util.Properties info)
Connect to the URL if possible |
int |
getMajorVersion()
Returns the driver's major version number. |
int |
getMinorVersion()
Returns the driver's minor version number. |
java.sql.DriverPropertyInfo[] |
getPropertyInfo(java.lang.String url,
java.util.Properties info)
Returns an array of DriverPropertyInfo objects describing possible properties. |
boolean |
jdbcCompliant()
Report whether the Driver is a genuine JDBC COMPLIANT (tm) driver. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EmbeddedDriver()
Method Detail |
---|
public boolean acceptsURL(java.lang.String url) throws java.sql.SQLException
jdbc:derby:
.
acceptsURL
in interface java.sql.Driver
java.sql.SQLException
- if a database-access error occurs.Driver
public java.sql.Connection connect(java.lang.String url, java.util.Properties info) throws java.sql.SQLException
connect
in interface java.sql.Driver
java.sql.SQLException
- illegal url or problem with connectiongDriver
public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties info) throws java.sql.SQLException
getPropertyInfo
in interface java.sql.Driver
java.sql.SQLException
- if a database-access error occurs.Driver
public int getMajorVersion()
getMajorVersion
in interface java.sql.Driver
Driver
public int getMinorVersion()
getMinorVersion
in interface java.sql.Driver
Driver
public boolean jdbcCompliant()
jdbcCompliant
in interface java.sql.Driver
Driver
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.ClientBaseDataSource
org.apache.derby.jdbc.ClientDataSource
org.apache.derby.jdbc.ClientConnectionPoolDataSource
org.apache.derby.jdbc.ClientConnectionPoolDataSource40
public class ClientConnectionPoolDataSource40
ClientConnectionPoolDataSource40 is a factory for PooledConnection objects. An object that implements this interface will typically be registered with a naming service that is based on the Java Naming and Directory Interface (JNDI). Use this factory if your application runs under JDBC4.0. Use ClientConnectionPoolDataSource, instead, if your application runs under JDBC3.0 or JDBC2.0, that is, on the following Java Virtual Machines:
Field Summary |
---|
Fields inherited from class org.apache.derby.jdbc.ClientConnectionPoolDataSource |
---|
className__ |
Constructor Summary | |
---|---|
ClientConnectionPoolDataSource40()
|
Method Summary | ||
---|---|---|
boolean |
isWrapperFor(java.lang.Class<?> interfaces)
Returns false unless interfaces is implemented |
|
|
unwrap(java.lang.Class<T> interfaces)
Returns this if this class implements the interface |
Methods inherited from class org.apache.derby.jdbc.ClientConnectionPoolDataSource |
---|
getPooledConnection, getPooledConnection |
Methods inherited from class org.apache.derby.jdbc.ClientDataSource |
---|
getConnection, getConnection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sql.CommonDataSource |
---|
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
Constructor Detail |
---|
public ClientConnectionPoolDataSource40()
Method Detail |
---|
public boolean isWrapperFor(java.lang.Class<?> interfaces) throws java.sql.SQLException
interfaces
is implemented
interfaces
- a Class defining an interface.
java.sql.SQLException
- if an error occurs while determining
whether this is a wrapper for an object
with the given interface.public <T> T unwrap(java.lang.Class<T> interfaces) throws java.sql.SQLException
this
if this class implements the interface
interfaces
- a Class defining an interface
java.sql.SQLExption
- if no object if found that implements the
interface
java.sql.SQLException
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
org.apache.* |
---|
org.apache.derby.drda.NetworkServerControl | ||
---|---|---|
public static final int |
DEFAULT_PORTNUMBER |
1527 |
org.apache.derby.jdbc.ClientBaseDataSource | ||
---|---|---|
public static final short |
CLEAR_TEXT_PASSWORD_SECURITY |
3 |
public static final short |
ENCRYPTED_PASSWORD_SECURITY |
7 |
public static final short |
ENCRYPTED_USER_AND_PASSWORD_SECURITY |
9 |
public static final int |
propertyDefault_portNumber |
1527 |
public static final boolean |
propertyDefault_retrieveMessageText |
true |
public static final short |
propertyDefault_securityMechanism |
4 |
public static final java.lang.String |
propertyDefault_serverName |
"localhost" |
public static final boolean |
propertyDefault_traceFileAppend |
false |
public static final int |
propertyDefault_traceLevel |
-1 |
public static final java.lang.String |
propertyDefault_user |
"APP" |
public static final int |
SSL_BASIC |
1 |
public static final int |
SSL_OFF |
0 |
public static final int |
SSL_PEER_AUTHENTICATION |
2 |
public static final short |
STRONG_PASSWORD_SUBSTITUTE_SECURITY |
8 |
public static final int |
TRACE_ALL |
-1 |
public static final int |
TRACE_CONNECTION_CALLS |
1 |
public static final int |
TRACE_CONNECTS |
32 |
public static final int |
TRACE_DIAGNOSTICS |
512 |
public static final int |
TRACE_DRIVER_CONFIGURATION |
16 |
public static final int |
TRACE_NONE |
0 |
public static final int |
TRACE_PARAMETER_META_DATA |
256 |
public static final int |
TRACE_PROTOCOL_FLOWS |
64 |
public static final int |
TRACE_RESULT_SET_CALLS |
4 |
public static final int |
TRACE_RESULT_SET_META_DATA |
128 |
public static final int |
TRACE_STATEMENT_CALLS |
2 |
public static final int |
TRACE_XA_CALLS |
2048 |
public static final short |
USER_ONLY_SECURITY |
4 |
org.apache.derby.tools.sysinfo | ||
---|---|---|
public static final java.lang.String |
CLIENT |
"dnc" |
public static final java.lang.String |
DBMS |
"DBMS" |
public static final java.lang.String |
NET |
"net" |
public static final java.lang.String |
TOOLS |
"tools" |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
|
|||||||||
PREV NEXT | FRAMES NO FRAMES |
|
Built on Wed 2007-11-28 11:45:21-0800, from revision 599110 | ||||||||
PREV NEXT | FRAMES NO FRAMES |