use of org.jboss.narayana.blacktie.jatmibroker.core.conf.AtmiBrokerEnvXML in project narayana by jbosstm.
the class ConnectionImplTest method test.
public void test() throws Exception {
AtmiBrokerEnvXML xml = new AtmiBrokerEnvXML();
Properties properties = xml.getProperties();
TransportFactory factory = new TransportFactory(properties);
Transport proxy = factory.createTransport();
Sender serviceFactory = proxy.getSender("BAR", false);
String aString = "Hello from Java Land";
Receiver endpoint = proxy.createReceiver(1, null, null);
serviceFactory.send(endpoint.getReplyTo(), (short) 0, 0, aString.getBytes(), aString.getBytes().length, 0, 0, 0, "X_OCTET", "");
Message receive = endpoint.receive(0);
assertNotNull(receive);
String string = new String(receive.data).intern();
String expectedResponse = "BAR SAYS HELLO";
log.debug("Bar ServiceManager service_request response is " + string);
log.debug("Bar ServiceManager service_request size of response is " + receive.len);
assertEquals(string, expectedResponse);
proxy.close();
factory.close();
}
use of org.jboss.narayana.blacktie.jatmibroker.core.conf.AtmiBrokerEnvXML in project narayana by jbosstm.
the class TestConnection method setUp.
public void setUp() throws ConnectionException, ConfigurationException {
AtmiBrokerEnvXML xml = new AtmiBrokerEnvXML();
Properties properties = xml.getProperties();
transportFactory = new TransportFactory(properties);
serviceTransport = transportFactory.createTransport();
clientTransport = transportFactory.createTransport();
}
Aggregations