blob: a08d336180fc82050ae4f15acf084b47556e886c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package callbacks;
import org.apache.tuscany.sca.node.SCAClient;
import org.apache.tuscany.sca.node.SCANode;
import org.apache.tuscany.sca.node.SCANodeFactory;
public class CallbackJMSClient {
public static void main(String[] args) throws Exception {
SCANodeFactory factory = SCANodeFactory.newInstance();
SCANode node = factory.createSCANodeFromClassLoader("callbacks.composite", CallbackJMSClient.class.getClassLoader());
node.start();
OrderServiceClient orderServiceClient = ((SCAClient)node).getService(OrderServiceClient.class, "ClientComponent");
// do something
orderServiceClient.doSomeOrdering();
// wait to give the service time to respond
Thread.sleep(500);
node.stop();
}
}
|