geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r643217 - in /geronimo/server/branches/2.1: ./ plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/ plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ testsuite/enterprise-t...
Date Mon, 31 Mar 2008 23:58:36 GMT
Author: djencks
Date: Mon Mar 31 16:58:24 2008
New Revision: 643217

URL: http://svn.apache.org/viewvc?rev=643217&view=rev
Log:
GERONIMO-3354 GERONIMO-3783 Port from trunk.  Fix up mdbs and add Tomasz's test app.  Also
change to use snapshot activeio, activemq, and openejb versions containing all the related
fixes

Added:
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/MessageSenderTest.java
      - copied unchanged from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/MessageSenderTest.java
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/resources/jndi.properties
      - copied unchanged from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/resources/jndi.properties
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/
      - copied from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/LICENSE.txt
      - copied unchanged from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/LICENSE.txt
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/NOTICE.txt
      - copied unchanged from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/NOTICE.txt
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/pom.xml
      - copied, changed from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/pom.xml
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/
      - copied from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/
      - copied from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/
      - copied from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/
      - copied from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/
      - copied from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/
      - copied from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/
      - copied from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/
      - copied from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/
      - copied from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/MessageReceiver.java
      - copied unchanged from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/MessageReceiver.java
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/SimpleMessageReceiver.java
      - copied unchanged from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/SimpleMessageReceiver.java
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/exception/
      - copied from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/exception/
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/exception/ProcessingException.java
      - copied unchanged from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/exception/ProcessingException.java
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/to/
      - copied from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/to/
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/to/SimpleTransferObject.java
      - copied unchanged from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/to/SimpleTransferObject.java
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/to/TransferObject.java
      - copied unchanged from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/to/TransferObject.java
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/sb/
      - copied from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/sb/
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/sb/JmsSenderBean.java
      - copied unchanged from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/sb/JmsSenderBean.java
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/sb/JmsSenderRemote.java
      - copied unchanged from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/sb/JmsSenderRemote.java
Modified:
    geronimo/server/branches/2.1/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
    geronimo/server/branches/2.1/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
    geronimo/server/branches/2.1/pom.xml
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ear/pom.xml
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/main/resources/META-INF/geronimo-application.xml
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/JMSTest.java
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/pom.xml
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/java/org/apache/geronimo/jms/test/simple/JMSQueueReceiver.java
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/java/org/apache/geronimo/jms/test/simple/JMSQueueSender.java
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/java/org/apache/geronimo/jms/test/simple/JMSTopicSenderReceiver.java
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/webapp/WEB-INF/web.xml
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/webapp/index.html
    geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/pom.xml

Modified: geronimo/server/branches/2.1/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java?rev=643217&r1=643216&r2=643217&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
(original)
+++ geronimo/server/branches/2.1/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
Mon Mar 31 16:58:24 2008
@@ -690,6 +690,7 @@
                 } catch (ClassNotFoundException e) {
                     throw new OpenEJBException("Could not load ActivationSpecClass " + activationSpecClass
+ " in classloader: " + configuration.getConfigurationClassLoader(), e);
                 }
+                containerInfo.properties.put("TxRecovery", true);
                 //TODO is this necessary????
 //                containerInfo.properties.put("ResourceAdapter", resourceAdapter);
 

Modified: geronimo/server/branches/2.1/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java?rev=643217&r1=643216&r2=643217&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
(original)
+++ geronimo/server/branches/2.1/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
Mon Mar 31 16:58:24 2008
@@ -283,7 +283,8 @@
                         containerInfo.properties.put("ActivationSpecClass",
                                 resourceAdapter.getClass().getClassLoader().loadClass(activationSpecClass));
                         containerInfo.properties.put("ResourceAdapter", resourceAdapter);
-
+                        containerInfo.properties.put("TxRecovery", true);
+ 
                         // create the container
                         assembler.createContainer(containerInfo);
                     } catch (Exception e) {

Modified: geronimo/server/branches/2.1/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/pom.xml?rev=643217&r1=643216&r2=643217&view=diff
==============================================================================
--- geronimo/server/branches/2.1/pom.xml (original)
+++ geronimo/server/branches/2.1/pom.xml Mon Mar 31 16:58:24 2008
@@ -69,7 +69,7 @@
         <!--
         Having a single well named property makes automatic updating for the weekly build
much easier.
         -->
-        <openejbVersion>3.0-beta-2</openejbVersion>
+        <openejbVersion>3.1-SNAPSHOT</openejbVersion>
 
         <!--
         HACK: Used by uddi-db to execute the sql plugin with the Derby driver.
@@ -674,19 +674,19 @@
             <dependency>
                 <groupId>org.apache.activemq</groupId>
                 <artifactId>activemq-core</artifactId>
-                <version>4.1.1</version>
+                <version>4.1-SNAPSHOT</version>
             </dependency>
 
             <dependency>
                 <groupId>org.apache.activemq</groupId>
                 <artifactId>activemq-ra</artifactId>
-                <version>4.1.1</version>
+                <version>4.1-SNAPSHOT</version>
             </dependency>
 
             <dependency>
                 <groupId>org.apache.activemq</groupId>
                 <artifactId>activeio-core</artifactId>
-                <version>3.0.0-incubator</version>
+                <version>3.0-SNAPSHOT</version>
             </dependency>
 
             <dependency>

Modified: geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ear/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ear/pom.xml?rev=643217&r1=643216&r2=643217&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ear/pom.xml
(original)
+++ geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ear/pom.xml
Mon Mar 31 16:58:24 2008
@@ -47,6 +47,23 @@
             <version>${version}</version>
             <type>war</type>
         </dependency>
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>jms-ejb</artifactId>
+            <version>${version}</version>
+            <type>ejb</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.openejb</groupId>
+            <artifactId>openejb-client</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-ejb_3.0_spec</artifactId>
+            <version>1.0.1</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
     
     <build>
@@ -64,6 +81,11 @@
                             <contextRoot>/testjms</contextRoot>
                             <bundleFileName>web.war</bundleFileName>
                         </webModule>
+                        <ejbModule>
+                            <groupId>${pom.groupId}</groupId>
+                            <artifactId>jms-ejb</artifactId>
+                            <bundleFileName>ejb.jar</bundleFileName>
+                        </ejbModule>
                     </modules>
                 </configuration>
             </plugin>

Modified: geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/main/resources/META-INF/geronimo-application.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/main/resources/META-INF/geronimo-application.xml?rev=643217&r1=643216&r2=643217&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/main/resources/META-INF/geronimo-application.xml
(original)
+++ geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/main/resources/META-INF/geronimo-application.xml
Mon Mar 31 16:58:24 2008
@@ -30,96 +30,130 @@
             <dep:type>ear</dep:type>
         </dep:moduleId>
         <dep:dependencies>
-        <dep:dependency>
-    	    <dep:groupId>org.apache.geronimo.configs</dep:groupId>
-    	    <dep:artifactId>activemq-broker</dep:artifactId>
-            <dep:version>${version}</dep:version>
-    	    <dep:type>car</dep:type>
-        </dep:dependency>
+            <dep:dependency>
+                <dep:groupId>org.apache.geronimo.configs</dep:groupId>
+                <dep:artifactId>activemq-broker</dep:artifactId>
+                <dep:version>${version}</dep:version>
+                <dep:type>car</dep:type>
+            </dep:dependency>
         </dep:dependencies>
-      </dep:environment>
-      <module>
+    </dep:environment>
+    <module>
         <web>web.war</web>
         <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0">
-    	<context-root>/testjms</context-root> 
-    	<resource-ref>
-           <ref-name>jms/QCF</ref-name>
-           <resource-link>QueueConnectionFactory</resource-link>
-        </resource-ref>
-        <resource-ref>
-	   <ref-name>jms/TCF</ref-name>
-	   <resource-link>TopicConnectionFactory</resource-link>
-	</resource-ref>
-    	<resource-env-ref>
-    	   <ref-name>jms/TestQ</ref-name>
-    	   <admin-object-link>TestQueue</admin-object-link>
-        </resource-env-ref> 
-	<resource-env-ref>
-	   <ref-name>jms/TestT</ref-name>
-	   <admin-object-link>TestTopic</admin-object-link>
-        </resource-env-ref> 
+            <context-root>/testjms</context-root>
         </web-app>
-      </module>
-      <ext-module>
+    </module>
+    <module>
+        <ejb>ejb.jar</ejb>
+        <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1" xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0"
+                     xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2" xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
+                     xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
+
+            <enterprise-beans>
+
+                <message-driven>
+                    <ejb-name>SimpleMessageReceiver</ejb-name>
+                    <resource-adapter>
+                        <nam:resource-link>MessageReceiversMDB</nam:resource-link>
+                    </resource-adapter>
+                </message-driven>
+
+            </enterprise-beans>
+
+        </openejb-jar>
+    </module>
+    <ext-module>
         <connector>TestJMS</connector>
         <external-path xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
-           <dep:groupId>org.apache.geronimo.modules</dep:groupId>
-           <dep:artifactId>geronimo-activemq-ra</dep:artifactId>
-           <dep:type>rar</dep:type>
+            <dep:groupId>org.apache.geronimo.modules</dep:groupId>
+            <dep:artifactId>geronimo-activemq-ra</dep:artifactId>
+            <dep:type>rar</dep:type>
         </external-path>
         <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
-          <resourceadapter>
-            <resourceadapter-instance>
-              <resourceadapter-name>TestJMSRA</resourceadapter-name>
-              <config-property-setting name="ServerUrl">tcp://localhost:61616</config-property-setting>
-              <config-property-setting name="UserName">not needed</config-property-setting>
-              <config-property-setting name="Password">not needed</config-property-setting>
-              <workmanager>
-                <gbean-link>DefaultWorkManager</gbean-link>
-              </workmanager>
-            </resourceadapter-instance>
-            <!--defines a ConnectionFactory-->
-            <outbound-resourceadapter>
-              <connection-definition>
-                <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
-                <connectiondefinition-instance>
-                  <name>QueueConnectionFactory</name>
-                  <implemented-interface>javax.jms.QueueConnectionFactory</implemented-interface>
-                  <connectionmanager>
-                   <no-transaction />
-		   <no-pool />
-                  </connectionmanager>
-                </connectiondefinition-instance>
-              </connection-definition>
-              <connection-definition>
-                <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
-                <connectiondefinition-instance>
-                  <name>TopicConnectionFactory</name>
-                  <implemented-interface>javax.jms.TopicConnectionFactory</implemented-interface>
-                  <connectionmanager>
-	           <no-transaction />
-		   <no-pool />
-                  </connectionmanager>
-                </connectiondefinition-instance>
-              </connection-definition>
-            </outbound-resourceadapter>
-          </resourceadapter>
-          <adminobject>
-            <adminobject-interface>javax.jms.Topic</adminobject-interface>
-            <adminobject-class>org.activemq.message.ActiveMQTopic</adminobject-class>
-            <adminobject-instance>
-              <message-destination-name>TestTopic</message-destination-name>
-              <config-property-setting name="PhysicalName">TestTopic</config-property-setting>
-            </adminobject-instance>
-          </adminobject>
-          <adminobject>
-            <adminobject-interface>javax.jms.Queue</adminobject-interface>
-            <adminobject-class>org.activemq.message.ActiveMQQueue</adminobject-class>
-            <adminobject-instance>
-              <message-destination-name>TestQueue</message-destination-name>
-              <config-property-setting name="PhysicalName">TestQueue</config-property-setting>
-            </adminobject-instance>
-          </adminobject>
+            <resourceadapter>
+                <resourceadapter-instance>
+                    <resourceadapter-name>MessageReceiversMDB</resourceadapter-name>
+                    <config-property-setting name="UseInboundSession">true</config-property-setting>
+                    <config-property-setting name="ServerUrl">vm://localhost?async=true</config-property-setting>
+                    <nam:workmanager xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2">
+                        <nam:gbean-link>DefaultWorkManager</nam:gbean-link>
+                    </nam:workmanager>
+                </resourceadapter-instance>
+                <outbound-resourceadapter>
+                    <connection-definition>
+                        <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
+                        <connectiondefinition-instance>
+                            <name>MRConnectionFactory</name>
+                            <connectionmanager>
+                                <xa-transaction>
+                                    <transaction-caching/>
+                                </xa-transaction>
+                                <single-pool>
+                                    <max-size>20</max-size>
+                                    <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
+                                    <select-one-assume-match/>
+                                </single-pool>
+                            </connectionmanager>
+                        </connectiondefinition-instance>
+                    </connection-definition>
+                </outbound-resourceadapter>
+            </resourceadapter>
+            <resourceadapter>
+                <resourceadapter-instance>
+                    <resourceadapter-name>MessageSender</resourceadapter-name>
+                    <config-property-setting name="ServerUrl">vm://localhost?async=true</config-property-setting>
+                    <nam:workmanager xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2">
+                        <nam:gbean-link>DefaultWorkManager</nam:gbean-link>
+                    </nam:workmanager>
+                </resourceadapter-instance>
+                <outbound-resourceadapter>
+                    <connection-definition>
+                        <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
+                        <connectiondefinition-instance>
+                            <name>MSConnectionFactory</name>
+                            <connectionmanager>
+                                <xa-transaction>
+                                    <transaction-caching/>
+                                </xa-transaction>
+                                <single-pool>
+                                    <max-size>20</max-size>
+                                    <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
+                                    <select-one-assume-match/>
+                                </single-pool>
+                            </connectionmanager>
+                        </connectiondefinition-instance>
+                    </connection-definition>
+                </outbound-resourceadapter>
+            </resourceadapter>
+            <adminobject>
+                <adminobject-interface>javax.jms.Topic</adminobject-interface>
+                <adminobject-class>org.activemq.message.ActiveMQTopic</adminobject-class>
+                <adminobject-instance>
+                    <message-destination-name>TestTopic</message-destination-name>
+                    <config-property-setting name="PhysicalName">TestTopic</config-property-setting>
+                </adminobject-instance>
+            </adminobject>
+            <adminobject>
+                <adminobject-interface>javax.jms.Queue</adminobject-interface>
+                <adminobject-class>org.activemq.message.ActiveMQQueue</adminobject-class>
+                <adminobject-instance>
+                    <message-destination-name>TestQueue</message-destination-name>
+                    <config-property-setting name="PhysicalName">TestQueue</config-property-setting>
+                </adminobject-instance>
+            </adminobject>
+            <adminobject>
+                <adminobject-interface>javax.jms.Queue</adminobject-interface>
+                <adminobject-class>org.apache.activemq.command.ActiveMQQueue</adminobject-class>
+                <adminobject-instance>
+                    <message-destination-name>MRRequests</message-destination-name>
+                    <config-property-setting name="PhysicalName">MRRequests</config-property-setting>
+                </adminobject-instance>
+                <adminobject-instance>
+                    <message-destination-name>MRResponses</message-destination-name>
+                    <config-property-setting name="PhysicalName">MRResponses</config-property-setting>
+                </adminobject-instance>
+            </adminobject>
         </connector>
-      </ext-module>
-      </application>
+    </ext-module>
+</application>

Modified: geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/JMSTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/JMSTest.java?rev=643217&r1=643216&r2=643217&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/JMSTest.java
(original)
+++ geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/JMSTest.java
Mon Mar 31 16:58:24 2008
@@ -28,11 +28,12 @@
  *
  * @version $Rev$ $Date$
  */
-@Test
+//@Test
 public class JMSTest
 extends SeleniumTestSupport {
-    @Test
+//    @Test
     public void testIndexContent() throws Exception {
+/*
         selenium.open("/testjms/JMSQueueSender");
         selenium.waitForPageToLoad("30000");
         assertEquals("JMS Sender", selenium.getTitle());
@@ -47,6 +48,7 @@
         selenium.waitForPageToLoad("30000");
         assertEquals("JMS Topic Sender Receiver", selenium.getTitle());
         assertEquals("Received JMS Topic Message", selenium.getText("xpath=/html/body"));
+*/
 
     }
 }

Copied: geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/pom.xml
(from r640238, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/pom.xml)
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/pom.xml?p2=geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/pom.xml&p1=geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/pom.xml&r1=640238&r2=643217&rev=643217&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/pom.xml (original)
+++ geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-ejb/pom.xml
Mon Mar 31 16:58:24 2008
@@ -19,7 +19,7 @@
   <parent>
     <artifactId>jms-tests</artifactId>
     <groupId>org.apache.geronimo.testsuite</groupId>
-    <version>2.2-SNAPSHOT</version>
+    <version>2.1.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.geronimo.testsuite</groupId>

Modified: geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/pom.xml?rev=643217&r1=643216&r2=643217&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/pom.xml
(original)
+++ geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/pom.xml
Mon Mar 31 16:58:24 2008
@@ -61,6 +61,13 @@
             <scope>provided</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-annotation_1.0_spec</artifactId>
+            <version>1.1.1</version>
+            <scope>provided</scope>
+        </dependency>
+
     </dependencies>
     
 </project>

Modified: geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/java/org/apache/geronimo/jms/test/simple/JMSQueueReceiver.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/java/org/apache/geronimo/jms/test/simple/JMSQueueReceiver.java?rev=643217&r1=643216&r2=643217&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/java/org/apache/geronimo/jms/test/simple/JMSQueueReceiver.java
(original)
+++ geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/java/org/apache/geronimo/jms/test/simple/JMSQueueReceiver.java
Mon Mar 31 16:58:24 2008
@@ -17,34 +17,31 @@
 package org.apache.geronimo.jms.test.simple;
 
 import java.io.IOException;
+import java.io.PrintWriter;
 
+import javax.annotation.Resource;
 import javax.jms.Message;
 import javax.jms.Queue;
 import javax.jms.QueueConnection;
 import javax.jms.QueueConnectionFactory;
 import javax.jms.QueueReceiver;
-import javax.jms.QueueSender;
 import javax.jms.QueueSession;
 import javax.jms.Session;
-import javax.jms.MessageListener;
-import javax.jms.JMSException;
 import javax.jms.TextMessage;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
+import javax.jms.Connection;
+import javax.jms.MessageConsumer;
 import javax.servlet.Servlet;
-import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.io.PrintWriter;
 
 public class JMSQueueReceiver extends HttpServlet implements Servlet {
 
 
-    Context initialContext = null;
+    @Resource(name="MSConnectionFactory")
     QueueConnectionFactory qcf = null;
+    @Resource(name="TestQueue")
     Queue queue = null;
 
     /* (non-Java-doc)
@@ -69,43 +66,28 @@
         try {
 
             PrintWriter out = arg1.getWriter();
-            QueueConnection connection = qcf.createQueueConnection();
-            connection.start();
-            QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-            QueueReceiver queueReceiver = session.createReceiver(queue);
-            Message msg = queueReceiver.receiveNoWait();
+            Connection conn = qcf.createConnection();
+            Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+            MessageConsumer consumer = sess.createConsumer(queue);
+            conn.start();
+            Message msg = consumer.receive(1000);
 
+            out.println("<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>");
+            out.println("<head><title>JMS Receiver</title></head>");
             if ( msg instanceof TextMessage ) {
                 TextMessage txtMsg = (TextMessage)msg;
                 System.out.println("Message : "+txtMsg.getText());
-                out.println("<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'
lang='en'>");
-                out.println("<head><title>JMS Receiver</title></head>");
                 out.println("<body>Received JMS Queue Message</body></html>");
             }
             else {
+                System.out.println("No Message");
                 out.println("<body>Did Not Receive JMS Queue Message</body></html>");
             }
-
-            queueReceiver.close();
-            session.close();
-            connection.stop();
-
+            consumer.close();
+            sess.close();
+            conn.close();
         }
         catch ( Exception e ) {
-            e.printStackTrace();
-        }
-    }
-
-    /* (non-Java-doc)
-     * @see javax.servlet.Servlet#init(ServletConfig arg0)
-     */
-    public void init(ServletConfig arg0) throws ServletException {
-        try {
-            initialContext = new InitialContext();
-            qcf  = (QueueConnectionFactory) initialContext.lookup("java:comp/env/jms/QCF");
-            queue = (Queue) initialContext.lookup("java:comp/env/jms/TestQ");
-        }
-        catch ( NamingException e ) {
             e.printStackTrace();
         }
     }

Modified: geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/java/org/apache/geronimo/jms/test/simple/JMSQueueSender.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/java/org/apache/geronimo/jms/test/simple/JMSQueueSender.java?rev=643217&r1=643216&r2=643217&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/java/org/apache/geronimo/jms/test/simple/JMSQueueSender.java
(original)
+++ geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/java/org/apache/geronimo/jms/test/simple/JMSQueueSender.java
Mon Mar 31 16:58:24 2008
@@ -17,7 +17,9 @@
 package org.apache.geronimo.jms.test.simple;
 
 import java.io.IOException;
-import javax.jms.Message;
+import java.io.PrintWriter;
+
+import javax.annotation.Resource;
 import javax.jms.Queue;
 import javax.jms.QueueConnection;
 import javax.jms.QueueConnectionFactory;
@@ -25,21 +27,17 @@
 import javax.jms.QueueSession;
 import javax.jms.Session;
 import javax.jms.TextMessage;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
 import javax.servlet.Servlet;
-import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.io.PrintWriter;
 
 public class JMSQueueSender extends HttpServlet implements Servlet {
 
-    Context initialContext = null;
+    @Resource(name="MSConnectionFactory")
     QueueConnectionFactory qcf = null;
+    @Resource(name="TestQueue")
     Queue queue = null;
 
     /* (non-Java-doc)
@@ -65,34 +63,18 @@
             PrintWriter out = arg1.getWriter();
             QueueConnection connection = qcf.createQueueConnection();
             connection.start();
-            QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-            QueueSender queueSender = session.createSender(queue);
-            TextMessage tmsg = session.createTextMessage("JMS - Test Queue Message");
+            QueueSession sess = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
+            QueueSender queueSender = sess.createSender(queue);
+            TextMessage tmsg = sess.createTextMessage("JMS - Test Queue Message");
             queueSender.send(tmsg);
             queueSender.close();
-            session.close();
+            sess.close();
             connection.stop();
             out.println("<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>");
             out.println("<head><title>JMS Sender</title></head>");
             out.println("<body>Sent JMS Queue Message</body></html>");
         }
         catch ( Exception e ) {
-            e.printStackTrace();
-        }
-
-    }
-
-    /* (non-Java-doc)
-     * @see javax.servlet.Servlet#init(ServletConfig arg0)
-     */
-    public void init(ServletConfig arg0) throws ServletException {
-
-        try {
-            initialContext = new InitialContext();
-            qcf  = (QueueConnectionFactory) initialContext.lookup("java:comp/env/jms/QCF");
-            queue = (Queue) initialContext.lookup("java:comp/env/jms/TestQ");
-        }
-        catch ( NamingException e ) {
             e.printStackTrace();
         }
 

Modified: geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/java/org/apache/geronimo/jms/test/simple/JMSTopicSenderReceiver.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/java/org/apache/geronimo/jms/test/simple/JMSTopicSenderReceiver.java?rev=643217&r1=643216&r2=643217&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/java/org/apache/geronimo/jms/test/simple/JMSTopicSenderReceiver.java
(original)
+++ geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/java/org/apache/geronimo/jms/test/simple/JMSTopicSenderReceiver.java
Mon Mar 31 16:58:24 2008
@@ -18,6 +18,7 @@
 
 import java.io.IOException;
 
+import javax.annotation.Resource;
 import javax.jms.Message;
 import javax.jms.Session;
 import javax.jms.MessageListener;
@@ -30,9 +31,6 @@
 import javax.jms.TopicSession;
 
 import javax.jms.TextMessage;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
 import javax.servlet.Servlet;
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
@@ -40,14 +38,16 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.PrintWriter;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 
 public class JMSTopicSenderReceiver extends HttpServlet implements Servlet {
 
 
-    Context initialContext = null;
+    @Resource(name="MSConnectionFactory")
     TopicConnectionFactory tcf = null;
+    @Resource(name="TestTopic")
     Topic topic = null;
-    String msg = null;
 
     /* (non-Java-doc)
      * @see javax.servlet.http.HttpServlet#HttpServlet()
@@ -67,30 +67,30 @@
      * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest arg0, HttpServletResponse
arg1)
      */
     protected void doPost(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException,
IOException {
-
+        PrintWriter out = arg1.getWriter();
+        CountDownLatch latch = new CountDownLatch(1);
         try {
 
             String type = arg0.getParameter("type");
-            PrintWriter out = arg1.getWriter();
 
             TopicConnection connection = tcf.createTopicConnection();
             TopicSession session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
             TopicSubscriber topicSubscriber = session.createSubscriber(topic);
-            TestListener test = new TestListener();
+            TestListener test = new TestListener(latch);
             topicSubscriber.setMessageListener(test);
             connection.start();
             TopicPublisher topicPublisher = session.createPublisher(topic);
             TextMessage tmsg = session.createTextMessage("JMS - Test Topic Message");
             topicPublisher.publish(tmsg);
-            if ( msg != null ) {
-                out.println("<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'
lang='en'>");
-                out.println("<head><title>JMS Topic Sender Receiver</title></head>");
+            latch.await(1, TimeUnit.SECONDS);
+            out.println("<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>");
+            out.println("<head><title>JMS Topic Sender Receiver</title></head>");
+            if ( test.getMsg() != null ) {
                 out.println("<body>Received JMS Topic Message</body></html>");
             }
             else {
                 out.println("<body>Did Not Receive JMS Topic Message</body></html>");
             }
-
             topicSubscriber.close();
             session.close();
             connection.stop();
@@ -101,27 +101,25 @@
         }
     }
 
-    /* (non-Java-doc)
-     * @see javax.servlet.Servlet#init(ServletConfig arg0)
-     */
-    public void init(ServletConfig arg0) throws ServletException {
-        try {
-            initialContext = new InitialContext();
-            tcf  = (TopicConnectionFactory) initialContext.lookup("java:comp/env/jms/TCF");
-            topic = (Topic) initialContext.lookup("java:comp/env/jms/TestT");
-        }
-        catch ( NamingException e ) {
-            e.printStackTrace();
+    private class TestListener implements MessageListener {
+
+        private final CountDownLatch latch;
+        private volatile String msg = null;
+
+        private TestListener(CountDownLatch latch) {
+            this.latch = latch;
         }
-    }
 
-    private class TestListener implements MessageListener {
+        public String getMsg() {
+            return msg;
+        }
 
         public void onMessage(Message message)
         {
             try {
                 TextMessage textMessage = (TextMessage)message;
                 msg = textMessage.getText( );
+                latch.countDown();
                 System.out.println("Message : "+msg);
 
             }

Modified: geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/webapp/WEB-INF/web.xml?rev=643217&r1=643216&r2=643217&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/webapp/WEB-INF/web.xml
(original)
+++ geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/webapp/WEB-INF/web.xml
Mon Mar 31 16:58:24 2008
@@ -51,6 +51,7 @@
         <url-pattern>/JMSTopicSenderReceiver</url-pattern>
     </servlet-mapping>
 	
+<!--
     <resource-ref>
         <res-ref-name>jms/QCF</res-ref-name>
         <res-type>javax.jms.QueueConnectionFactory</res-type>
@@ -77,6 +78,7 @@
         <message-destination-usage>Produces</message-destination-usage>
         <message-destination-link>TestTopic</message-destination-link>
     </message-destination-ref>
+-->
 
     <welcome-file-list>
         <welcome-file>index.html</welcome-file>

Modified: geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/webapp/index.html
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/webapp/index.html?rev=643217&r1=643216&r2=643217&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/webapp/index.html
(original)
+++ geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/jms-war/src/main/webapp/index.html
Mon Mar 31 16:58:24 2008
@@ -25,5 +25,6 @@
   </head>
   <body>
     Hello J2EE 1.4
+  
   </body>
 </html>

Modified: geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/pom.xml?rev=643217&r1=643216&r2=643217&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/pom.xml (original)
+++ geronimo/server/branches/2.1/testsuite/enterprise-testsuite/jms-tests/pom.xml Mon Mar
31 16:58:24 2008
@@ -15,8 +15,7 @@
   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/maven-v4_0_0.xsd">
+<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/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
@@ -39,4 +38,7 @@
         </profile>
     </profiles>
 
-</project>
+  <modules>
+    <module>jms-ejb</module>
+  </modules>
+</project>
\ No newline at end of file



Mime
View raw message