openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brad L Vandermoon (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-144) JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.
Date Thu, 15 Feb 2007 23:07:06 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473548
] 

Brad L Vandermoon commented on OPENJPA-144:
-------------------------------------------

I am getting a different error this time, but before I pass on the stack trace information,
perhaps you can tell me what properties you'd expect to see set i.e. non-jta-data-source,
openjpa.Connection2DriverName, openjpa.ConnectionFactory2Name, etc.....

> 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.


Mime
View raw message