
| Key: |
OPENJPA-144
|
| Type: |
Bug
|
| Status: |
Resolved
|
| Resolution: |
Fixed
|
| Priority: |
Major
|
| Assignee: |
Unassigned
|
| Reporter: |
Brad L Vandermoon
|
| Votes: |
1
|
| Watchers: |
5
|
|
If you were logged in you would be able to see more operations.
|
|
|
Time Tracking:
Issue & Sub-Tasks
Issue Only
Issue & Sub-Tasks
Issue Only
|
|
|
|
File Attachments:
|
|
|
Environment:
|
WebSphere 6.1, DB2 v8.1 and sequences
|
|
Issue Links:
|
Reference
|
|
This issue relates to:
|
|
OPENJPA-149
non-jta-data-source must be specified in WebSphere environments
|
|
|
|
|
|
This issue is related to:
|
|
OPENJPA-153
WebSphere and non-jta-data-source and default ManagedRuntime
|
|
|
|
|
|
|
| Resolution Date: |
16/Feb/07 04:22 PM
|
|
No sub-tasks match this view.
|
|
|
|
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;
}
|
|
Description
|
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;
}
|
Show » |
| There are no subversion log entries for this issue yet.
|
|