1
2
3
4
5
6
7
8
9
10
11 package org.mule.transport.jms.integration;
12
13 import org.junit.Test;
14
15
16
17
18 public class JmsDurableTopicSingleTxTestCase extends JmsDurableTopicTestCase
19 {
20
21 @Override
22 protected String getConfigResources()
23 {
24 return "integration/jms-durable-topic-single-tx.xml";
25 }
26
27
28
29
30 @Override
31 @Test
32 public void testProviderDurableSubscriber() throws Exception
33 {
34 setClientId("Client1");
35 receive(scenarioNotReceive);
36 setClientId("Client2");
37 receive(scenarioNotReceive);
38
39 setClientId("Sender");
40 send(scenarioCommit);
41
42 setClientId("Client1");
43 receive(scenarioCommit);
44 receive(scenarioNotReceive);
45 setClientId("Client2");
46 receive(scenarioRollback);
47 receive(scenarioCommit);
48 receive(scenarioNotReceive);
49
50 }
51
52 Scenario scenarioCommit = new ScenarioCommit()
53 {
54
55 @Override
56 public String getOutputDestinationName()
57 {
58 return getJmsConfig().getBroadcastDestinationName();
59 }
60 };
61
62 Scenario scenarioRollback = new ScenarioRollback()
63 {
64
65 @Override
66 public String getOutputDestinationName()
67 {
68 return getJmsConfig().getBroadcastDestinationName();
69 }
70 };
71
72 Scenario scenarioNotReceive = new ScenarioNotReceive()
73 {
74
75 @Override
76 public String getOutputDestinationName()
77 {
78 return getJmsConfig().getBroadcastDestinationName();
79 }
80 };
81 }