You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2015/08/28 16:33:55 UTC
[3/3] syncope git commit: Preliminary changes for SYNCOPE-689
Preliminary changes for SYNCOPE-689
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/9658f8c3
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/9658f8c3
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/9658f8c3
Branch: refs/heads/master
Commit: 9658f8c384543889779cd2c398c8fcc115b43778
Parents: 716e2ed
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Fri Aug 28 16:27:30 2015 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Fri Aug 28 16:27:30 2015 +0200
----------------------------------------------------------------------
fit/core-reference/pom.xml | 10 +-
.../resources/jboss/domains/MasterDomain.xml | 131 +++++++++++++++++++
.../jboss/persistenceContextEMFactory.xml | 73 -----------
.../WEB-INF/jboss-deployment-structure.xml | 2 +
pom.xml | 2 +-
5 files changed, 142 insertions(+), 76 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/9658f8c3/fit/core-reference/pom.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/pom.xml b/fit/core-reference/pom.xml
index 2e65089..d9d9227 100644
--- a/fit/core-reference/pom.xml
+++ b/fit/core-reference/pom.xml
@@ -560,6 +560,12 @@ under the License.
<dependencies>
<dependency>
+ <groupId>javax.xml.ws</groupId>
+ <artifactId>jaxws-api</artifactId>
+ <version>2.2.11</version>
+ </dependency>
+
+ <dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
@@ -644,9 +650,9 @@ under the License.
<inherited>true</inherited>
<configuration>
<container>
- <containerId>wildfly8x</containerId>
+ <containerId>wildfly9x</containerId>
<zipUrlInstaller>
- <url>http://download.jboss.org/wildfly/8.2.0.Final/wildfly-8.2.0.Final.zip</url>
+ <url>http://download.jboss.org/wildfly/9.0.1.Final/wildfly-9.0.1.Final.zip</url>
<downloadDir>${settings.localRepository}/org/codehaus/cargo/cargo-container-archives</downloadDir>
<extractDir>${project.build.directory}/cargo/extract</extractDir>
</zipUrlInstaller>
http://git-wip-us.apache.org/repos/asf/syncope/blob/9658f8c3/fit/core-reference/src/main/resources/jboss/domains/MasterDomain.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/resources/jboss/domains/MasterDomain.xml b/fit/core-reference/src/main/resources/jboss/domains/MasterDomain.xml
new file mode 100644
index 0000000..35eacdc
--- /dev/null
+++ b/fit/core-reference/src/main/resources/jboss/domains/MasterDomain.xml
@@ -0,0 +1,131 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:tx="http://www.springframework.org/schema/tx"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/tx
+ http://www.springframework.org/schema/tx/spring-tx.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util.xsd">
+
+ <bean id="MasterContentXML" class="org.apache.syncope.core.misc.spring.ResourceWithFallbackLoader">
+ <property name="primary" value="file:${content.directory}/domains/MasterContent.xml"/>
+ <property name="fallback" value="classpath:domains/MasterContent.xml"/>
+ </bean>
+ <bean id="MasterProperties" class="org.apache.syncope.core.misc.spring.ResourceWithFallbackLoader">
+ <property name="primary" value="file:${content.directory}/domains/Master.properties"/>
+ <property name="fallback" value="classpath:domains/Master.properties"/>
+ </bean>
+ <bean id="MasterDatabaseSchema" class="java.lang.String">
+ <constructor-arg value="${Master.schema}"/>
+ </bean>
+
+ <!-- Use JNDI datasource as default but, when not available, revert to
+ local datasource, with different properties for execution and testing.
+ In any case, get all JDBC connections with a determined isolation level. -->
+ <bean id="MasterDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
+ <property name="jndiName" value="java:comp/env/jdbc/syncopeMasterDataSource"/>
+ <property name="defaultObject" ref="localMasterDataSource"/>
+ </bean>
+
+ <bean id="localMasterDataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close">
+ <property name="driverClassName" value="${Master.driverClassName}"/>
+ <property name="url" value="${Master.url}"/>
+ <property name="username" value="${Master.username}"/>
+ <property name="password" value="${Master.password}"/>
+ <!-- connection pool configuration - transaction isolation, default READ_COMMITTED (see SYNCOPE-202) -->
+ <property name="defaultTransactionIsolation">
+ <util:constant static-field="${Master.pool.defaultTransactionIsolation:java.sql.Connection.TRANSACTION_READ_COMMITTED}"/>
+ </property>
+ <!-- connection pool configuration - default values taken from BasicDataSource default values -->
+ <property name="initialSize" value="${Master.pool.initialSize:0}"/>
+ <property name="maxTotal" value="${Master.pool.maxActive:8}"/>
+ <property name="maxIdle" value="${Master.pool.maxIdle:8}"/>
+ <property name="minIdle" value="${Master.pool.minIdle:0}"/>
+ <property name="maxWaitMillis" value="${Master.pool.maxWait:-1}"/>
+ <property name="validationQuery" value="${Master.pool.validationQuery}"/>
+ <property name="validationQueryTimeout" value="${Master.pool.validationQueryTimeout:-1}"/>
+ <property name="testOnBorrow" value="${Master.pool.testOnBorrow:true}"/>
+ <property name="testOnReturn" value="${Master.pool.testOnReturn:false}"/>
+ <property name="testWhileIdle" value="${Master.pool.testWhileIdle:false}"/>
+ <property name="timeBetweenEvictionRunsMillis" value="${Master.pool.timeBetweenEvictionRunsMillis:-1}"/>
+ <property name="numTestsPerEvictionRun" value="${Master.pool.numTestsPerEvictionRun:3}"/>
+ <property name="minEvictableIdleTimeMillis" value="${Master.pool.minEvictableIdleTimeMillis:1800000}"/>
+ <property name="removeAbandonedOnBorrow" value="${Master.pool.removeAbandoned:false}"/>
+ <property name="removeAbandonedOnMaintenance" value="${Master.pool.removeAbandoned:false}"/>
+ <property name="removeAbandonedTimeout" value="${Master.pool.removeAbandonedTimeout:300}"/>
+ <property name="logAbandoned" value="${Master.pool.logAbandoned:false}"/>
+ </bean>
+
+ <bean class="org.springframework.jdbc.datasource.init.DataSourceInitializer">
+ <property name="dataSource" ref="MasterDataSource"/>
+ <property name="enabled" value="true"/>
+ <property name="databasePopulator">
+ <bean class="org.springframework.jdbc.datasource.init.ResourceDatabasePopulator">
+ <property name="continueOnError" value="true"/>
+ <property name="ignoreFailedDrops" value="true"/>
+ <property name="sqlScriptEncoding" value="UTF-8"/>
+ <property name="scripts">
+ <array>
+ <value type="org.springframework.core.io.Resource">
+ classpath:/audit/${Master.audit.sql}
+ </value>
+ </array>
+ </property>
+ </bean>
+ </property>
+ </bean>
+
+ <bean id="MasterEntityManagerFactory"
+ class="org.apache.syncope.core.persistence.jpa.spring.DomainEntityManagerFactoryBean">
+ <property name="mappingResources">
+ <list>
+ <value>${Master.orm}</value>
+ </list>
+ </property>
+ <property name="persistenceUnitName" value="Master"/>
+ <property name="dataSource" ref="MasterDataSource"/>
+ <property name="jpaVendorAdapter">
+ <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter">
+ <property name="showSql" value="false"/>
+ <property name="generateDdl" value="true"/>
+ <property name="databasePlatform" value="${Master.databasePlatform}"/>
+ </bean>
+ </property>
+ <property name="commonEntityManagerFactoryConf" ref="commonEMFConf"/>
+ <property name="jpaPropertyMap">
+ <map>
+ <entry key="openjpa.MetaDataFactory"
+ value="jpa(URLs=vfs:${project.build.directory}/cargo/configurations/wildfly8x/deployments/syncope.war/WEB-INF/classes, Resources=${Master.orm)"/>
+ </map>
+ </property>
+ </bean>
+
+ <bean id="MasterTransactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
+ <property name="entityManagerFactory" ref="MasterEntityManagerFactory"/>
+ <qualifier value="Master"/>
+ </bean>
+
+ <tx:annotation-driven transaction-manager="MasterTransactionManager"/>
+
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/9658f8c3/fit/core-reference/src/main/resources/jboss/persistenceContextEMFactory.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/resources/jboss/persistenceContextEMFactory.xml b/fit/core-reference/src/main/resources/jboss/persistenceContextEMFactory.xml
deleted file mode 100644
index 889400a..0000000
--- a/fit/core-reference/src/main/resources/jboss/persistenceContextEMFactory.xml
+++ /dev/null
@@ -1,73 +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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd">
-
- <bean id="entityManagerFactory"
- class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
- <property name="packagesToScan" value="org.apache.syncope.core.persistence.jpa.entity"/>
- <property name="validationMode" value="NONE"/>
- <property name="mappingResources">
- <list>
- <value>${jpa.orm}</value>
- </list>
- </property>
- <property name="persistenceUnitName" value="syncopePersistenceUnit"/>
- <property name="persistenceUnitPostProcessors">
- <list>
- <bean class="org.apache.syncope.core.persistence.jpa.spring.MultiJarAwarePersistenceUnitPostProcessor"/>
- </list>
- </property>
- <property name="dataSource" ref="dataSource"/>
- <property name="jpaVendorAdapter">
- <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter">
- <property name="showSql" value="false"/>
- <property name="generateDdl" value="true"/>
- <property name="databasePlatform" value="${jpa.dialect}"/>
- </bean>
- </property>
- <property name="jpaPropertyMap">
- <map>
- <!--<entry key="openjpa.Log" value="SQL=TRACE"/>
- <entry key="openjpa.ConnectionFactoryProperties" value="PrettyPrint=true, PrettyPrintLineLength=80"/>-->
-
- <entry key="openjpa.NontransactionalWrite" value="false"/>
- <entry key="openjpa.AutoDetach" value="close, commit, nontx-read, rollback"/>
-
- <entry key="openjpa.jdbc.SchemaFactory" value="native(ForeignKeys=true)"/>
- <entry key="openjpa.jdbc.MappingDefaults" value="ForeignKeyDeleteAction=restrict, JoinForeignKeyDeleteAction=restrict"/>
-
- <entry key="openjpa.ReadLockLevel" value="none"/>
- <entry key="openjpa.WriteLockLevel" value="write"/>
- <entry key="openjpa.LockTimeout" value="30000"/>
-
- <entry key="openjpa.DataCache" value="true" />
- <entry key="openjpa.QueryCache" value="true"/>
- <entry key="openjpa.RemoteCommitProvider" value="sjvm"/>
-
- <entry key="openjpa.MetaDataFactory"
- value="jpa(URLs=vfs:${project.build.directory}/cargo/configurations/wildfly8x/deployments/syncope.war/WEB-INF/classes, Resources=${jpa.orm})"/>
- </map>
- </property>
- </bean>
-
-</beans>
http://git-wip-us.apache.org/repos/asf/syncope/blob/9658f8c3/fit/core-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/fit/core-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
index f47298d..8f753d9 100644
--- a/fit/core-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
+++ b/fit/core-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
@@ -33,6 +33,8 @@ under the License.
<module name="org.hibernate"/>
<module name="org.slf4j"/>
<module name="org.slf4j.impl"/>
+ <module name="org.apache.log4j"/>
+ <module name="org.jboss.log4j.logmanager"/>
</exclusions>
</deployment>
</jboss-deployment-structure>
http://git-wip-us.apache.org/repos/asf/syncope/blob/9658f8c3/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 3b2a66f..a61c8c8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -320,7 +320,7 @@ under the License.
<syncope.version>${project.version}</syncope.version>
<connid.version>1.4.1.0</connid.version>
- <connid.soap.version>1.3.0</connid.soap.version>
+ <connid.soap.version>1.4.0-SNAPSHOT</connid.soap.version>
<connid.database.version>2.2.3-SNAPSHOT</connid.database.version>
<connid.csvdir.version>0.8.2</connid.csvdir.version>
<connid.ldap.version>1.4.0</connid.ldap.version>