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