Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 31DE8200C80 for ; Thu, 25 May 2017 22:14:25 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2ED22160BCA; Thu, 25 May 2017 20:14:25 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4DD8F160BB4 for ; Thu, 25 May 2017 22:14:24 +0200 (CEST) Received: (qmail 89208 invoked by uid 500); 25 May 2017 20:14:23 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 89199 invoked by uid 99); 25 May 2017 20:14:23 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 May 2017 20:14:23 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 66893DFC2E; Thu, 25 May 2017 20:14:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: cschneider@apache.org To: commits@cxf.apache.org Message-Id: <26bb9b7fdb65490199d1ab9685820f7a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: cxf git commit: Improve RMTXStore by using a real derby DataSource Date: Thu, 25 May 2017 20:14:23 +0000 (UTC) archived-at: Thu, 25 May 2017 20:14:25 -0000 Repository: cxf Updated Branches: refs/heads/master 35ab874f8 -> 4b23cab79 Improve RMTXStore by using a real derby DataSource Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/4b23cab7 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4b23cab7 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4b23cab7 Branch: refs/heads/master Commit: 4b23cab79851b073d9902e504081c13db31145cb Parents: 35ab874 Author: Christian Schneider Authored: Thu May 25 22:13:56 2017 +0200 Committer: Christian Schneider Committed: Thu May 25 22:14:16 2017 +0200 ---------------------------------------------------------------------- .gitignore | 1 + rt/ws/rm/pom.xml | 5 +++ .../jdbc/RMTxStoreConfigurationTest.java | 46 +------------------- .../ws/rm/persistence/jdbc/txstore-ds-bean.xml | 7 ++- .../ws/rm/persistence/jdbc/txstore-ds-bean2.xml | 5 ++- 5 files changed, 17 insertions(+), 47 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/4b23cab7/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore index 14e79f9..86a086e 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ target/ velocity.log bin/ node_modules/ +derby.log http://git-wip-us.apache.org/repos/asf/cxf/blob/4b23cab7/rt/ws/rm/pom.xml ---------------------------------------------------------------------- diff --git a/rt/ws/rm/pom.xml b/rt/ws/rm/pom.xml index c512449..1746f3d 100644 --- a/rt/ws/rm/pom.xml +++ b/rt/ws/rm/pom.xml @@ -137,6 +137,11 @@ jcl-over-slf4j test + + org.apache.derby + derby + test + http://git-wip-us.apache.org/repos/asf/cxf/blob/4b23cab7/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreConfigurationTest.java ---------------------------------------------------------------------- diff --git a/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreConfigurationTest.java b/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreConfigurationTest.java index 308d059..11f2ecb 100644 --- a/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreConfigurationTest.java +++ b/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreConfigurationTest.java @@ -19,12 +19,7 @@ package org.apache.cxf.ws.rm.persistence.jdbc; -import java.io.PrintWriter; -import java.sql.Connection; import java.sql.SQLException; -import java.util.logging.Logger; - -import javax.sql.DataSource; import org.apache.cxf.Bus; import org.apache.cxf.bus.spring.SpringBusFactory; @@ -90,7 +85,7 @@ public class RMTxStoreConfigurationTest extends Assert { assertNotNull(store.getDataSource()); - assertNull(store.getConnection()); + assertNotNull(store.getConnection()); } @Test @@ -103,44 +98,7 @@ public class RMTxStoreConfigurationTest extends Assert { assertNotNull(store.getDataSource()); - assertNull(store.getConnection()); + assertNotNull(store.getConnection()); } - static class TestDataSource implements DataSource { - public PrintWriter getLogWriter() throws SQLException { - return null; - } - - public void setLogWriter(PrintWriter out) throws SQLException { - } - - public void setLoginTimeout(int seconds) throws SQLException { - } - - public int getLoginTimeout() throws SQLException { - return 0; - } - - public T unwrap(Class iface) throws SQLException { - return null; - } - - public boolean isWrapperFor(Class iface) throws SQLException { - return false; - } - - public Connection getConnection() throws SQLException { - // avoid creating a connection and tables at RMTxStore.init() - throw new SQLException("test"); - } - - public Connection getConnection(String username, String password) throws SQLException { - // avoid creating a connection and tables at RMTxStore.init() - throw new SQLException("test"); - } - - public Logger getParentLogger() { - return null; - } - } } http://git-wip-us.apache.org/repos/asf/cxf/blob/4b23cab7/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/txstore-ds-bean.xml ---------------------------------------------------------------------- diff --git a/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/txstore-ds-bean.xml b/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/txstore-ds-bean.xml index 9fe6b50..1f58f45 100644 --- a/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/txstore-ds-bean.xml +++ b/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/txstore-ds-bean.xml @@ -24,8 +24,11 @@ - + - + + + + http://git-wip-us.apache.org/repos/asf/cxf/blob/4b23cab7/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/txstore-ds-bean2.xml ---------------------------------------------------------------------- diff --git a/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/txstore-ds-bean2.xml b/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/txstore-ds-bean2.xml index bba8428..e5bcb45 100644 --- a/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/txstore-ds-bean2.xml +++ b/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/txstore-ds-bean2.xml @@ -25,5 +25,8 @@ - + + + +