syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject svn commit: r1450847 - in /syncope/trunk: build-tools/pom.xml build-tools/src/main/java/org/apache/syncope/buildtools/H2StartStopListener.java core/src/test/resources/persistence.properties standalone/pom.xml
Date Wed, 27 Feb 2013 17:06:14 GMT
Author: ilgrosso
Date: Wed Feb 27 17:06:13 2013
New Revision: 1450847

URL: http://svn.apache.org/r1450847
Log:
[SYNCOPE-327] Fixing messages related to JDBC

Modified:
    syncope/trunk/build-tools/pom.xml
    syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/H2StartStopListener.java
    syncope/trunk/core/src/test/resources/persistence.properties
    syncope/trunk/standalone/pom.xml

Modified: syncope/trunk/build-tools/pom.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/build-tools/pom.xml?rev=1450847&r1=1450846&r2=1450847&view=diff
==============================================================================
--- syncope/trunk/build-tools/pom.xml (original)
+++ syncope/trunk/build-tools/pom.xml Wed Feb 27 17:06:13 2013
@@ -16,7 +16,6 @@ software distributed under the License i
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
-
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
@@ -78,6 +77,7 @@ under the License.
     <dependency>
       <groupId>com.h2database</groupId>
       <artifactId>h2</artifactId>
+      <scope>provided</scope>
     </dependency>
 
     <dependency>

Modified: syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/H2StartStopListener.java
URL: http://svn.apache.org/viewvc/syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/H2StartStopListener.java?rev=1450847&r1=1450846&r2=1450847&view=diff
==============================================================================
--- syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/H2StartStopListener.java
(original)
+++ syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/H2StartStopListener.java
Wed Feb 27 17:06:13 2013
@@ -34,8 +34,7 @@ import org.springframework.web.context.W
 import org.springframework.web.context.support.WebApplicationContextUtils;
 
 /**
- * Utility serlvet context listener managing H2 test server instance (to be used
- * as external resource).
+ * Utility serlvet context listener managing H2 test server instance (to be used as external
resource).
  */
 public class H2StartStopListener implements ServletContextListener {
 
@@ -48,11 +47,11 @@ public class H2StartStopListener impleme
 
     @Override
     public void contextInitialized(final ServletContextEvent sce) {
-        ServletContext context = sce.getServletContext();
+        final ServletContext context = sce.getServletContext();
 
-        File workDir = (File) sce.getServletContext().getAttribute("javax.servlet.context.tempdir");
+        final File workDir = (File) sce.getServletContext().getAttribute("javax.servlet.context.tempdir");
         try {
-            Server h2TestDb = new Server();
+            final Server h2TestDb = new Server();
             h2TestDb.runTool("-baseDir", workDir.getAbsolutePath(), "-tcp", "-tcpDaemon",
"-web", "-webDaemon",
                     "-webPort", sce.getServletContext().getInitParameter("testdb.webport"));
 
@@ -61,8 +60,8 @@ public class H2StartStopListener impleme
             LOG.error("Could not start H2 test db", e);
         }
 
-        WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(context);
-        DataSource datasource = ctx.getBean(DataSource.class);
+        final WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(context);
+        final DataSource datasource = ctx.getBean(DataSource.class);
 
         Connection conn = null;
         Statement stmt = null;
@@ -91,9 +90,9 @@ public class H2StartStopListener impleme
 
     @Override
     public void contextDestroyed(final ServletContextEvent sce) {
-        ServletContext context = sce.getServletContext();
+        final ServletContext context = sce.getServletContext();
 
-        Server h2TestDb = (Server) context.getAttribute(H2_TESTDB);
+        final Server h2TestDb = (Server) context.getAttribute(H2_TESTDB);
         if (h2TestDb != null) {
             h2TestDb.shutdown();
         }

Modified: syncope/trunk/core/src/test/resources/persistence.properties
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/resources/persistence.properties?rev=1450847&r1=1450846&r2=1450847&view=diff
==============================================================================
--- syncope/trunk/core/src/test/resources/persistence.properties (original)
+++ syncope/trunk/core/src/test/resources/persistence.properties Wed Feb 27 17:06:13 2013
@@ -15,10 +15,10 @@
 # specific language governing permissions and limitations
 # under the License.
 jpa.driverClassName=org.h2.Driver
-jpa.url=jdbc:h2:mem:syncopedb;DB_CLOSE_DELAY=1000
+jpa.url=jdbc:h2:mem:syncopedb;DB_CLOSE_DELAY=-1
 jpa.username=sa
 jpa.password=
 jpa.dialect=org.apache.openjpa.jdbc.sql.H2Dictionary
 quartz.jobstore=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
 quartz.sql=tables_h2.sql
-logback.sql=h2.sql
\ No newline at end of file
+logback.sql=h2.sql

Modified: syncope/trunk/standalone/pom.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/standalone/pom.xml?rev=1450847&r1=1450846&r2=1450847&view=diff
==============================================================================
--- syncope/trunk/standalone/pom.xml (original)
+++ syncope/trunk/standalone/pom.xml Wed Feb 27 17:06:13 2013
@@ -116,9 +116,12 @@ under the License.
                 <copy file="${settings.localRepository}/org/codehaus/groovy/groovy-all/${groovy.version}/groovy-all-${groovy.version}.jar"
                       todir="${work.dir}/apache-tomcat-${tomcat.version}/lib"/>
                 
+                <copy file="../core/target/test-classes/context.xml"
+                      todir="${work.dir}/apache-tomcat-${tomcat.version}/conf" overwrite="true"/>
+                
                 <copy file="src/main/resources/setenv.sh"
-                      todir="${work.dir}/apache-tomcat-${tomcat.version}/bin"/>
-				<copy file="src/main/resources/setenv.bat"
+                    todir="${work.dir}/apache-tomcat-${tomcat.version}/bin"/>
+                <copy file="src/main/resources/setenv.bat"
                       todir="${work.dir}/apache-tomcat-${tomcat.version}/bin"/>
                 <replace file="${work.dir}/apache-tomcat-${tomcat.version}/conf/server.xml"

                          token="8080" value="${cargo.servlet.port}"/>



Mime
View raw message