1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.ksb;
17
18 import javax.xml.namespace.QName;
19
20 import org.junit.Test;
21 import org.kuali.rice.ksb.api.KsbApiServiceLocator;
22 import org.kuali.rice.ksb.messaging.MessagingTestObject;
23 import org.kuali.rice.ksb.messaging.service.KSBJavaService;
24 import org.kuali.rice.ksb.test.KSBTestCase;
25
26
27 public class StartBusTest extends KSBTestCase {
28
29 @Override
30 public boolean startClient1() {
31 return true;
32 }
33
34 @Test
35 public void testStartTheBus() {
36 QName serviceName = new QName("TestCl1", "testJavaAsyncService");
37
38 KsbApiServiceLocator.getServiceBus().synchronize();
39
40 KSBJavaService testJavaAsyncService = (KSBJavaService) KsbApiServiceLocator.getMessageHelper().getServiceAsynchronously(serviceName);
41 testJavaAsyncService.invoke(new MessagingTestObject("message content"));
42
43
44 }
45
46
47
48
49
50
51
52
53
54
55 }