[ http://issues.apache.org/jira/browse/DERBY-597?page=all ]
Deepa Remesh updated DERBY-597:
-------------------------------
Attachment: derby-597-v2.diff
derby-597-v2.status
Attaching patch 'derby-597-v2.diff' for Dan's comments
Summary of patch:
* If ij.dataSource property is set and the url in the 'connect' statement does
not start with 'jdbc:', ij calls util.getDataSourceConnection to get connection
(instead of using DriverManager).
* Added getDataSourceConnection(String dsName,String user,String
password,String dbName,boolean firstTime) to util.java. This returns a
connection using the data source passed in ij.dataSource property. This method
is called by startJBMS in util.java and ConnectStatement() in ij. The parameter
firstTime indicates whether this method is called at start of test by
startJBMS or by ConnectStatement.
* getDataSourceConnection method in turn calls setupDataSource which calls the
set methods of data source. If firstTime=true, it uses values of
ij.dataSource.* properties to set up the data source object. Otherwise, the
properties ij.dataSource.databaseName and ij.dataSource.createDatabase are
ignored. Instead, value of 'dbName' parameter is used. [In first version of
this patch, parameter 'firstTime' was called 'create']
* Removed J2ME excludes from 13 tests which pass with this patch. Some tests
needed changes in the connect statement url and master files.
-----------
Tests (on Windows XP):
-----------
* Ran derbyall with Sun JDK 1.4.2. 1 test failed -
derbyall/storeall/storeall.fail:store/readlocks.sql. I ran this test again and
it passed. The failure is not related to this change.
* Ran derbyall with IBM WCTME 5.7 CDC/FP. 3 tests failed:
derbyall/derbyall.fail:jdbcapi/characterStreams.java
derbyall/derbyall.fail:jdbcapi/nullSQLText.java
derbyall/storeall/storeall.fail:unit/T_RawStoreFactory.unit
Failures are not related to this change: characterStreams.java and
nullSQLText.java fail because of some new additions to the tests by other
patches. They can be made to pass in CDC with minor changes.
T_RawStoreFactory.unit has to be excluded from CDC. This test fails
intermittently (almost every time) in CDC. I will submit a separate patch for
these 3 tests.
> Enhance ij connect statement to work in J2ME/CDC/FP
> ---------------------------------------------------
>
> Key: DERBY-597
> URL: http://issues.apache.org/jira/browse/DERBY-597
> Project: Derby
> Type: Improvement
> Components: Tools
> Versions: 10.2.0.0, 10.1.1.1
> Environment: J2ME/CDC/FP
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Priority: Minor
> Attachments: derby-597-v2.diff, derby-597-v2.status, derby-597.diff,
> derby-597.status
>
> The connect statement in ij currently uses DriverManager class to get a
> connection and so does not work in J2ME environment. Currently in tests, the
> startJBMS method can optionally use DataSource to get a connection. This
> approach can be used in 'connect' statement too. This change will allow more
> tests to be run in J2ME.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira