geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r801076 - in /geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests: jms-ear/ jms-ear/src/main/filtered-resources/META-INF/ jms-ear/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/ jms-ear/src/test/resources/ jms-ejb/ jm...
Date Wed, 05 Aug 2009 06:50:48 GMT
Author: djencks
Date: Wed Aug  5 06:50:47 2009
New Revision: 801076

URL: http://svn.apache.org/viewvc?rev=801076&view=rev
Log:
GERONIMO-4784 demonstrate problem with 2 sessions on the same managed connection and UserTransaction.
 Also add a profile to run just this test with -Pstandalone and an already started g. server.


Added:
    geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/RollbackTest.java
      - copied, changed from r800489, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/MessageSenderTest.java
    geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/bmt/
    geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/bmt/JmsBmtBean.java
  (with props)
    geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/bmt/JmsBmtRemote.java
  (with props)
Modified:
    geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/pom.xml
    geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/main/filtered-resources/META-INF/geronimo-application.xml
    geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/resources/testng.xml
    geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/pom.xml
    geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/MessageReceiver.java
    geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/to/SimpleTransferObject.java
    geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/sb/JmsSenderBean.java

Modified: geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/pom.xml?rev=801076&r1=801075&r2=801076&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/pom.xml (original)
+++ geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/pom.xml Wed Aug
 5 06:50:47 2009
@@ -168,4 +168,47 @@
         </plugins>
     </build>
 
+        <profiles>
+        <profile>
+            <!-- use to start up selenium when running a single test against an already-started
server -->
+            <id>standalone</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>selenium-maven-plugin</artifactId>
+                        <inherited>false</inherited>
+                        <executions>
+                            <execution>
+                                <id>start</id>
+                                <phase>pre-integration-test</phase>
+                                <goals>
+                                    <goal>start-server</goal>
+                                </goals>
+                                <configuration>
+                                    <logOutput>true</logOutput>
+                                    <background>true</background>
+                                    <systemProperties>
+                                        <property>
+                                            <name>browser</name>
+                                            <value>${browser}</value>
+                                        </property>
+                                    </systemProperties>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <id>stop</id>
+                                <phase>post-integration-test</phase>
+                                <goals>
+                                    <goal>stop-server</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+    
 </project>

Modified: geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/main/filtered-resources/META-INF/geronimo-application.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/main/filtered-resources/META-INF/geronimo-application.xml?rev=801076&r1=801075&r2=801076&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/main/filtered-resources/META-INF/geronimo-application.xml
(original)
+++ geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/main/filtered-resources/META-INF/geronimo-application.xml
Wed Aug  5 06:50:47 2009
@@ -133,6 +133,10 @@
                     <message-destination-name>TestTopic</message-destination-name>
                     <config-property-setting name="PhysicalName">TestTopic</config-property-setting>
                 </adminobject-instance>
+                <adminobject-instance>
+                    <message-destination-name>TxTopic</message-destination-name>
+                    <config-property-setting name="PhysicalName">TxTopic</config-property-setting>
+                </adminobject-instance>
             </adminobject>
             <adminobject>
                 <adminobject-interface>javax.jms.Queue</adminobject-interface>
@@ -141,10 +145,6 @@
                     <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>
@@ -153,6 +153,10 @@
                     <message-destination-name>MRResponses</message-destination-name>
                     <config-property-setting name="PhysicalName">MRResponses</config-property-setting>
                 </adminobject-instance>
+                <adminobject-instance>
+                    <message-destination-name>TxQueue</message-destination-name>
+                    <config-property-setting name="PhysicalName">TxQueue</config-property-setting>
+                </adminobject-instance>
             </adminobject>
         </connector>
     </ext-module>

Copied: geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/RollbackTest.java
(from r800489, geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/MessageSenderTest.java)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/RollbackTest.java?p2=geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/RollbackTest.java&p1=geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/MessageSenderTest.java&r1=800489&r2=801076&rev=801076&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/MessageSenderTest.java
(original)
+++ geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/RollbackTest.java
Wed Aug  5 06:50:47 2009
@@ -18,14 +18,14 @@
 
 import javax.naming.InitialContext;
 
-import org.apache.geronimo.jms.test.sb.JmsSenderRemote;
+import org.apache.geronimo.jms.test.bmt.JmsBmtRemote;
 import org.testng.annotations.Test;
 
 /**
  * @author <a href="mailto:tomasz[et]mazan[dot]pl">Tomasz Mazan</a>
  */
 @Test
-public class MessageSenderTest {
+public class RollbackTest {
 
     /**
      * Initialize test configuration
@@ -41,7 +41,7 @@
      * @throws Exception if exception occurs
      */
     @Test
-    public void sendRequests() throws Exception {
+    public void testRollback() throws Exception {
         InitialContext ctx = new InitialContext();
         String totalShipStr = System.getProperty("total-shipment");
         String msgsPerShipStr = System.getProperty("requests-per-shipment");
@@ -49,15 +49,23 @@
         int totalShip = (totalShipStr == null ? 10 : Integer.parseInt(totalShipStr));
         int msgsPerShip = (msgsPerShipStr == null ? 20 : Integer.parseInt(msgsPerShipStr));
 
-        JmsSenderRemote jmsSender = (JmsSenderRemote) ctx.lookup("JmsSenderRemote");
+        JmsBmtRemote jmsSender = (JmsBmtRemote) ctx.lookup("JmsBmtRemote");
+        boolean pass = true;
         if (jmsSender != null) {
-            System.out.println("JmsSender initialized");
+            System.out.println("JmsBmtRemote initialized");
             for (int i = 0; i < totalShip; ++i) {
                 String messageName = (i + 1) + ".Request";
 
                 System.out.format("Sending (%1$s) request(s) with name %2$s%n", msgsPerShip,
messageName);
-                jmsSender.sendMessage(messageName, 0, msgsPerShip);
-                System.out.println("Requests sent");
+                String result = jmsSender.sendMessageQueue(messageName, 0, msgsPerShip);
+                System.out.println("QUeue equests sent, result: " + result);
+                if ("FAIL".equals(result)) pass = false;
+                result = jmsSender.sendMessageTopic(messageName, 0, msgsPerShip);
+                System.out.println("Topic requests sent, result: " + result);
+                if ("FAIL".equals(result)) pass = false;
+            }
+            if (!pass) {
+                throw new Exception("Failed, see out and logs");
             }
             //enable is receiveMessage is modified to detect messages on request queue
 /*
@@ -67,18 +75,9 @@
                 throw new Exception("received request message: " + id);
             }
 */
-            //uncomment to actually run test
-            for (int i = 0; i < totalShip * msgsPerShip; i++) {
-                Integer id = jmsSender.receiveMessage();
-                if (id == null) {
-                    throw new Exception("did not receive message: " + i);
-//                    System.out.println("Did not receive message: " + i);
-//                    Thread.sleep(10000);
-                }
-            }
         } else {
             throw new Exception("Sender is null");
         }
     }
 
-}
+}
\ No newline at end of file

Modified: geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/resources/testng.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/resources/testng.xml?rev=801076&r1=801075&r2=801076&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/resources/testng.xml
(original)
+++ geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/test/resources/testng.xml
Wed Aug  5 06:50:47 2009
@@ -27,5 +27,9 @@
         <packages>
             <package name="org.apache.geronimo.testsuite.enterprise.jms"/>
         </packages>
+        <!-- reverse what is commented out to just run the GERONIMO-4784 failing test
-->
+        <!--<classes>-->
+            <!--<class name="org.apache.geronimo.testsuite.enterprise.jms.RollbackTest"/>-->
+        <!--</classes>-->
     </test>
 </suite>

Modified: geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/pom.xml?rev=801076&r1=801075&r2=801076&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/pom.xml (original)
+++ geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/pom.xml Wed Aug
 5 06:50:47 2009
@@ -63,6 +63,12 @@
         
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jta_1.1_spec</artifactId>
+            <version>1.1.1</version>
+            <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>

Added: geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/bmt/JmsBmtBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/bmt/JmsBmtBean.java?rev=801076&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/bmt/JmsBmtBean.java
(added)
+++ geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/bmt/JmsBmtBean.java
Wed Aug  5 06:50:47 2009
@@ -0,0 +1,171 @@
+/*
+ * 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.
+ */
+
+
+package org.apache.geronimo.jms.test.bmt;
+
+import java.text.MessageFormat;
+
+import javax.ejb.Stateless;
+import javax.ejb.TransactionManagement;
+import javax.ejb.TransactionManagementType;
+import javax.annotation.Resource;
+import javax.jms.ConnectionFactory;
+import javax.jms.Queue;
+import javax.jms.Connection;
+import javax.jms.Session;
+import javax.jms.MessageProducer;
+import javax.jms.ObjectMessage;
+import javax.jms.Message;
+import javax.jms.JMSException;
+import javax.jms.Topic;
+import javax.jms.MessageConsumer;
+import javax.jms.Destination;
+import javax.transaction.UserTransaction;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.geronimo.jms.test.mdb.to.SimpleTransferObject;
+import org.apache.geronimo.jms.test.mdb.MessageReceiver;
+
+/**
+ * @version $Rev$ $Date$
+ */
+
+@Stateless(name = "JmsBmt")
+@TransactionManagement(value = TransactionManagementType.BEAN)
+public class JmsBmtBean implements JmsBmtRemote {
+
+    /**
+     * Logger
+     */
+    private static Logger logger = LoggerFactory.getLogger(JmsBmtBean.class);
+
+    /**
+     * Injected connection factory
+     */
+    @Resource(name = "MSConnectionFactory")
+    private ConnectionFactory connFactory = null;
+
+    @Resource(name="UserTransaction")
+    private UserTransaction ut;
+
+    /**
+     * Injected jms destination
+     */
+    @Resource(name = "TxQueue")
+    private Queue queue = null;
+
+    /**
+     * Injected jms destination
+     */
+    @Resource(name = "TxTopic")
+    private Topic topic = null;
+
+    public String sendMessageQueue(String requestName, int priority, int counter) {
+
+        logger.info(MessageFormat.format("Receive task to send {0} message(s) with basename
{1} (p={2})", counter, requestName, priority));
+
+        return sendMessageToDestination(requestName, priority, counter, queue);
+    }
+
+    public String sendMessageTopic(String requestName, int priority, int counter) {
+
+        logger.info(MessageFormat.format("Receive task to send {0} message(s) with basename
{1} (p={2})", counter, requestName, priority));
+
+        return sendMessageToDestination(requestName, priority, counter, topic);
+    }
+
+    private String sendMessageToDestination(String requestName, int priority, int counter,
Destination destination) {
+        Connection conn = null;
+        Connection c2 = null;
+        Session sess = null;
+        Session s2 = null;
+        MessageProducer prod = null;
+        MessageConsumer consumer = null;
+        Message received = null;
+        try {
+            conn = this.connFactory.createConnection();
+            c2 = connFactory.createConnection();
+            sess = conn.createSession(true, Session.SESSION_TRANSACTED);
+            s2 = c2.createSession(true, Session.SESSION_TRANSACTED);
+            prod = sess.createProducer(destination);
+            consumer = sess.createConsumer(destination);
+            conn.start();
+
+            for (int i = 0; i < counter; ++i) {
+                SimpleTransferObject to = new SimpleTransferObject(requestName, i);
+
+                ObjectMessage msg = sess.createObjectMessage();
+                msg.setObject(to);
+
+                logger.info("Sending message with name " + to.getName());
+                ut.begin();
+                try {
+                    prod.send(msg, Message.DEFAULT_DELIVERY_MODE, priority, Message.DEFAULT_TIME_TO_LIVE);
+                } finally {
+                    ut.commit();
+                }
+                logger.info("Message sent.");
+                MessageReceiver.browse("After send", sess, destination, logger);
+                ut.begin();
+                try {
+                    received = consumer.receive(1000);
+                    if (received == null) throw new JMSException("Not received first time");
+                    if (!to.equals(((ObjectMessage)received).getObject())) throw new JMSException("Wrong
object inside: " + ((ObjectMessage)received).getObject());
+                } finally {
+                    ut.rollback();
+                }
+
+                ut.begin();
+                try {
+                    received = consumer.receive(1000);
+                    if (received == null) throw new JMSException("Not received second time");
+                    if (!to.equals(((ObjectMessage)received).getObject())) throw new JMSException("Wrong
object inside: " + ((ObjectMessage)received).getObject());
+                } finally {
+                    ut.commit();
+                }
+
+            }
+            return "OK";
+
+        } catch (Exception e) {
+            logger.error("Bad news! Sending failed due to exception: " + e.getMessage());
+            return "FAIL";
+        } finally {
+            try {
+                if (prod != null) {
+                    prod.close();
+                }
+                if (consumer != null) consumer.close();
+                if (sess != null) {
+                    sess.close();
+                }
+                if (conn != null) {
+                    conn.close();
+                }
+                if (s2 != null) s2.close();
+                if (c2 != null) c2.close();;
+            } catch (JMSException e) {
+                logger.error("Could not finalize jms connections");
+            }
+        }
+    }
+
+
+}

Propchange: geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/bmt/JmsBmtBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/bmt/JmsBmtBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/bmt/JmsBmtBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/bmt/JmsBmtRemote.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/bmt/JmsBmtRemote.java?rev=801076&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/bmt/JmsBmtRemote.java
(added)
+++ geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/bmt/JmsBmtRemote.java
Wed Aug  5 06:50:47 2009
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+
+package org.apache.geronimo.jms.test.bmt;
+
+import javax.ejb.Remote;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@Remote
+public interface JmsBmtRemote {
+    String sendMessageQueue(String requestName, int priority, int counter);
+    String sendMessageTopic(String requestName, int priority, int counter);
+}

Propchange: geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/bmt/JmsBmtRemote.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/bmt/JmsBmtRemote.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/bmt/JmsBmtRemote.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/MessageReceiver.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/MessageReceiver.java?rev=801076&r1=801075&r2=801076&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/MessageReceiver.java
(original)
+++ geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/MessageReceiver.java
Wed Aug  5 06:50:47 2009
@@ -139,6 +139,7 @@
             conn = this.createConnection();
             sess = this.createSession(conn);
             producer = this.createMessageProducer(sess, replyTo);
+            conn.start();
 
             ObjectMessage msg = this.createMessage(sess);
             msg.setObject(to);

Modified: geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/to/SimpleTransferObject.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/to/SimpleTransferObject.java?rev=801076&r1=801075&r2=801076&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/to/SimpleTransferObject.java
(original)
+++ geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/mdb/to/SimpleTransferObject.java
Wed Aug  5 06:50:47 2009
@@ -95,5 +95,27 @@
         return created;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
 
+        SimpleTransferObject that = (SimpleTransferObject) o;
+
+        if (id != that.id) return false;
+        if (created != null ? !created.equals(that.created) : that.created != null) return
false;
+        if (name != null ? !name.equals(that.name) : that.name != null) return false;
+        if (processed != null ? !processed.equals(that.processed) : that.processed != null)
return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = name != null ? name.hashCode() : 0;
+        result = 31 * result + id;
+        result = 31 * result + (processed != null ? processed.hashCode() : 0);
+        result = 31 * result + (created != null ? created.hashCode() : 0);
+        return result;
+    }
 }

Modified: geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/sb/JmsSenderBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/sb/JmsSenderBean.java?rev=801076&r1=801075&r2=801076&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/sb/JmsSenderBean.java
(original)
+++ geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/main/java/org/apache/geronimo/jms/test/sb/JmsSenderBean.java
Wed Aug  5 06:50:47 2009
@@ -84,6 +84,7 @@
             conn = this.connFactory.createConnection();
             sess = conn.createSession(true, Session.SESSION_TRANSACTED);
             prod = sess.createProducer(jmsRequestQueue);
+            conn.start();
 
             for (int i = 0; i < counter; ++i) {
                 SimpleTransferObject to = new SimpleTransferObject(requestName, i);



Mime
View raw message