[jira] Updated: (OPENJPA-144) JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.
[ https://issues.apache.org/jira/browse/OPENJPA-144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brad L Vandermoon updated OPENJPA-144: -- Attachment: PostPatch-144fix2.txt Getting a different exception now. It is contained in attached PostPatch-144fix2.txt. It appears as though all JNDI lookups in WebSphere return a managed connection as JDBCConfigurationImpl.datasource2 contains an instance of com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource. Just to recap. Without the patches, I have been able to get sequences two work by two different methods: Approach 1: specify connection properties so OpenJPA can build a SimpleDriverDataSource. Properties are as follows: entry key=openjpa.Connection2DriverName value=com.ibm.db2.jcc.DB2Driver/ entry key=openjpa.Connection2UserName value=Test/ entry key=openjpa.Connection2Password value=/ entry key=openjpa.Connection2URL value=jdbc:db2://localhost:3700/RQSTSET/ entry key=openjpa.jdbc.Schema value=PROPCAS/ Under this approach, SimpleDriverDataSource is contained in JDBCConfigurationImpl.datasource2. Approach 2: pass the webspeher transaction manager to OpenJPA per the below property: entry key=openjpa.ManagedRuntime value=invocation(TransactionManagerMethod=com.ibm.ws.Transaction.TransactionManagerFactory.getTransactionManager)/ JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source. - Key: OPENJPA-144 URL: https://issues.apache.org/jira/browse/OPENJPA-144 Project: OpenJPA Issue Type: Bug Components: jdbc Environment: WebSphere 6.1, DB2 v8.1 and sequences Reporter: Brad L Vandermoon Attachments: Both-JTAandNonJTASpecified.txt, Only-JTASpecified.txt, openjpa-144-patch-2.jar, OPENJPA-144-patch.diff, openjpa-144-patch.jar, PostPatch-144.txt, PostPatch-144fix2.txt 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; } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-144) JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.
[ https://issues.apache.org/jira/browse/OPENJPA-144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brad L Vandermoon updated OPENJPA-144: -- Attachment: PostPatch-144.txt The error has changed a bit. New stack trace is in PostPatch-144. Debugging indicates that JDCConfigurationImpl.datasource2 contains a managed datasource. JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source. - Key: OPENJPA-144 URL: https://issues.apache.org/jira/browse/OPENJPA-144 Project: OpenJPA Issue Type: Bug Components: jdbc Environment: WebSphere 6.1, DB2 v8.1 and sequences Reporter: Brad L Vandermoon Attachments: Both-JTAandNonJTASpecified.txt, Only-JTASpecified.txt, OPENJPA-144-patch.diff, openjpa-144-patch.jar, PostPatch-144.txt 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; } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-144) JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.
[ https://issues.apache.org/jira/browse/OPENJPA-144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Linskey updated OPENJPA-144: Attachment: openjpa-144-patch-2.jar JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source. - Key: OPENJPA-144 URL: https://issues.apache.org/jira/browse/OPENJPA-144 Project: OpenJPA Issue Type: Bug Components: jdbc Environment: WebSphere 6.1, DB2 v8.1 and sequences Reporter: Brad L Vandermoon Attachments: Both-JTAandNonJTASpecified.txt, Only-JTASpecified.txt, openjpa-144-patch-2.jar, OPENJPA-144-patch.diff, openjpa-144-patch.jar, PostPatch-144.txt 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; } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-144) JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.
[ https://issues.apache.org/jira/browse/OPENJPA-144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brad L Vandermoon updated OPENJPA-144: -- Environment: WebSphere 6.1, DB2 v8.1 and sequences (was: WebSphere 6.1 ) The above solution is offered as an analysis level solution only. Testing is in process. JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source. - Key: OPENJPA-144 URL: https://issues.apache.org/jira/browse/OPENJPA-144 Project: OpenJPA Issue Type: Bug Components: jdbc Environment: WebSphere 6.1, DB2 v8.1 and sequences Reporter: Brad L Vandermoon 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; } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-144) JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.
[ https://issues.apache.org/jira/browse/OPENJPA-144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brad L Vandermoon updated OPENJPA-144: -- Attachment: Only-JTASpecified.txt Both-JTAandNonJTASpecified.txt Requested stack traces provided above. I also verified that JDBCConfigurationImpl.connectionFactory2Name contained my non-jta-data-source reference (i.e. java:comp/env/jdbc/RequestSetNoTran) when producing Both-JTAandNonJTASpecified.txt. JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source. - Key: OPENJPA-144 URL: https://issues.apache.org/jira/browse/OPENJPA-144 Project: OpenJPA Issue Type: Bug Components: jdbc Environment: WebSphere 6.1, DB2 v8.1 and sequences Reporter: Brad L Vandermoon Attachments: Both-JTAandNonJTASpecified.txt, Only-JTASpecified.txt 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; } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-144) JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.
[ https://issues.apache.org/jira/browse/OPENJPA-144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Linskey updated OPENJPA-144: Attachment: OPENJPA-144-patch.diff JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source. - Key: OPENJPA-144 URL: https://issues.apache.org/jira/browse/OPENJPA-144 Project: OpenJPA Issue Type: Bug Components: jdbc Environment: WebSphere 6.1, DB2 v8.1 and sequences Reporter: Brad L Vandermoon Attachments: Both-JTAandNonJTASpecified.txt, Only-JTASpecified.txt, OPENJPA-144-patch.diff 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; } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.