1   /*
2    * $Id: JmsSingleTransactionAlwaysBeginConfigurationTestCase.java 10524 2008-01-24 19:20:11Z akuzmin $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  package org.mule.test.integration.providers.jms.functional;
11  
12  public class JmsSingleTransactionAlwaysBeginConfigurationTestCase extends AbstractJmsFunctionalTestCase
13  {
14  
15      public static final String JMS_QUEUE_INPUT_CONF_A = "in1";
16      public static final String JMS_QUEUE_OUTPUT_CONF_A = "out1";
17      public static final String JMS_QUEUE_INPUT_CONF_B = "in2";
18      public static final String JMS_QUEUE_OUTPUT_CONF_B = "out2";
19      public static final String JMS_QUEUE_INPUT_CONF_C = "in3";
20      public static final String JMS_QUEUE_OUTPUT_CONF_C = "out3";
21  
22      protected String getConfigResources()
23      {
24          return "providers/activemq/jms-single-tx-ALWAYS_BEGIN-configuration.xml";
25      }
26  
27      public void testConfigrationA() throws Exception
28      {
29          scenarioCommit.setInputQueue(JMS_QUEUE_INPUT_CONF_A);
30          scenarioRollback.setInputQueue(JMS_QUEUE_INPUT_CONF_A);
31          scenarioNotReceive.setInputQueue(JMS_QUEUE_INPUT_CONF_A);
32          scenarioCommit.setOutputQueue(JMS_QUEUE_OUTPUT_CONF_A);
33          scenarioRollback.setOutputQueue(JMS_QUEUE_OUTPUT_CONF_A);
34          scenarioNotReceive.setOutputQueue(JMS_QUEUE_OUTPUT_CONF_A);
35  
36          send(scenarioCommit);
37          receive(scenarioRollback);
38          receive(scenarioCommit);
39          receive(scenarioNotReceive);
40      }
41  
42      public void testConfigrationB() throws Exception
43      {
44          scenarioCommit.setInputQueue(JMS_QUEUE_INPUT_CONF_B);
45          scenarioRollback.setInputQueue(JMS_QUEUE_INPUT_CONF_B);
46          scenarioNotReceive.setInputQueue(JMS_QUEUE_INPUT_CONF_B);
47          scenarioCommit.setOutputQueue(JMS_QUEUE_OUTPUT_CONF_B);
48          scenarioRollback.setOutputQueue(JMS_QUEUE_OUTPUT_CONF_B);
49          scenarioNotReceive.setOutputQueue(JMS_QUEUE_OUTPUT_CONF_B);
50  
51          send(scenarioCommit);
52          receive(scenarioRollback);
53          receive(scenarioCommit);
54          receive(scenarioNotReceive);
55      }
56  
57  //    public void testConfigrationC() throws Exception
58  //    {
59  //        scenarioCommit.setInputQueue(JMS_QUEUE_INPUT_CONF_C);
60  //        scenarioRollback.setInputQueue(JMS_QUEUE_INPUT_CONF_C);
61  //        scenarioNotReceive.setInputQueue(JMS_QUEUE_INPUT_CONF_C);
62  //        scenarioCommit.setOutputQueue(JMS_QUEUE_OUTPUT_CONF_C);
63  //        scenarioRollback.setOutputQueue(JMS_QUEUE_OUTPUT_CONF_C);
64  //        scenarioNotReceive.setOutputQueue(JMS_QUEUE_OUTPUT_CONF_C);
65  //
66  //        send(scenarioCommit);
67  //        receive(scenarioRollback);
68  //        receive(scenarioCommit);
69  //        receive(scenarioNotReceive);
70  //    }
71  
72  }