You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by "Craig Russell (JIRA)" <ji...@apache.org> on 2005/10/19 00:08:44 UTC
[jira] Created: (JDO-191) Add test for PersistenceManager.getDataStoreConnection()
Add test for PersistenceManager.getDataStoreConnection()
--------------------------------------------------------
Key: JDO-191
URL: http://issues.apache.org/jira/browse/JDO-191
Project: JDO
Type: Test
Components: tck20
Environment: TCK
Reporter: Craig Russell
A12.16-1 [JDOConnection getDataStoreConnection(); If this method is called while a datastore transaction is active, the object returned will be enlisted in the current transaction. If called in an optimistic transaction before flush has been called, or outside an active transaction, the object returned will not be enlisted in any transaction.]]
The tests use the PCPoint class and a jdbc Connection.
The first test verifies that an object inserted into the PCPoint table during a transaction is visible by getObjectById in the same transaction.
The second test verifies that an object inserted into the PCPoint table outside a transaction is visible in the next transaction.
The test needs to work with the jdbc library from the standard JDK 1.3 (JDBC 2.0).
--
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
[jira] Commented: (JDO-191) Add test for
PersistenceManager.getDataStoreConnection()
Posted by "Michelle Caisse (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-191?page=comments#action_12371882 ]
Michelle Caisse commented on JDO-191:
-------------------------------------
Updated Implemented to yes in spreadsheet.
> Add test for PersistenceManager.getDataStoreConnection()
> --------------------------------------------------------
>
> Key: JDO-191
> URL: http://issues.apache.org/jira/browse/JDO-191
> Project: JDO
> Type: Test
> Components: tck20
> Versions: JDO 2 beta
> Environment: TCK
> Reporter: Craig Russell
> Assignee: Craig Russell
> Fix For: JDO 2 final
> Attachments: DataStoreConnection.java, DataStoreConnection.java, DataStoreConnectionThrows.java
>
> A12.16-1 [JDOConnection getDataStoreConnection(); If this method is called while a datastore transaction is active, the object returned will be enlisted in the current transaction. If called in an optimistic transaction before flush has been called, or outside an active transaction, the object returned will not be enlisted in any transaction.]]
> The tests use the jdbc Connection.
> The test needs to work with the jdbc library from the standard JDK 1.3 (JDBC 2.0).
--
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
Re: [jira] Commented: (JDO-191) Add test for
PersistenceManager.getDataStoreConnection()
Posted by Craig L Russell <Cr...@Sun.COM>.
Hi Andy,
I looked at this and you are right. The JPOX implementation behaves
correctly. I'll fix this today.
Craig
On Mar 11, 2006, at 5:32 PM, Andy Jefferson (JIRA) wrote:
> [ http://issues.apache.org/jira/browse/JDO-191?
> page=comments#action_12370040 ]
>
> Andy Jefferson commented on JDO-191:
> ------------------------------------
>
> 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.
>
>> Add test for PersistenceManager.getDataStoreConnection()
>> --------------------------------------------------------
>>
>> Key: JDO-191
>> URL: http://issues.apache.org/jira/browse/JDO-191
>> Project: JDO
>> Type: Test
>> Components: tck20
>> Versions: JDO 2 beta
>> Environment: TCK
>> Reporter: Craig Russell
>> Fix For: JDO 2 final
>> Attachments: DataStoreConnection.java, DataStoreConnection.java,
>> DataStoreConnectionThrows.java
>>
>> A12.16-1 [JDOConnection getDataStoreConnection(); If this method
>> is called while a datastore transaction is active, the object
>> returned will be enlisted in the current transaction. If called in
>> an optimistic transaction before flush has been called, or outside
>> an active transaction, the object returned will not be enlisted in
>> any transaction.]]
>> The tests use the jdbc Connection.
>> The test needs to work with the jdbc library from the standard JDK
>> 1.3 (JDBC 2.0).
>
> --
> 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
>
Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!
[jira] Commented: (JDO-191) Add test for
PersistenceManager.getDataStoreConnection()
Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-191?page=comments#action_12370040 ]
Andy Jefferson commented on JDO-191:
------------------------------------
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.
> Add test for PersistenceManager.getDataStoreConnection()
> --------------------------------------------------------
>
> Key: JDO-191
> URL: http://issues.apache.org/jira/browse/JDO-191
> Project: JDO
> Type: Test
> Components: tck20
> Versions: JDO 2 beta
> Environment: TCK
> Reporter: Craig Russell
> Fix For: JDO 2 final
> Attachments: DataStoreConnection.java, DataStoreConnection.java, DataStoreConnectionThrows.java
>
> A12.16-1 [JDOConnection getDataStoreConnection(); If this method is called while a datastore transaction is active, the object returned will be enlisted in the current transaction. If called in an optimistic transaction before flush has been called, or outside an active transaction, the object returned will not be enlisted in any transaction.]]
> The tests use the jdbc Connection.
> The test needs to work with the jdbc library from the standard JDK 1.3 (JDBC 2.0).
--
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
[jira] Updated: (JDO-191) Add test for
PersistenceManager.getDataStoreConnection()
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-191?page=all ]
Craig Russell updated JDO-191:
------------------------------
Attachment: DataStoreConnection.java
Please review this patch.
> Add test for PersistenceManager.getDataStoreConnection()
> --------------------------------------------------------
>
> Key: JDO-191
> URL: http://issues.apache.org/jira/browse/JDO-191
> Project: JDO
> Type: Test
> Components: tck20
> Versions: JDO 2 beta
> Environment: TCK
> Reporter: Craig Russell
> Fix For: JDO 2 final
> Attachments: DataStoreConnection.java
>
> A12.16-1 [JDOConnection getDataStoreConnection(); If this method is called while a datastore transaction is active, the object returned will be enlisted in the current transaction. If called in an optimistic transaction before flush has been called, or outside an active transaction, the object returned will not be enlisted in any transaction.]]
> The tests use the jdbc Connection.
> The test needs to work with the jdbc library from the standard JDK 1.3 (JDBC 2.0).
--
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
[jira] Updated: (JDO-191) Add test for
PersistenceManager.getDataStoreConnection()
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-191?page=all ]
Craig Russell updated JDO-191:
------------------------------
Fix Version: JDO 2 final
(was: JDO 2 rc1)
> Add test for PersistenceManager.getDataStoreConnection()
> --------------------------------------------------------
>
> Key: JDO-191
> URL: http://issues.apache.org/jira/browse/JDO-191
> Project: JDO
> Type: Test
> Components: tck20
> Versions: JDO 2 beta
> Environment: TCK
> Reporter: Craig Russell
> Fix For: JDO 2 final
>
> A12.16-1 [JDOConnection getDataStoreConnection(); If this method is called while a datastore transaction is active, the object returned will be enlisted in the current transaction. If called in an optimistic transaction before flush has been called, or outside an active transaction, the object returned will not be enlisted in any transaction.]]
> The tests use the PCPoint class and a jdbc Connection.
> The first test verifies that an object inserted into the PCPoint table during a transaction is visible by getObjectById in the same transaction.
> The second test verifies that an object inserted into the PCPoint table outside a transaction is visible in the next transaction.
> The test needs to work with the jdbc library from the standard JDK 1.3 (JDBC 2.0).
--
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
[jira] Resolved: (JDO-191) Add test for
PersistenceManager.getDataStoreConnection()
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-191?page=all ]
Craig Russell resolved JDO-191:
-------------------------------
Resolution: Fixed
svn commit -m "JDO-191 Added tests for DataStoreConnection" \
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.
> Add test for PersistenceManager.getDataStoreConnection()
> --------------------------------------------------------
>
> Key: JDO-191
> URL: http://issues.apache.org/jira/browse/JDO-191
> Project: JDO
> Type: Test
> Components: tck20
> Versions: JDO 2 beta
> Environment: TCK
> Reporter: Craig Russell
> Fix For: JDO 2 final
> Attachments: DataStoreConnection.java, DataStoreConnection.java, DataStoreConnectionThrows.java
>
> A12.16-1 [JDOConnection getDataStoreConnection(); If this method is called while a datastore transaction is active, the object returned will be enlisted in the current transaction. If called in an optimistic transaction before flush has been called, or outside an active transaction, the object returned will not be enlisted in any transaction.]]
> The tests use the jdbc Connection.
> The test needs to work with the jdbc library from the standard JDK 1.3 (JDBC 2.0).
--
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
[jira] Updated: (JDO-191) Add test for
PersistenceManager.getDataStoreConnection()
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-191?page=all ]
Craig Russell updated JDO-191:
------------------------------
Fix Version: JDO 2 rc1
Version: JDO 2 beta
> Add test for PersistenceManager.getDataStoreConnection()
> --------------------------------------------------------
>
> Key: JDO-191
> URL: http://issues.apache.org/jira/browse/JDO-191
> Project: JDO
> Type: Test
> Components: tck20
> Versions: JDO 2 beta
> Environment: TCK
> Reporter: Craig Russell
> Fix For: JDO 2 rc1
>
> A12.16-1 [JDOConnection getDataStoreConnection(); If this method is called while a datastore transaction is active, the object returned will be enlisted in the current transaction. If called in an optimistic transaction before flush has been called, or outside an active transaction, the object returned will not be enlisted in any transaction.]]
> The tests use the PCPoint class and a jdbc Connection.
> The first test verifies that an object inserted into the PCPoint table during a transaction is visible by getObjectById in the same transaction.
> The second test verifies that an object inserted into the PCPoint table outside a transaction is visible in the next transaction.
> The test needs to work with the jdbc library from the standard JDK 1.3 (JDBC 2.0).
--
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
[jira] Updated: (JDO-191) Add test for
PersistenceManager.getDataStoreConnection()
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-191?page=all ]
Craig Russell updated JDO-191:
------------------------------
Comment: was deleted
> Add test for PersistenceManager.getDataStoreConnection()
> --------------------------------------------------------
>
> Key: JDO-191
> URL: http://issues.apache.org/jira/browse/JDO-191
> Project: JDO
> Type: Test
> Components: tck20
> Versions: JDO 2 beta
> Environment: TCK
> Reporter: Craig Russell
> Fix For: JDO 2 final
> Attachments: DataStoreConnection.java, DataStoreConnection.java, DataStoreConnectionThrows.java
>
> A12.16-1 [JDOConnection getDataStoreConnection(); If this method is called while a datastore transaction is active, the object returned will be enlisted in the current transaction. If called in an optimistic transaction before flush has been called, or outside an active transaction, the object returned will not be enlisted in any transaction.]]
> The tests use the jdbc Connection.
> The test needs to work with the jdbc library from the standard JDK 1.3 (JDBC 2.0).
--
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
[jira] Updated: (JDO-191) Add test for
PersistenceManager.getDataStoreConnection()
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-191?page=all ]
Craig Russell updated JDO-191:
------------------------------
Description:
A12.16-1 [JDOConnection getDataStoreConnection(); If this method is called while a datastore transaction is active, the object returned will be enlisted in the current transaction. If called in an optimistic transaction before flush has been called, or outside an active transaction, the object returned will not be enlisted in any transaction.]]
The tests use the jdbc Connection.
The test needs to work with the jdbc library from the standard JDK 1.3 (JDBC 2.0).
was:
A12.16-1 [JDOConnection getDataStoreConnection(); If this method is called while a datastore transaction is active, the object returned will be enlisted in the current transaction. If called in an optimistic transaction before flush has been called, or outside an active transaction, the object returned will not be enlisted in any transaction.]]
The tests use the PCPoint class and a jdbc Connection.
The first test verifies that an object inserted into the PCPoint table during a transaction is visible by getObjectById in the same transaction.
The second test verifies that an object inserted into the PCPoint table outside a transaction is visible in the next transaction.
The test needs to work with the jdbc library from the standard JDK 1.3 (JDBC 2.0).
There is no standard way to access data from the database using this API. The test will be limited to getting a jdbc Connection and making sure that it is operational via a simple API like getAutocommit().
> Add test for PersistenceManager.getDataStoreConnection()
> --------------------------------------------------------
>
> Key: JDO-191
> URL: http://issues.apache.org/jira/browse/JDO-191
> Project: JDO
> Type: Test
> Components: tck20
> Versions: JDO 2 beta
> Environment: TCK
> Reporter: Craig Russell
> Fix For: JDO 2 final
> Attachments: DataStoreConnection.java
>
> A12.16-1 [JDOConnection getDataStoreConnection(); If this method is called while a datastore transaction is active, the object returned will be enlisted in the current transaction. If called in an optimistic transaction before flush has been called, or outside an active transaction, the object returned will not be enlisted in any transaction.]]
> The tests use the jdbc Connection.
> The test needs to work with the jdbc library from the standard JDK 1.3 (JDBC 2.0).
--
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
[jira] Updated: (JDO-191) Add test for
PersistenceManager.getDataStoreConnection()
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-191?page=all ]
Craig Russell updated JDO-191:
------------------------------
Attachment: DataStoreConnection.java
DataStoreConnectionThrows.java
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.
> Add test for PersistenceManager.getDataStoreConnection()
> --------------------------------------------------------
>
> Key: JDO-191
> URL: http://issues.apache.org/jira/browse/JDO-191
> Project: JDO
> Type: Test
> Components: tck20
> Versions: JDO 2 beta
> Environment: TCK
> Reporter: Craig Russell
> Fix For: JDO 2 final
> Attachments: DataStoreConnection.java, DataStoreConnection.java, DataStoreConnectionThrows.java
>
> A12.16-1 [JDOConnection getDataStoreConnection(); If this method is called while a datastore transaction is active, the object returned will be enlisted in the current transaction. If called in an optimistic transaction before flush has been called, or outside an active transaction, the object returned will not be enlisted in any transaction.]]
> The tests use the jdbc Connection.
> The test needs to work with the jdbc library from the standard JDK 1.3 (JDBC 2.0).
--
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
[jira] Commented: (JDO-191) Add test for
PersistenceManager.getDataStoreConnection()
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-191?page=comments#action_12370093 ]
Craig Russell commented on JDO-191:
-----------------------------------
The test now simply casts the JDOConnectin to jdbc Connection.
> Add test for PersistenceManager.getDataStoreConnection()
> --------------------------------------------------------
>
> Key: JDO-191
> URL: http://issues.apache.org/jira/browse/JDO-191
> Project: JDO
> Type: Test
> Components: tck20
> Versions: JDO 2 beta
> Environment: TCK
> Reporter: Craig Russell
> Assignee: Craig Russell
> Fix For: JDO 2 final
> Attachments: DataStoreConnection.java, DataStoreConnection.java, DataStoreConnectionThrows.java
>
> A12.16-1 [JDOConnection getDataStoreConnection(); If this method is called while a datastore transaction is active, the object returned will be enlisted in the current transaction. If called in an optimistic transaction before flush has been called, or outside an active transaction, the object returned will not be enlisted in any transaction.]]
> The tests use the jdbc Connection.
> The test needs to work with the jdbc library from the standard JDK 1.3 (JDBC 2.0).
--
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
[jira] Assigned: (JDO-191) Add test for
PersistenceManager.getDataStoreConnection()
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-191?page=all ]
Craig Russell reassigned JDO-191:
---------------------------------
Assign To: Craig Russell
> Add test for PersistenceManager.getDataStoreConnection()
> --------------------------------------------------------
>
> Key: JDO-191
> URL: http://issues.apache.org/jira/browse/JDO-191
> Project: JDO
> Type: Test
> Components: tck20
> Versions: JDO 2 beta
> Environment: TCK
> Reporter: Craig Russell
> Assignee: Craig Russell
> Fix For: JDO 2 final
> Attachments: DataStoreConnection.java, DataStoreConnection.java, DataStoreConnectionThrows.java
>
> A12.16-1 [JDOConnection getDataStoreConnection(); If this method is called while a datastore transaction is active, the object returned will be enlisted in the current transaction. If called in an optimistic transaction before flush has been called, or outside an active transaction, the object returned will not be enlisted in any transaction.]]
> The tests use the jdbc Connection.
> The test needs to work with the jdbc library from the standard JDK 1.3 (JDBC 2.0).
--
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