From open-jpa-dev-return-2186-apmail-incubator-open-jpa-dev-archive=incubator.apache.org@incubator.apache.org Thu Feb 15 12:53:27 2007 Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 57287 invoked from network); 15 Feb 2007 12:53:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Feb 2007 12:53:27 -0000 Received: (qmail 41448 invoked by uid 500); 15 Feb 2007 12:53:34 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 41422 invoked by uid 500); 15 Feb 2007 12:53:34 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 41413 invoked by uid 99); 15 Feb 2007 12:53:34 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Feb 2007 04:53:34 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Feb 2007 04:53:25 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 870057140D1 for ; Thu, 15 Feb 2007 04:53:05 -0800 (PST) Message-ID: <30893273.1171543985550.JavaMail.jira@brutus> Date: Thu, 15 Feb 2007 04:53:05 -0800 (PST) From: "Brad L Vandermoon (JIRA)" To: open-jpa-dev@incubator.apache.org Subject: [jira] Commented: (OPENJPA-144) JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source. In-Reply-To: <7368936.1171387565893.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473372 ] Brad L Vandermoon commented on OPENJPA-144: ------------------------------------------- I will test today. > 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.