|
[
Permlink
| « Hide
]
Craig Russell added a comment - 07/Mar/06 01:30 PM
Please review this patch.
These test programs test the ability to get data from the JDBC Connection for implementations that support the getDataStoreConnection and SQL optional features.
Currently JPOX fails the DataStoreConnectionThrows tests because it passes the Connection object directly to the user instead of wrapping it. Note that JPOX could add a feature to permit restricted Connection methods to be used by setting a property, e.g. org.jpox.jdoconnection.Unrestricted. svn commit -m "
src/java/org/apache/jdo/tck/api/persistencemanager/DataStoreConnection.java \ src/java/org/apache/jdo/tck/api/persistencemanager/DataStoreConnectionThrows.java \ src/conf/pm.conf \ src/java/org/apache/jdo/tck/JDO_Test.java Sending src/conf/pm.conf Sending src/java/org/apache/jdo/tck/JDO_Test.java Adding src/java/org/apache/jdo/tck/api/persistencemanager/DataStoreConnection.java Adding src/java/org/apache/jdo/tck/api/persistencemanager/DataStoreConnectionThrows.java Transmitting file data .... Committed revision 384378. You say that JPOX fails DataStoreConnectionThrows because it passes a Connection directly instead of wrapping it. Can you please define what you mean here ? JPOX returns a org.jpox.JDOConnectionImpl from PM.getDataStoreConnection(). JDOConnectionImpl implements java.sql.Connection, and javax.jdo.datastore.JDOConnection. This does indeed wrap a (java.sql.)Connection. The test then proceeds to call commit not on the JDOConnection but on the native connection that it wraps. Are we saying that getNativeConnection() has to return the wrapped connection ? The spec says nothing about the returned object from getNativeConnection() wrapping a connection. Can we have a clarification on what this test is actually checking.
The test now simply casts the JDOConnectin to jdbc Connection.
Updated Implemented to yes in spreadsheet.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||