polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [4/8] zest-qi4j git commit: ZEST-14 Remove libraries/sql-c3p0
Date Mon, 06 Jul 2015 16:04:41 GMT
ZEST-14 Remove libraries/sql-c3p0


Project: http://git-wip-us.apache.org/repos/asf/zest-qi4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-qi4j/commit/2ba666fd
Tree: http://git-wip-us.apache.org/repos/asf/zest-qi4j/tree/2ba666fd
Diff: http://git-wip-us.apache.org/repos/asf/zest-qi4j/diff/2ba666fd

Branch: refs/heads/develop
Commit: 2ba666fd5a9b2d2e9d8b7e9886b1c9393fc384cf
Parents: b6cb7bb
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Mon Jul 6 17:13:51 2015 +0200
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Mon Jul 6 17:13:51 2015 +0200

----------------------------------------------------------------------
 libraries.gradle                                |   2 -
 libraries/sql-c3p0/build.gradle                 |  28 ------
 libraries/sql-c3p0/dev-status.xml               |  35 -------
 .../c3p0/C3P0DataSourceServiceAssembler.java    |  33 ------
 .../sql/c3p0/C3P0DataSourceServiceImporter.java | 100 -------------------
 .../java/org/qi4j/library/sql/c3p0/package.html |  21 ----
 libraries/sql-liquibase/build.gradle            |   2 +-
 .../sql/liquibase/LiquibaseServiceTest.java     |   4 +-
 libraries/sql/build.gradle                      |   1 -
 libraries/sql/src/docs/sql.txt                  |  18 +---
 .../qi4j/library/sql/DocumentationSupport.java  |  10 --
 ...taSourceConfigurationManagerServiceTest.java |   4 +-
 settings.gradle                                 |   1 -
 13 files changed, 6 insertions(+), 253 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/2ba666fd/libraries.gradle
----------------------------------------------------------------------
diff --git a/libraries.gradle b/libraries.gradle
index 93071dc..cd5e35a 100644
--- a/libraries.gradle
+++ b/libraries.gradle
@@ -21,7 +21,6 @@
 def asmVersion = '5.0.4'
 def bonecpVersion = '0.8.0.RELEASE'
 def bouncyVersion = '1.52'
-def c3p0Version = '0.9.1.2'
 def commonsCodecVersion = '1.10'
 def commonsDbcpVersion = '1.4' // Should be moved to commons-dbcp2
 def commonsIoVersion = '2.4'
@@ -238,7 +237,6 @@ rootProject.ext {
           shiro: "org.apache.shiro:shiro-core:$shiroVersion",
           shiro_web: "org.apache.shiro:shiro-web:$shiroVersion",
           bonecp: "com.jolbox:bonecp:$bonecpVersion",
-          c3p0: "c3p0:c3p0:$c3p0Version",
           liquibase: "org.liquibase:liquibase-core:$liquibaseVersion",
           sked: "org.codeartisans:sked:$skedVersion",
           yammer_metrics: "com.yammer.metrics:metrics-core:$yammerMetricsVersion",

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/2ba666fd/libraries/sql-c3p0/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/sql-c3p0/build.gradle b/libraries/sql-c3p0/build.gradle
deleted file mode 100644
index 9531c62..0000000
--- a/libraries/sql-c3p0/build.gradle
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-description = "Qi4j SQL C3P0 Library provides C3P0 support."
-
-jar { manifest { name = "Qi4j Library - SQL C3P0" }}
-
-dependencies {
-  compile(project(":org.qi4j.libraries:org.qi4j.library.sql"))
-  compile(libraries.c3p0)
-}
-

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/2ba666fd/libraries/sql-c3p0/dev-status.xml
----------------------------------------------------------------------
diff --git a/libraries/sql-c3p0/dev-status.xml b/libraries/sql-c3p0/dev-status.xml
deleted file mode 100644
index bdf00e7..0000000
--- a/libraries/sql-c3p0/dev-status.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-  
-  http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<module xmlns="http://www.qi4j.org/schemas/2008/dev-status/1"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://www.qi4j.org/schemas/2008/dev-status/1
-        http://www.qi4j.org/schemas/2008/dev-status/1/dev-status.xsd">
-  <status>
-    <!--none,early,beta,stable,mature-->
-    <codebase>stable</codebase>
-
-    <!-- none, brief, good, complete -->
-    <documentation>good</documentation>
-
-    <!-- none, some, good, complete -->
-    <unittests>good</unittests>
-  </status>
-  <licenses>
-    <license>ALv2</license>
-  </licenses>
-</module>

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/2ba666fd/libraries/sql-c3p0/src/main/java/org/qi4j/library/sql/c3p0/C3P0DataSourceServiceAssembler.java
----------------------------------------------------------------------
diff --git a/libraries/sql-c3p0/src/main/java/org/qi4j/library/sql/c3p0/C3P0DataSourceServiceAssembler.java
b/libraries/sql-c3p0/src/main/java/org/qi4j/library/sql/c3p0/C3P0DataSourceServiceAssembler.java
deleted file mode 100644
index 7cb5ed6..0000000
--- a/libraries/sql-c3p0/src/main/java/org/qi4j/library/sql/c3p0/C3P0DataSourceServiceAssembler.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2012, Paul Merlin. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.qi4j.library.sql.c3p0;
-
-import org.qi4j.api.common.Visibility;
-import org.qi4j.bootstrap.ModuleAssembly;
-import org.qi4j.library.sql.assembly.AbstractPooledDataSourceServiceAssembler;
-
-/**
- * Use this Assembler to register a DataSourceService based on C3P0 and its Configuration
entity.
- */
-public class C3P0DataSourceServiceAssembler
-        extends AbstractPooledDataSourceServiceAssembler<C3P0DataSourceServiceAssembler>
-{
-
-    @Override
-    protected void onAssemble( ModuleAssembly module, String identity, Visibility visibility
)
-    {
-        module.services( C3P0DataSourceServiceImporter.class ).identifiedBy( identity ).visibleIn(
visibility );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/2ba666fd/libraries/sql-c3p0/src/main/java/org/qi4j/library/sql/c3p0/C3P0DataSourceServiceImporter.java
----------------------------------------------------------------------
diff --git a/libraries/sql-c3p0/src/main/java/org/qi4j/library/sql/c3p0/C3P0DataSourceServiceImporter.java
b/libraries/sql-c3p0/src/main/java/org/qi4j/library/sql/c3p0/C3P0DataSourceServiceImporter.java
deleted file mode 100644
index 36baf5c..0000000
--- a/libraries/sql-c3p0/src/main/java/org/qi4j/library/sql/c3p0/C3P0DataSourceServiceImporter.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2011, Rickard Öberg. All Rights Reserved.
- * Copyright (c) 2012, Paul Merlin. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.qi4j.library.sql.c3p0;
-
-import com.mchange.v2.c3p0.ComboPooledDataSource;
-import com.mchange.v2.c3p0.DataSources;
-import java.sql.SQLException;
-import java.util.Properties;
-import javax.sql.DataSource;
-import org.qi4j.api.activation.Activators;
-import org.qi4j.api.mixin.Mixins;
-import org.qi4j.api.service.ServiceComposite;
-import org.qi4j.api.service.ServiceImporter;
-import org.qi4j.library.sql.datasource.AbstractDataSourceServiceImporterMixin;
-import org.qi4j.library.sql.datasource.DataSourceConfigurationValue;
-import org.qi4j.library.sql.datasource.DataSourceServiceImporterActivation;
-
-/**
- * DataSource service implemented as a ServiceImporter.
- *
- * Import visible DataSources as Services. The default Mixin use the C3P0
- * pooling system optionaly wrapped with CircuitBreaker using a proxy.
- */
-@Mixins( C3P0DataSourceServiceImporter.Mixin.class )
-@Activators( DataSourceServiceImporterActivation.Activator.class )
-public interface C3P0DataSourceServiceImporter
-        extends ServiceImporter<DataSource>, DataSourceServiceImporterActivation, ServiceComposite
-{
-
-    public static class Mixin
-            extends AbstractDataSourceServiceImporterMixin<ComboPooledDataSource>
-    {
-
-        @Override
-        protected ComboPooledDataSource setupDataSourcePool( DataSourceConfigurationValue
config )
-                throws Exception
-        {
-            ComboPooledDataSource pool = new ComboPooledDataSource();
-
-            Class.forName( config.driver().get() );
-            pool.setDriverClass( config.driver().get() );
-            pool.setJdbcUrl( config.url().get() );
-
-            if ( !config.username().get().equals( "" ) ) {
-                pool.setUser( config.username().get() );
-                pool.setPassword( config.password().get() );
-            }
-
-            if ( config.minPoolSize().get() != null ) {
-                pool.setMinPoolSize( config.minPoolSize().get() );
-            }
-            if ( config.maxPoolSize().get() != null ) {
-                pool.setMaxPoolSize( config.maxPoolSize().get() );
-            }
-            if ( config.loginTimeoutSeconds().get() != null ) {
-                pool.setLoginTimeout( config.loginTimeoutSeconds().get() );
-            }
-            if ( config.maxConnectionAgeSeconds().get() != null ) {
-                pool.setMaxIdleTime( config.maxConnectionAgeSeconds().get() );
-            }
-            if ( config.validationQuery().get() != null ) {
-                pool.setPreferredTestQuery( config.validationQuery().get() );
-            }
-
-            String props = config.properties().get();
-            String[] properties = props.split( "," );
-            Properties poolProperties = new Properties();
-            for ( String property : properties ) {
-                if ( property.trim().length() > 0 ) {
-                    String[] keyvalue = property.trim().split( "=" );
-                    poolProperties.setProperty( keyvalue[0], keyvalue[1] );
-                }
-            }
-            pool.setProperties( poolProperties );
-
-            return pool;
-        }
-
-        @Override
-        protected void passivateDataSourcePool( ComboPooledDataSource dataSourcePool )
-                throws SQLException
-        {
-            DataSources.destroy( dataSourcePool );
-        }
-
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/2ba666fd/libraries/sql-c3p0/src/main/java/org/qi4j/library/sql/c3p0/package.html
----------------------------------------------------------------------
diff --git a/libraries/sql-c3p0/src/main/java/org/qi4j/library/sql/c3p0/package.html b/libraries/sql-c3p0/src/main/java/org/qi4j/library/sql/c3p0/package.html
deleted file mode 100644
index 209f271..0000000
--- a/libraries/sql-c3p0/src/main/java/org/qi4j/library/sql/c3p0/package.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<html>
-    <body>
-        <h2>SQL C3P0 Support.</h2>
-    </body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/2ba666fd/libraries/sql-liquibase/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/sql-liquibase/build.gradle b/libraries/sql-liquibase/build.gradle
index 3d19278..309644b 100644
--- a/libraries/sql-liquibase/build.gradle
+++ b/libraries/sql-liquibase/build.gradle
@@ -27,7 +27,7 @@ dependencies {
   compile libraries.slf4j_api
 
   testCompile(project(":org.qi4j.core:org.qi4j.core.testsupport"))
-  testCompile(project(":org.qi4j.libraries:org.qi4j.library.sql-c3p0"))
+  testCompile(project(":org.qi4j.libraries:org.qi4j.library.sql-bonecp"))
 
   testRuntime(project(":org.qi4j.core:org.qi4j.core.runtime"))
   testRuntime(libraries.derby)

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/2ba666fd/libraries/sql-liquibase/src/test/java/org/qi4j/library/sql/liquibase/LiquibaseServiceTest.java
----------------------------------------------------------------------
diff --git a/libraries/sql-liquibase/src/test/java/org/qi4j/library/sql/liquibase/LiquibaseServiceTest.java
b/libraries/sql-liquibase/src/test/java/org/qi4j/library/sql/liquibase/LiquibaseServiceTest.java
index 3f89434..cc9a62f 100644
--- a/libraries/sql-liquibase/src/test/java/org/qi4j/library/sql/liquibase/LiquibaseServiceTest.java
+++ b/libraries/sql-liquibase/src/test/java/org/qi4j/library/sql/liquibase/LiquibaseServiceTest.java
@@ -37,7 +37,7 @@ import org.qi4j.functional.Function;
 import org.qi4j.io.Inputs;
 import org.qi4j.io.Outputs;
 import org.qi4j.library.sql.assembly.DataSourceAssembler;
-import org.qi4j.library.sql.c3p0.C3P0DataSourceServiceAssembler;
+import org.qi4j.library.sql.bonecp.BoneCPDataSourceServiceAssembler;
 import org.qi4j.library.sql.common.Databases;
 import org.qi4j.test.EntityTestAssembler;
 
@@ -66,7 +66,7 @@ public class LiquibaseServiceTest
                 // Create in-memory store for configurations
                 new EntityTestAssembler().assemble( configModule );
 
-                new C3P0DataSourceServiceAssembler().
+                new BoneCPDataSourceServiceAssembler().
                     identifiedBy( "datasource-service" ).
                     withConfig( configModule, Visibility.layer ).
                     assemble( module );

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/2ba666fd/libraries/sql/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/sql/build.gradle b/libraries/sql/build.gradle
index d9c62ea..429a7e2 100644
--- a/libraries/sql/build.gradle
+++ b/libraries/sql/build.gradle
@@ -31,7 +31,6 @@ dependencies {
   testCompile(project(":org.qi4j.core:org.qi4j.core.testsupport"))
   testCompile(project(":org.qi4j.core:org.qi4j.core.runtime"))
   testCompile(project(":org.qi4j.libraries:org.qi4j.library.sql-bonecp"))
-  testCompile(project(":org.qi4j.libraries:org.qi4j.library.sql-c3p0"))
   testCompile(project(":org.qi4j.libraries:org.qi4j.library.sql-dbcp"))
   testCompile(project(":org.qi4j.libraries:org.qi4j.library.sql-liquibase"))
   testCompile(project(":org.qi4j.extensions:org.qi4j.extension.entitystore-preferences"))

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/2ba666fd/libraries/sql/src/docs/sql.txt
----------------------------------------------------------------------
diff --git a/libraries/sql/src/docs/sql.txt b/libraries/sql/src/docs/sql.txt
index abbac47..0a1ae64 100644
--- a/libraries/sql/src/docs/sql.txt
+++ b/libraries/sql/src/docs/sql.txt
@@ -42,10 +42,9 @@ include::../../build/docs/buildinfo/artifact.txt[]
 
 == DataSource and connection pools ==
 
-DataSource support comes in four flavors:
+DataSource support comes in three flavors:
 
 - using the http://jolbox.com/[BoneCP] connection pool
-- using the http://sourceforge.net/projects/c3p0/[C3P0] connection pool
 - using the http://commons.apache.org/dbcp/[Apache DBCP] connection pool
 - importing an existing DataSource provided at assembly time
 
@@ -74,21 +73,6 @@ source=libraries/sql/src/test/java/org/qi4j/library/sql/DocumentationSupport.jav
 tag=bonecp
 ----
 
-*C3P0*
-
-[devstatus]
---------------
-source=libraries/sql-c3p0/dev-status.xml
---------------
-
-include::../../../sql-c3p0/build/docs/buildinfo/artifact.txt[]
-
-[snippet,java]
-----
-source=libraries/sql/src/test/java/org/qi4j/library/sql/DocumentationSupport.java
-tag=c3p0
-----
-
 *Apache DBCP*
 
 [devstatus]

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/2ba666fd/libraries/sql/src/test/java/org/qi4j/library/sql/DocumentationSupport.java
----------------------------------------------------------------------
diff --git a/libraries/sql/src/test/java/org/qi4j/library/sql/DocumentationSupport.java b/libraries/sql/src/test/java/org/qi4j/library/sql/DocumentationSupport.java
index bb5fcad..b9ea940 100644
--- a/libraries/sql/src/test/java/org/qi4j/library/sql/DocumentationSupport.java
+++ b/libraries/sql/src/test/java/org/qi4j/library/sql/DocumentationSupport.java
@@ -26,7 +26,6 @@ import org.qi4j.bootstrap.ModuleAssembly;
 import org.qi4j.library.circuitbreaker.CircuitBreaker;
 import org.qi4j.library.sql.assembly.DataSourceAssembler;
 import org.qi4j.library.sql.bonecp.BoneCPDataSourceServiceAssembler;
-import org.qi4j.library.sql.c3p0.C3P0DataSourceServiceAssembler;
 import org.qi4j.library.sql.dbcp.DBCPDataSourceServiceAssembler;
 
 import static org.qi4j.library.sql.DocumentationSupport.Constants.DS_ID;
@@ -88,15 +87,6 @@ class DocumentationSupport
                 assemble( module );
             // END SNIPPET: bonecp
 
-            // START SNIPPET: c3p0
-            // Assemble the C3P0 based Service Importer
-            new C3P0DataSourceServiceAssembler().
-                identifiedBy( DS_SERVICE_ID ).
-                visibleIn( Visibility.module ).
-                withConfig( config, Visibility.layer ).
-                assemble( module );
-            // END SNIPPET: c3p0
-
             // START SNIPPET: dbcp
             // Assemble the Apache DBCP based Service Importer
             new DBCPDataSourceServiceAssembler().

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/2ba666fd/libraries/sql/src/test/java/org/qi4j/library/sql/jmx/DataSourceConfigurationManagerServiceTest.java
----------------------------------------------------------------------
diff --git a/libraries/sql/src/test/java/org/qi4j/library/sql/jmx/DataSourceConfigurationManagerServiceTest.java
b/libraries/sql/src/test/java/org/qi4j/library/sql/jmx/DataSourceConfigurationManagerServiceTest.java
index f06ac2a..261e932 100644
--- a/libraries/sql/src/test/java/org/qi4j/library/sql/jmx/DataSourceConfigurationManagerServiceTest.java
+++ b/libraries/sql/src/test/java/org/qi4j/library/sql/jmx/DataSourceConfigurationManagerServiceTest.java
@@ -34,7 +34,7 @@ import org.qi4j.library.circuitbreaker.CircuitBreaker;
 import org.qi4j.library.jmx.JMXAssembler;
 import org.qi4j.library.sql.assembly.DataSourceAssembler;
 import org.qi4j.library.sql.assembly.DataSourceJMXAssembler;
-import org.qi4j.library.sql.c3p0.C3P0DataSourceServiceAssembler;
+import org.qi4j.library.sql.bonecp.BoneCPDataSourceServiceAssembler;
 import org.qi4j.library.sql.common.Databases;
 import org.qi4j.library.sql.datasource.DataSources;
 import org.qi4j.library.sql.liquibase.LiquibaseConfiguration;
@@ -80,7 +80,7 @@ public class DataSourceConfigurationManagerServiceTest
                 new EntityTestAssembler().visibleIn( Visibility.layer ).assemble( module
);
 
                 // Set up DataSource service that will manage the connection pools
-                new C3P0DataSourceServiceAssembler().identifiedBy( "datasource-service" ).visibleIn(
Visibility.layer ).assemble( module );
+                new BoneCPDataSourceServiceAssembler().identifiedBy( "datasource-service"
).visibleIn( Visibility.layer ).assemble( module );
 
                 {
                     ModuleAssembly testModule = module.layer().module( "TestDS" );

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/2ba666fd/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index 7aed4e9..3243f26 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -55,7 +55,6 @@ include "core:functional",
         'libraries:spring',
         'libraries:sql',
         'libraries:sql-bonecp',
-        'libraries:sql-c3p0',
         'libraries:sql-dbcp',
         'libraries:sql-liquibase',
         'libraries:uid',


Mime
View raw message