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/02/10 16:29:07 UTC

[1/6] syncope git commit: [SYNCOPE-620] glassfish-it

Repository: syncope
Updated Branches:
  refs/heads/2_0_X 8afe6a312 -> a5b5a174d


[SYNCOPE-620] glassfish-it


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/7532362d
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/7532362d
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/7532362d

Branch: refs/heads/2_0_X
Commit: 7532362dd1e72ed2643670be5d0beb47fad5498e
Parents: 8afe6a3
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Tue Feb 10 09:27:32 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Tue Feb 10 09:27:32 2015 +0100

----------------------------------------------------------------------
 .../src/main/webapp/WEB-INF/glassfish-web.xml   | 25 +++++++++++
 .../WEB-INF/jboss-deployment-structure.xml      | 37 ++++++++++++++++
 .../src/main/webapp/WEB-INF/weblogic.xml        | 35 +++++++++++++++
 syncope620/fit/server-reference/pom.xml         | 35 +++++++++++++++
 .../src/main/webapp/WEB-INF/glassfish-web.xml   | 33 ++++++++++++++
 .../WEB-INF/jboss-deployment-structure.xml      | 38 ++++++++++++++++
 .../src/main/webapp/WEB-INF/weblogic.xml        | 46 ++++++++++++++++++++
 7 files changed, 249 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/7532362d/syncope620/fit/console-reference/src/main/webapp/WEB-INF/glassfish-web.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/console-reference/src/main/webapp/WEB-INF/glassfish-web.xml b/syncope620/fit/console-reference/src/main/webapp/WEB-INF/glassfish-web.xml
new file mode 100644
index 0000000..6400bc2
--- /dev/null
+++ b/syncope620/fit/console-reference/src/main/webapp/WEB-INF/glassfish-web.xml
@@ -0,0 +1,25 @@
+<?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.
+
+-->
+<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD 
+GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
+<glassfish-web-app error-url="">
+  <class-loader delegate="false"/>
+</glassfish-web-app>

http://git-wip-us.apache.org/repos/asf/syncope/blob/7532362d/syncope620/fit/console-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/console-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/syncope620/fit/console-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
new file mode 100644
index 0000000..f38ebfc
--- /dev/null
+++ b/syncope620/fit/console-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
@@ -0,0 +1,37 @@
+<?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.
+-->
+<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
+  <deployment>
+    <exclude-subsystems>
+      <subsystem name="webservices"/>
+      <subsystem name="jaxrs"/>
+    </exclude-subsystems>
+    <dependencies>
+      <module name="org.apache.xalan"/>
+    </dependencies>
+    <exclusions>
+      <module name="javax.ws.rs.api"/>
+      <module name="org.apache.cxf"/>
+      <module name="org.apache.cxf.impl"/>
+      <module name="org.slf4j"/>
+      <module name="org.slf4j.impl"/>
+    </exclusions>
+  </deployment>
+</jboss-deployment-structure>

http://git-wip-us.apache.org/repos/asf/syncope/blob/7532362d/syncope620/fit/console-reference/src/main/webapp/WEB-INF/weblogic.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/console-reference/src/main/webapp/WEB-INF/weblogic.xml b/syncope620/fit/console-reference/src/main/webapp/WEB-INF/weblogic.xml
new file mode 100644
index 0000000..6e6bd30
--- /dev/null
+++ b/syncope620/fit/console-reference/src/main/webapp/WEB-INF/weblogic.xml
@@ -0,0 +1,35 @@
+<?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.
+-->
+<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app" 
+                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+                  xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app
+                                      http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
+
+  <context-root>syncope-console</context-root>
+  
+  <container-descriptor>    
+    <prefer-application-packages>
+      <package-name>org.apache.commons.*</package-name>
+      <package-name>org.slf4j.*</package-name>
+      <package-name>com.fasterxml.jackson.*</package-name>
+    </prefer-application-packages>
+  </container-descriptor>
+
+</weblogic-web-app>

http://git-wip-us.apache.org/repos/asf/syncope/blob/7532362d/syncope620/fit/server-reference/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/server-reference/pom.xml b/syncope620/fit/server-reference/pom.xml
index 2b99939..8262268 100644
--- a/syncope620/fit/server-reference/pom.xml
+++ b/syncope620/fit/server-reference/pom.xml
@@ -515,6 +515,41 @@ under the License.
     </profile>
     
     <profile>
+      <id>glassfish-it</id>
+
+      <dependencies>
+        <dependency>
+          <groupId>com.h2database</groupId>
+          <artifactId>h2</artifactId>
+        </dependency>
+      </dependencies>
+
+      <build>
+        <defaultGoal>clean verify</defaultGoal>
+
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.cargo</groupId>
+            <artifactId>cargo-maven2-plugin</artifactId>
+            <inherited>true</inherited>
+            <configuration>
+              <container>
+                <containerId>glassfish4x</containerId>
+                <zipUrlInstaller>
+                  <url>http://download.java.net/glassfish/4.1/release/glassfish-4.1.zip</url>
+                  <downloadDir>${settings.localRepository}/org/codehaus/cargo/cargo-container-archives</downloadDir>
+                  <extractDir>${project.build.directory}/cargo/extract</extractDir>
+                </zipUrlInstaller>
+                <log>${cargo.log}</log>
+                <output>${cargo.output}</output>
+              </container>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    
+    <profile>
       <id>debug</id>
 
       <properties>

http://git-wip-us.apache.org/repos/asf/syncope/blob/7532362d/syncope620/fit/server-reference/src/main/webapp/WEB-INF/glassfish-web.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/server-reference/src/main/webapp/WEB-INF/glassfish-web.xml b/syncope620/fit/server-reference/src/main/webapp/WEB-INF/glassfish-web.xml
new file mode 100644
index 0000000..ab6a9bf
--- /dev/null
+++ b/syncope620/fit/server-reference/src/main/webapp/WEB-INF/glassfish-web.xml
@@ -0,0 +1,33 @@
+<?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.
+-->
+<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD 
+GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
+<glassfish-web-app>
+  <context-root>/syncope</context-root>
+  <!-- Uncomment this when using JNDI DataSource -->
+  <!--<resource-ref>
+    <res-ref-name>jdbc/syncopeDataSource</res-ref-name>
+    <jndi-name>jdbc/syncopeDataSource</jndi-name>
+  </resource-ref>-->
+  <class-loader delegate="false"/>
+  <jsp-config>
+    <property name="httpMethods" value="GET,POST,HEAD,PUT,DELETE"/>
+  </jsp-config>
+</glassfish-web-app>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/7532362d/syncope620/fit/server-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/server-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/syncope620/fit/server-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
new file mode 100644
index 0000000..f47298d
--- /dev/null
+++ b/syncope620/fit/server-reference/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
@@ -0,0 +1,38 @@
+<?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.
+-->
+<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
+  <deployment>
+    <exclude-subsystems>
+      <subsystem name="webservices"/>
+      <subsystem name="jaxrs"/>
+    </exclude-subsystems>
+    <dependencies>
+      <module name="org.apache.xalan"/>
+    </dependencies>
+    <exclusions>
+      <module name="javax.ws.rs.api"/>
+      <module name="org.apache.cxf"/>
+      <module name="org.apache.cxf.impl"/>
+      <module name="org.hibernate"/>
+      <module name="org.slf4j"/>
+      <module name="org.slf4j.impl"/>
+    </exclusions>
+  </deployment>
+</jboss-deployment-structure>

http://git-wip-us.apache.org/repos/asf/syncope/blob/7532362d/syncope620/fit/server-reference/src/main/webapp/WEB-INF/weblogic.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/server-reference/src/main/webapp/WEB-INF/weblogic.xml b/syncope620/fit/server-reference/src/main/webapp/WEB-INF/weblogic.xml
new file mode 100644
index 0000000..6eeb9c2
--- /dev/null
+++ b/syncope620/fit/server-reference/src/main/webapp/WEB-INF/weblogic.xml
@@ -0,0 +1,46 @@
+<?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.
+-->
+<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app" 
+                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+                  xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app
+                                      http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
+
+  <context-root>syncope</context-root>
+  
+  <container-descriptor>    
+    <prefer-application-packages>
+      <package-name>javax.ws.rs.*</package-name>
+      <package-name>javax.validation.*</package-name>
+      <package-name>org.hibernate.validator.*</package-name>
+      <package-name>org.apache.cxf.*</package-name>
+      <package-name>org.apache.commons.*</package-name>
+      <package-name>org.apache.openjpa.*</package-name>
+      <package-name>org.slf4j.*</package-name>
+      <package-name>org.apache.logging.log4j.*</package-name>
+      <package-name>com.fasterxml.jackson.*</package-name>
+    </prefer-application-packages>
+  </container-descriptor>
+
+  <!-- Uncomment this when using JNDI DataSource -->
+  <!--<resource-description>
+    <jndi-name>syncopeDataSource</jndi-name>
+    <res-ref-name>jdbc/syncopeDataSource</res-ref-name>
+  </resource-description>-->
+</weblogic-web-app>


[4/6] syncope git commit: Merge branch 'master' into 2_0_X

Posted by il...@apache.org.
Merge branch 'master' into 2_0_X


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/4febe5e4
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/4febe5e4
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/4febe5e4

Branch: refs/heads/2_0_X
Commit: 4febe5e438ad359528a3a481dd4aea653cdb1b4d
Parents: 7532362 e777d5b
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Tue Feb 10 13:07:40 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Tue Feb 10 13:07:40 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/syncope/core/util/ContentLoaderHandler.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[3/6] syncope git commit: Merge branch '1_2_X'

Posted by il...@apache.org.
Merge branch '1_2_X'


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/e777d5ba
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/e777d5ba
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/e777d5ba

Branch: refs/heads/2_0_X
Commit: e777d5babde5912dc991cd1888da7636c81a2ad2
Parents: aba10ec 1ef6896
Author: Guido Wimmel <gw...@apache.org>
Authored: Tue Feb 10 10:57:38 2015 +0100
Committer: Guido Wimmel <gw...@apache.org>
Committed: Tue Feb 10 10:57:38 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/syncope/core/util/ContentLoaderHandler.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/e777d5ba/core/src/main/java/org/apache/syncope/core/util/ContentLoaderHandler.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/syncope/core/util/ContentLoaderHandler.java
index ccf2e86,3b5a409..263ea24
--- a/core/src/main/java/org/apache/syncope/core/util/ContentLoaderHandler.java
+++ b/core/src/main/java/org/apache/syncope/core/util/ContentLoaderHandler.java
@@@ -54,19 -54,19 +54,19 @@@ public class ContentLoaderHandler exten
      private Object[] getParameters(final String tableName, final Attributes attrs) {
          JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
  
-         Map<String, Integer> colTypes = jdbcTemplate.query("SELECT * FROM " + tableName,
+         Map<String, Integer> colTypes = jdbcTemplate.query("SELECT * FROM " + tableName + " WHERE 0=1",
                  new ResultSetExtractor<Map<String, Integer>>() {
  
 -            @Override
 -            public Map<String, Integer> extractData(final ResultSet rs) throws SQLException, DataAccessException {
 -                Map<String, Integer> colTypes = new HashMap<String, Integer>();
 -                for (int i = 1; i <= rs.getMetaData().getColumnCount(); i++) {
 -                    colTypes.put(rs.getMetaData().getColumnName(i).toUpperCase(),
 -                            rs.getMetaData().getColumnType(i));
 -                }
 -                return colTypes;
 -            }
 -        });
 +                    @Override
 +                    public Map<String, Integer> extractData(final ResultSet rs) throws SQLException, DataAccessException {
 +                        Map<String, Integer> colTypes = new HashMap<String, Integer>();
 +                        for (int i = 1; i <= rs.getMetaData().getColumnCount(); i++) {
 +                            colTypes.put(rs.getMetaData().getColumnName(i).toUpperCase(),
 +                                    rs.getMetaData().getColumnType(i));
 +                        }
 +                        return colTypes;
 +                    }
 +                });
  
          Object[] parameters = new Object[attrs.getLength()];
          for (int i = 0; i < attrs.getLength(); i++) {


[6/6] syncope git commit: [SYNCOPE-620] jboss-it

Posted by il...@apache.org.
[SYNCOPE-620] jboss-it


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/a5b5a174
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/a5b5a174
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/a5b5a174

Branch: refs/heads/2_0_X
Commit: a5b5a174d9ba813c5facb496c6889db2d352c205
Parents: 75902df
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Tue Feb 10 16:26:27 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Tue Feb 10 16:26:27 2015 +0100

----------------------------------------------------------------------
 syncope620/fit/server-reference/pom.xml         | 120 +++++++++++++++++++
 .../jboss/persistenceContextEMFactory.xml       |  67 +++++++++++
 .../src/main/resources/persistenceContext.xml   |   2 +-
 3 files changed, 188 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/a5b5a174/syncope620/fit/server-reference/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/server-reference/pom.xml b/syncope620/fit/server-reference/pom.xml
index 8262268..8ae2b56 100644
--- a/syncope620/fit/server-reference/pom.xml
+++ b/syncope620/fit/server-reference/pom.xml
@@ -550,6 +550,126 @@ under the License.
     </profile>
     
     <profile>
+      <id>jboss-it</id>
+
+      <dependencies>
+        <dependency>
+          <groupId>com.h2database</groupId>
+          <artifactId>h2</artifactId>
+        </dependency>
+        
+        <dependency>
+          <groupId>org.apache.syncope.ext.camel</groupId>
+          <artifactId>syncope-ext-camel-persistence-jpa</artifactId>
+          <version>${project.version}</version>
+        </dependency>
+      </dependencies>
+
+      <build>
+        <defaultGoal>clean verify</defaultGoal>
+
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-war-plugin</artifactId>
+            <configuration>
+              <packagingExcludes>WEB-INF/lib/syncope-*-persistence-jpa-${project.version}.jar</packagingExcludes>
+            </configuration>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-dependency-plugin</artifactId>
+            <inherited>true</inherited>
+            <executions>
+              <execution>
+                <id>unpack-jpa-entities</id>
+                <phase>process-resources</phase>
+                <goals>
+                  <goal>unpack</goal>
+                </goals>
+                <configuration>
+                  <artifactItems>
+                    <artifactItem>
+                      <groupId>org.apache.syncope.server</groupId>
+                      <artifactId>syncope-server-persistence-jpa</artifactId>
+                      <version>${project.version}</version>
+                      <type>jar</type>
+                      <overWrite>false</overWrite>
+                    </artifactItem>
+                    <artifactItem>
+                      <groupId>org.apache.syncope.ext.camel</groupId>
+                      <artifactId>syncope-ext-camel-persistence-jpa</artifactId>
+                      <version>${project.version}</version>
+                      <type>jar</type>
+                      <overWrite>false</overWrite>
+                    </artifactItem>
+                  </artifactItems>
+                  <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <inherited>true</inherited>
+            <executions>
+              <execution>
+                <id>remove-jpa-jar</id>
+                <phase>package</phase>
+                <configuration>
+                  <target>
+                    <delete> 
+                      <fileset dir="${project.build.directory}/${project.build.finalName}/WEB-INF/lib"
+                               includes="syncope-*-persistence-jpa-${project.version}.jar"/>
+                    </delete>
+                  </target>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+
+          <plugin>
+            <groupId>org.codehaus.cargo</groupId>
+            <artifactId>cargo-maven2-plugin</artifactId>
+            <inherited>true</inherited>
+            <configuration>
+              <container>
+                <containerId>wildfly8x</containerId>
+                <zipUrlInstaller>
+                  <url>http://download.jboss.org/wildfly/8.2.0.Final/wildfly-8.2.0.Final.zip</url>
+                  <downloadDir>${settings.localRepository}/org/codehaus/cargo/cargo-container-archives</downloadDir>
+                  <extractDir>${project.build.directory}/cargo/extract</extractDir>
+                </zipUrlInstaller>
+                <log>${cargo.log}</log>
+                <output>${cargo.output}</output>
+              </container>
+              <configuration>
+                <properties>
+                  <cargo.jvmargs>-Xms1024m -Xmx2048m -XX:PermSize=512m -XX:MaxPermSize=1024m -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled</cargo.jvmargs>
+                </properties>
+              </configuration>
+            </configuration>            
+          </plugin>
+        </plugins>
+
+        <resources>
+          <resource>
+            <directory>src/main/resources</directory>
+            <filtering>true</filtering>
+          </resource>
+          <resource>
+            <directory>src/main/resources/jboss</directory>
+            <filtering>true</filtering>
+          </resource>
+        </resources>
+      </build>
+    </profile>
+
+    <profile>
       <id>debug</id>
 
       <properties>

http://git-wip-us.apache.org/repos/asf/syncope/blob/a5b5a174/syncope620/fit/server-reference/src/main/resources/jboss/persistenceContextEMFactory.xml
----------------------------------------------------------------------
diff --git a/syncope620/fit/server-reference/src/main/resources/jboss/persistenceContextEMFactory.xml b/syncope620/fit/server-reference/src/main/resources/jboss/persistenceContextEMFactory.xml
new file mode 100644
index 0000000..03588bc
--- /dev/null
+++ b/syncope620/fit/server-reference/src/main/resources/jboss/persistenceContextEMFactory.xml
@@ -0,0 +1,67 @@
+<?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="persistenceXmlLocation" value="classpath*:META-INF/spring-persistence.xml"/>
+    <property name="persistenceUnitName" value="syncopePersistenceUnit"/>
+    <property name="persistenceUnitPostProcessors">
+      <list>
+        <bean class="org.apache.syncope.server.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=META-INF/orm.xml)"/>
+      </map>
+    </property>
+  </bean>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/syncope/blob/a5b5a174/syncope620/server/persistence-jpa/src/main/resources/persistenceContext.xml
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-jpa/src/main/resources/persistenceContext.xml b/syncope620/server/persistence-jpa/src/main/resources/persistenceContext.xml
index 60b9940..7a8e3b9 100644
--- a/syncope620/server/persistence-jpa/src/main/resources/persistenceContext.xml
+++ b/syncope620/server/persistence-jpa/src/main/resources/persistenceContext.xml
@@ -32,7 +32,7 @@ under the License.
                            http://www.springframework.org/schema/util/spring-util.xsd">
 
   
-  <import resource="persistenceContextEMFactory.xml"/>
+  <import resource="classpath:persistenceContextEMFactory.xml"/>
 
   <bean id="nonJPAdbInitializer" class="org.springframework.jdbc.datasource.init.DataSourceInitializer">
     <property name="dataSource" ref="dataSource"/>


[5/6] syncope git commit: [SYNCOPE-620] Merge for SYNCOPE-634

Posted by il...@apache.org.
[SYNCOPE-620] Merge for SYNCOPE-634


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/75902df9
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/75902df9
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/75902df9

Branch: refs/heads/2_0_X
Commit: 75902df94df9cc6c9f1bb51280b258b69c89bcc1
Parents: 4febe5e
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Tue Feb 10 13:32:14 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Tue Feb 10 13:32:14 2015 +0100

----------------------------------------------------------------------
 .../server/persistence/jpa/content/ContentLoaderHandler.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/75902df9/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/content/ContentLoaderHandler.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/content/ContentLoaderHandler.java b/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/content/ContentLoaderHandler.java
index 27be00a..4e0acfc 100644
--- a/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/content/ContentLoaderHandler.java
+++ b/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/content/ContentLoaderHandler.java
@@ -56,12 +56,14 @@ class ContentLoaderHandler extends DefaultHandler {
     private Object[] getParameters(final String tableName, final Attributes attrs) {
         JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
 
-        Map<String, Integer> colTypes = jdbcTemplate.query("SELECT * FROM " + tableName,
+        Map<String, Integer> colTypes = jdbcTemplate.query("SELECT * FROM " + tableName + " WHERE 0=1",
                 new ResultSetExtractor<Map<String, Integer>>() {
 
                     @Override
-                    public Map<String, Integer> extractData(final ResultSet rs) throws SQLException, DataAccessException {
-                        Map<String, Integer> colTypes = new HashMap<String, Integer>();
+                    public Map<String, Integer> extractData(final ResultSet rs)
+                    throws SQLException, DataAccessException {
+
+                        Map<String, Integer> colTypes = new HashMap<>();
                         for (int i = 1; i <= rs.getMetaData().getColumnCount(); i++) {
                             colTypes.put(rs.getMetaData().getColumnName(i).toUpperCase(),
                                     rs.getMetaData().getColumnType(i));


[2/6] syncope git commit: [SYNCOPE-634] performance optimization for content loading

Posted by il...@apache.org.
[SYNCOPE-634] performance optimization for content loading


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/1ef68962
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/1ef68962
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/1ef68962

Branch: refs/heads/2_0_X
Commit: 1ef68962f561a6046e0f3d77e6908ee94cd3b433
Parents: 128e0c5
Author: Guido Wimmel <gw...@apache.org>
Authored: Tue Feb 10 10:33:22 2015 +0100
Committer: Guido Wimmel <gw...@apache.org>
Committed: Tue Feb 10 10:33:22 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/syncope/core/util/ContentLoaderHandler.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/1ef68962/core/src/main/java/org/apache/syncope/core/util/ContentLoaderHandler.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/util/ContentLoaderHandler.java b/core/src/main/java/org/apache/syncope/core/util/ContentLoaderHandler.java
index ea54a90..3b5a409 100644
--- a/core/src/main/java/org/apache/syncope/core/util/ContentLoaderHandler.java
+++ b/core/src/main/java/org/apache/syncope/core/util/ContentLoaderHandler.java
@@ -54,7 +54,7 @@ public class ContentLoaderHandler extends DefaultHandler {
     private Object[] getParameters(final String tableName, final Attributes attrs) {
         JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
 
-        Map<String, Integer> colTypes = jdbcTemplate.query("SELECT * FROM " + tableName,
+        Map<String, Integer> colTypes = jdbcTemplate.query("SELECT * FROM " + tableName + " WHERE 0=1",
                 new ResultSetExtractor<Map<String, Integer>>() {
 
             @Override