* @version $Revision: 1.2 $
*/
public class JmsMultiplexingRemotingTest extends JmsRemotingTest {
public void testJmsProxyFactoryBeanAndAsyncServiceExporter() throws Throwable {
ExampleService target = new ExampleServiceImpl();
exporter = new JmsServiceExporter();
exporter.setServiceInterface(ExampleService.class);
exporter.setService(target);
exporter.setProducer(createJmsProducer());
configure(exporter);
subscribeToQueue(exporter, getDestinationName());
pfb = new JmsProxyFactoryBean();
pfb.setServiceInterface(ExampleService.class);
pfb.setServiceUrl("http://myurl");
pfb.setRemoteInvocationFactory(new LingoRemoteInvocationFactory(new SimpleMetadataStrategy(true)));
pfb.setRequestor(createRequestor(getDestinationName()));
configure(pfb);
ExampleService proxy = (ExampleService) pfb.getObject();
TestResultListener listener = new TestResultListener();
proxy.asyncRequestResponse("IBM", listener);
listener.waitForAsyncResponses(2);
List results = listener.getResults();
System.out.println("Found results: " + results);