Issue Details (XML | Word | Printable)

Key: OPENJPA-144
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Brad L Vandermoon
Votes: 1
Watchers: 5
Operations

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

JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.

Created: 13/Feb/07 05:25 PM   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:
Issue & Sub-Tasks
Issue Only
Not Specified

File Attachments:
  Size
Text File Both-JTAandNonJTASpecified.txt 2007-02-14 09:09 PM Brad L Vandermoon 7 kB
Text File Only-JTASpecified.txt 2007-02-14 09:09 PM Brad L Vandermoon 7 kB
Java Archive File openjpa-144-patch-2.jar 2007-02-15 08:56 PM Patrick Linskey 9 kB
File OPENJPA-144-patch.diff 2007-02-14 11:56 PM Patrick Linskey 3 kB
Java Archive File openjpa-144-patch.jar 2007-02-15 06:22 PM Patrick Linskey 10 kB
Text File PostPatch-144.txt 2007-02-15 08:39 PM Brad L Vandermoon 8 kB
Text File PostPatch-144fix2.txt 2007-02-16 02:50 PM Brad L Vandermoon 8 kB
Environment: WebSphere 6.1, DB2 v8.1 and sequences
Issue Links:
Reference

Resolution Date: 16/Feb/07 04:22 PM

Sub-Tasks  All   Open   

 Description  « Hide
A non-jta-data-source is required for DB2 sequences; however, org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl does not support a JNDI lookup for this data source from the openjpa.ConnectionFactory2Name property as documented (refer to section 5.12 and 4.2.1 of the OpenJPA manual).

It seems like the same implementation for the jta-data-source should be implemented for the non-jta-data-source. i.e.

// ADD createConnectionFactory2()
private DecoratingDataSource createConnectionFactory2() {
        DataSource ds = (DataSource) connectionFactory2.get();
        if (ds != null)
            return setupConnectionFactory(ds, true);

        ds = (DataSource) super.getConnectionFactory2(); // JNDI lookup
        if (ds == null)
            ds = DataSourceFactory.newDataSource(this, true);

        return setupConnectionFactory(ds, true);
    }

// MODIFY this method
public Object getConnectionFactory2() {
        // override to configure data source
        if (dataSource2 == null) {
            DecoratingDataSource ds = createConnectionFactory2();
            dataSource2 = DataSourceFactory.installDBDictionary
                (getDBDictionaryInstance(), ds, this, true);
        }
        return dataSource2;
    }



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Brad L Vandermoon made changes - 14/Feb/07 12:57 PM
Field Original Value New Value
Environment WebSphere 6.1 WebSphere 6.1, DB2 v8.1 and sequences
Brad L Vandermoon made changes - 14/Feb/07 09:09 PM
Attachment Only-JTASpecified.txt [ 12351177 ]
Attachment Both-JTAandNonJTASpecified.txt [ 12351176 ]
Patrick Linskey made changes - 14/Feb/07 09:52 PM
Link This issue relates to OPENJPA-149 [ OPENJPA-149 ]
Patrick Linskey made changes - 14/Feb/07 11:56 PM
Attachment OPENJPA-144-patch.diff [ 12351196 ]
Patrick Linskey made changes - 15/Feb/07 06:22 PM
Attachment openjpa-144-patch.jar [ 12351270 ]
Brad L Vandermoon made changes - 15/Feb/07 08:39 PM
Attachment PostPatch-144.txt [ 12351280 ]
Patrick Linskey made changes - 15/Feb/07 08:56 PM
Attachment openjpa-144-patch-2.jar [ 12351281 ]
Brad L Vandermoon made changes - 16/Feb/07 02:50 PM
Attachment PostPatch-144fix2.txt [ 12351366 ]
Patrick Linskey made changes - 16/Feb/07 04:22 PM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Patrick Linskey made changes - 16/Feb/07 04:28 PM
Link This issue is related to OPENJPA-153 [ OPENJPA-153 ]
Patrick Linskey made changes - 01/Mar/07 02:13 AM
Fix Version/s 0.9.7 [ 12312340 ]