1   /*
2    * $Id: JmsSingleTransactionAlwaysBeginConfigurationTestCase.java 12181 2008-06-26 20:05:55Z dirk.olmes $
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  
11  package org.mule.transport.jms.integration;
12  
13  public class JmsSingleTransactionAlwaysBeginConfigurationTestCase extends AbstractJmsFunctionalTestCase
14  {
15  
16      public static final String JMS_QUEUE_INPUT_CONF_A = "in1";
17      public static final String JMS_QUEUE_OUTPUT_CONF_A = "out1";
18      public static final String JMS_QUEUE_INPUT_CONF_B = "in2";
19      public static final String JMS_QUEUE_OUTPUT_CONF_B = "out2";
20      public static final String JMS_QUEUE_INPUT_CONF_C = "in3";
21      public static final String JMS_QUEUE_OUTPUT_CONF_C = "out3";
22  
23      protected String getConfigResources()
24      {
25          return "providers/activemq/jms-single-tx-ALWAYS_BEGIN-configuration.xml";
26      }
27  
28      public void testConfigrationA() throws Exception
29      {
30          scenarioCommit.setInputQueue(JMS_QUEUE_INPUT_CONF_A);
31          scenarioRollback.setInputQueue(JMS_QUEUE_INPUT_CONF_A);
32          scenarioNotReceive.setInputQueue(JMS_QUEUE_INPUT_CONF_A);
33          scenarioCommit.setOutputQueue(JMS_QUEUE_OUTPUT_CONF_A);
34          scenarioRollback.setOutputQueue(JMS_QUEUE_OUTPUT_CONF_A);
35          scenarioNotReceive.setOutputQueue(JMS_QUEUE_OUTPUT_CONF_A);
36  
37          send(scenarioCommit);
38          receive(scenarioRollback);
39          receive(scenarioCommit);
40          receive(scenarioNotReceive);
41      }
42  
43      public void testConfigrationB() throws Exception
44      {
45          scenarioCommit.setInputQueue(JMS_QUEUE_INPUT_CONF_B);
46          scenarioRollback.setInputQueue(JMS_QUEUE_INPUT_CONF_B);
47          scenarioNotReceive.setInputQueue(JMS_QUEUE_INPUT_CONF_B);
48          scenarioCommit.setOutputQueue(JMS_QUEUE_OUTPUT_CONF_B);
49          scenarioRollback.setOutputQueue(JMS_QUEUE_OUTPUT_CONF_B);
50          scenarioNotReceive.setOutputQueue(JMS_QUEUE_OUTPUT_CONF_B);
51  
52          send(scenarioCommit);
53          receive(scenarioRollback);
54          receive(scenarioCommit);
55          receive(scenarioNotReceive);
56      }
57  
58      /*
59      public void testConfigrationC() throws Exception
60      {
61          scenarioCommit.setInputQueue(JMS_QUEUE_INPUT_CONF_C);
62          scenarioRollback.setInputQueue(JMS_QUEUE_INPUT_CONF_C);
63          scenarioNotReceive.setInputQueue(JMS_QUEUE_INPUT_CONF_C);
64          scenarioCommit.setOutputQueue(JMS_QUEUE_OUTPUT_CONF_C);
65          scenarioRollback.setOutputQueue(JMS_QUEUE_OUTPUT_CONF_C);
66          scenarioNotReceive.setOutputQueue(JMS_QUEUE_OUTPUT_CONF_C);
67  
68          send(scenarioCommit);
69          receive(scenarioRollback);
70          receive(scenarioCommit);
71          receive(scenarioNotReceive);
72      }
73      */
74  
75  }
76  
77