geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r641918 - in /geronimo/sandbox/concurrent/concurrent-tests: ./ concurrent-ear/ concurrent-war/ concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/
Date Thu, 27 Mar 2008 17:33:54 GMT
Author: gawor
Date: Thu Mar 27 10:33:47 2008
New Revision: 641918

URL: http://svn.apache.org/viewvc?rev=641918&view=rev
Log:
moved testing to the ear and added data source lookup test

Modified:
    geronimo/sandbox/concurrent/concurrent-tests/concurrent-ear/pom.xml
    geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/pom.xml
    geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/BasicTask.java
    geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ContextServiceServlet.java
    geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ManagedExecutorServiceServlet.java
    geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ManagedScheduledExecutorServiceServlet.java
    geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ManagedThreadFactoryServlet.java
    geronimo/sandbox/concurrent/concurrent-tests/pom.xml

Modified: geronimo/sandbox/concurrent/concurrent-tests/concurrent-ear/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/concurrent/concurrent-tests/concurrent-ear/pom.xml?rev=641918&r1=641917&r2=641918&view=diff
==============================================================================
--- geronimo/sandbox/concurrent/concurrent-tests/concurrent-ear/pom.xml (original)
+++ geronimo/sandbox/concurrent/concurrent-tests/concurrent-ear/pom.xml Thu Mar 27 10:33:47
2008
@@ -38,6 +38,13 @@
     <description>This project executes testcases for your testsuite</description>
     <dependencies>
         <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-concurrent-management</artifactId>
+            <version>${version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
             <groupId>org.tranql</groupId>
             <artifactId>tranql-connector-ra</artifactId>
             <version>1.3</version>
@@ -69,6 +76,84 @@
                         </webModule>
                     </modules>
                 </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>testCompile</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.geronimo.buildsupport</groupId>
+                <artifactId>testsuite-maven-plugin</artifactId>
+                <version>${version}</version>
+                <executions>
+                    <execution>
+                        <id>generate-surefire-xml</id>
+                        <phase>install</phase>
+                        <goals>
+                            <goal>generate-surefire-xml</goal>
+                        </goals>
+                        <!-- 
+                        Merging the configuration of this plugin with the one it inherits.
+                        Updating the reports in the grandparent directly as we'd have missed
the boat for the parent's install phase.
+                        -->
+                        <configuration>
+                            <grandParent>true</grandParent>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <systemProperties>
+                        <property>
+                            <name>webAppName</name>
+                            <value>concurrent</value>
+                        </property>
+                    </systemProperties>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.geronimo.genesis.plugins</groupId>
+                <artifactId>tools-maven-plugin</artifactId>
+                <extensions>true</extensions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.geronimo.buildsupport</groupId>
+                <artifactId>geronimo-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>deploy-wars</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>deploy-module</goal>
+                        </goals>
+                        <configuration>
+                            <moduleArchive>${project.build.directory}/${artifactId}-${version}.ear</moduleArchive>
+                        </configuration>
+                    </execution>
+                            
+                    <execution>
+                        <id>undeploy-war-as-moduleId</id>
+                        <phase>post-integration-test</phase>
+                        <goals>
+                            <goal>undeploy-module</goal>
+                        </goals>
+                        <configuration>
+                            <moduleId>${groupId}/${artifactId}/${version}/ear</moduleId>
+                        </configuration>
+                    </execution>
+                </executions>
             </plugin>
         </plugins>
     </build>

Modified: geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/pom.xml?rev=641918&r1=641917&r2=641918&view=diff
==============================================================================
--- geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/pom.xml (original)
+++ geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/pom.xml Thu Mar 27 10:33:47
2008
@@ -67,78 +67,5 @@
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.geronimo.buildsupport</groupId>
-                <artifactId>testsuite-maven-plugin</artifactId>
-                <version>${version}</version>
-                <executions>
-                    <execution>
-                        <id>generate-surefire-xml</id>
-                        <phase>install</phase>
-                        <goals>
-                            <goal>generate-surefire-xml</goal>
-                        </goals>
-                        <!-- 
-                        Merging the configuration of this plugin with the one it inherits.
-                        Updating the reports in the grandparent directly as we'd have missed
the boat for the parent's install phase.
-                        -->
-                        <configuration>
-                            <grandParent>true</grandParent>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <systemProperties>
-                        <property>
-                            <name>webAppName</name>
-                            <value>${artifactId}-${version}</value>
-                        </property>
-                    </systemProperties>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.geronimo.genesis.plugins</groupId>
-                <artifactId>tools-maven-plugin</artifactId>
-                <extensions>true</extensions>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.geronimo.buildsupport</groupId>
-                <artifactId>geronimo-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>deploy-wars</id>
-                        <phase>pre-integration-test</phase>
-                        <goals>
-                            <goal>deploy-module</goal>
-                        </goals>
-                        <configuration>
-                            <moduleArchive>${project.build.directory}/${artifactId}-${version}.war</moduleArchive>
-                        </configuration>
-                    </execution>
-                            
-                    <execution>
-                        <id>undeploy-war-as-moduleId</id>
-                        <phase>post-integration-test</phase>
-                        <goals>
-                            <goal>undeploy-module</goal>
-                        </goals>
-                        <configuration>
-                            <moduleId>${groupId}/${artifactId}/1.0/war</moduleId>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
 </project>
 

Modified: geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/BasicTask.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/BasicTask.java?rev=641918&r1=641917&r2=641918&view=diff
==============================================================================
--- geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/BasicTask.java
(original)
+++ geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/BasicTask.java
Thu Mar 27 10:33:47 2008
@@ -20,6 +20,7 @@
 
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import javax.sql.DataSource;
 import javax.transaction.UserTransaction;
 
 import org.testng.Assert;
@@ -41,7 +42,7 @@
         testEnvEntry(ctx);
         
         // lookup database pool
-        // TODO:
+        testDataSource(ctx);
         
         // lookup user transaction
         testUserTransaction(ctx);
@@ -59,6 +60,15 @@
             Assert.assertEquals(greeting, "Hello", "env-entry lookup");
         } catch (NamingException e) {
             Assert.fail("env-entry JNDI lookup failed", e);
+        }
+    }
+    
+    private void testDataSource(InitialContext ctx) {
+        try {
+            DataSource ds = (DataSource)ctx.lookup("java:comp/env/ConcurrentPool");
+            Assert.assertNotNull(ds);
+        } catch (NamingException e) {
+            Assert.fail("DataSource JNDI lookup failed", e);
         }
     }
     

Modified: geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ContextServiceServlet.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ContextServiceServlet.java?rev=641918&r1=641917&r2=641918&view=diff
==============================================================================
--- geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ContextServiceServlet.java
(original)
+++ geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ContextServiceServlet.java
Thu Mar 27 10:33:47 2008
@@ -26,6 +26,7 @@
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.sql.DataSource;
 import javax.util.concurrent.ContextService;
 
 import org.apache.commons.logging.Log;
@@ -37,6 +38,9 @@
     
     @Resource
     ContextService contextService;
+    
+    @Resource(name="ConcurrentPool")
+    DataSource db;
     
     public void doGet(HttpServletRequest request,
                       HttpServletResponse response) 

Modified: geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ManagedExecutorServiceServlet.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ManagedExecutorServiceServlet.java?rev=641918&r1=641917&r2=641918&view=diff
==============================================================================
--- geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ManagedExecutorServiceServlet.java
(original)
+++ geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ManagedExecutorServiceServlet.java
Thu Mar 27 10:33:47 2008
@@ -27,6 +27,7 @@
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.sql.DataSource;
 import javax.util.concurrent.ManagedExecutorService;
 
 import org.apache.commons.logging.Log;
@@ -39,6 +40,9 @@
     @Resource
     ManagedExecutorService executorService;
         
+    @Resource(name="ConcurrentPool")
+    DataSource db;
+    
     public void doGet(HttpServletRequest request,
                       HttpServletResponse response) 
         throws IOException {

Modified: geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ManagedScheduledExecutorServiceServlet.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ManagedScheduledExecutorServiceServlet.java?rev=641918&r1=641917&r2=641918&view=diff
==============================================================================
--- geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ManagedScheduledExecutorServiceServlet.java
(original)
+++ geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ManagedScheduledExecutorServiceServlet.java
Thu Mar 27 10:33:47 2008
@@ -28,6 +28,7 @@
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.sql.DataSource;
 import javax.util.concurrent.ManagedScheduledExecutorService;
 
 import org.apache.commons.logging.Log;
@@ -39,6 +40,9 @@
 
     @Resource
     ManagedScheduledExecutorService scheduledExecutorService;
+    
+    @Resource(name="ConcurrentPool")
+    DataSource db;
     
     public void doGet(HttpServletRequest request,
                       HttpServletResponse response) 

Modified: geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ManagedThreadFactoryServlet.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ManagedThreadFactoryServlet.java?rev=641918&r1=641917&r2=641918&view=diff
==============================================================================
--- geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ManagedThreadFactoryServlet.java
(original)
+++ geronimo/sandbox/concurrent/concurrent-tests/concurrent-war/src/main/java/org/apache/geronimo/concurrent/test/ManagedThreadFactoryServlet.java
Thu Mar 27 10:33:47 2008
@@ -26,6 +26,7 @@
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.sql.DataSource;
 import javax.util.concurrent.ManagedThreadFactory;
 
 import org.apache.commons.logging.Log;
@@ -37,6 +38,9 @@
     
     @Resource
     ManagedThreadFactory threadFactory;
+    
+    @Resource(name="ConcurrentPool")
+    DataSource db;
     
     public void doGet(HttpServletRequest request,
                       HttpServletResponse response) 

Modified: geronimo/sandbox/concurrent/concurrent-tests/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/concurrent/concurrent-tests/pom.xml?rev=641918&r1=641917&r2=641918&view=diff
==============================================================================
--- geronimo/sandbox/concurrent/concurrent-tests/pom.xml (original)
+++ geronimo/sandbox/concurrent/concurrent-tests/pom.xml Thu Mar 27 10:33:47 2008
@@ -45,13 +45,9 @@
         </pluginManagement>
     </build>
 
-    <profiles>
-        <profile>
-            <id>child</id>
-            <modules>
-                <module>concurrent-war</module>
-            </modules>
-        </profile>
-    </profiles>
+    <modules>
+        <module>concurrent-war</module>
+        <module>concurrent-ear</module>
+    </modules>
 
 </project>



Mime
View raw message