[
http://jira.jboss.com/jira/browse/JBWS-670?page=all ]
Thomas Diesler updated JBWS-670:
--------------------------------
Summary: Provide JMS transport for JAX-WS client (was: JMS transport via JBoss
Remoting)
Description:
Currently, the client will have to use the JMS API directly
InitialContext context = new InitialContext();
QueueConnectionFactory connectionFactory =
(QueueConnectionFactory)context.lookup("ConnectionFactory");
Queue reqQueue = (Queue)context.lookup("queue/RequestQueue");
Queue resQueue = (Queue)context.lookup("queue/ResponseQueue");
QueueConnection con = connectionFactory.createQueueConnection();
QueueSession session = con.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
QueueReceiver receiver = session.createReceiver(resQueue);
ResponseListener responseListener = new ResponseListener();
receiver.setMessageListener(responseListener);
con.start();
TextMessage message = session.createTextMessage(reqMessage);
message.setJMSReplyTo(resQueue);
waitForResponse = true;
QueueSender sender = session.createSender(reqQueue);
sender.send(message);
sender.close();
int timeout = 5000;
while (waitForResponse && timeout > 0)
{
Thread.sleep(100);
timeout -= 100;
}
assertNotNull("Expected response message", responseListener.resMessage);
assertEquals(DOMUtils.parse(resMessage),
DOMUtils.parse(responseListener.resMessage));
con.stop();
session.close();
con.close();
Instead, the client should use the standard JAX-WS API to consume a wsdl that defines the
jms binding
Provide JMS transport for JAX-WS client
---------------------------------------
Key: JBWS-670
URL:
http://jira.jboss.com/jira/browse/JBWS-670
Project: JBoss Web Services
Issue Type: Task
Security Level: Public(Everyone can see)
Components: jbossws-native
Reporter: Thomas Diesler
Fix For: jbossws-3.x
Currently, the client will have to use the JMS API directly
InitialContext context = new InitialContext();
QueueConnectionFactory connectionFactory =
(QueueConnectionFactory)context.lookup("ConnectionFactory");
Queue reqQueue = (Queue)context.lookup("queue/RequestQueue");
Queue resQueue = (Queue)context.lookup("queue/ResponseQueue");
QueueConnection con = connectionFactory.createQueueConnection();
QueueSession session = con.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
QueueReceiver receiver = session.createReceiver(resQueue);
ResponseListener responseListener = new ResponseListener();
receiver.setMessageListener(responseListener);
con.start();
TextMessage message = session.createTextMessage(reqMessage);
message.setJMSReplyTo(resQueue);
waitForResponse = true;
QueueSender sender = session.createSender(reqQueue);
sender.send(message);
sender.close();
int timeout = 5000;
while (waitForResponse && timeout > 0)
{
Thread.sleep(100);
timeout -= 100;
}
assertNotNull("Expected response message", responseListener.resMessage);
assertEquals(DOMUtils.parse(resMessage),
DOMUtils.parse(responseListener.resMessage));
con.stop();
session.close();
con.close();
Instead, the client should use the standard JAX-WS API to consume a wsdl that defines the
jms binding
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira