Issue Details (XML | Word | Printable)

Key: OPENJPA-93
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Patrick Linskey
Reporter: Patrick Linskey
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
OpenJPA

Sequence generation in a JTA environment should not require non-JTA datasource

Created: 30/Dec/06 01:11 AM   Updated: 01/Mar/07 02:13 AM
Return to search
Component/s: jdbc
Affects Version/s: None
Fix Version/s: 0.9.7

Time Tracking:
Not Specified

Resolution Date: 01/Mar/07 01:18 AM


 Description  « Hide
When obtaining non-transactional sequence numbers in a JTA environment when no non-jta-data-source or JDBC connection information is supplied, OpenJPA should suspend the current transaction, perform the sequence maintenance in a new transaction, commit, and resume the suspended transaction.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #491147 Sat Dec 30 01:20:55 UTC 2006 pcl Code changes for OPENJPA-93: sequence maintainance in JTA env without non-JTA datasource. This has been nominally tested in WebLogic Server.
Files Changed
MODIFY /incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/NativeJDBCSeq.java
MODIFY /incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/AbstractJDBCSeq.java
MODIFY /incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/TableJDBCSeq.java

Patrick Linskey added a comment - 30/Dec/06 01:23 AM
svn r491147 includes code changes that have been tested in WebLogic Server. The feature is not yet documented. The behavior is as follows: if no non-JTA datasource is available and the current environment is managed, OpenJPA will suspend the current transaction, begin a new transaction, do the sequence work, commit, and resume the original transaction. This code makes some thread-safety assumptions that should be valid in a JTA environment, since JTA transactions are inherently thread-bound.

Patrick Linskey made changes - 30/Dec/06 01:39 AM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Patrick Linskey made changes - 30/Dec/06 01:40 AM
Comment [ Added patch with r491148. I did not do any H2-specific testing, however. ]
Patrick Linskey made changes - 30/Dec/06 01:40 AM
Resolution Fixed [ 1 ]
Status Resolved [ 5 ] Reopened [ 4 ]
Patrick Linskey added a comment - 31/Jan/07 05:36 PM
Has anyone tested this on non-WLS appservers?

Patrick Linskey added a comment - 01/Mar/07 01:18 AM
The feature works, but OPENJPA-149 currently prevents it from working in a WebSphere environment in a default configuration. See OPENJPA-149 for a workaround.

Patrick Linskey made changes - 01/Mar/07 01:18 AM
Status Reopened [ 4 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Patrick Linskey made changes - 01/Mar/07 02:10 AM
Fix Version/s 0.9.7 [ 12312340 ]