use of com.swiftmq.tools.requestreply.Reply in project swiftmq-client by iitsoftware.
the class SMQPVisitorAdapter method visit.
public void visit(XAResForgetRequest req) {
Reply reply = req.createReply();
reply.setOk(false);
reply.setException(new Exception("Please install the JMS XA/ASF Swiftlet to use this functionality!"));
reply.send();
}
use of com.swiftmq.tools.requestreply.Reply in project swiftmq-client by iitsoftware.
the class SMQPVisitorAdapter method visit.
public void visit(XAResRollbackRequest req) {
Reply reply = req.createReply();
reply.setOk(false);
reply.setException(new Exception("Please install the JMS XA/ASF Swiftlet to use this functionality!"));
reply.send();
}
use of com.swiftmq.tools.requestreply.Reply in project swiftmq-client by iitsoftware.
the class SMQPVisitorAdapter method visit.
public void visit(XAResSetTxTimeoutRequest req) {
Reply reply = req.createReply();
reply.setOk(false);
reply.setException(new Exception("Please install the JMS XA/ASF Swiftlet to use this functionality!"));
reply.send();
}
use of com.swiftmq.tools.requestreply.Reply in project swiftmq-client by iitsoftware.
the class QueueBrowserImpl method close.
/**
* Since a provider may allocate some resources on behalf of a
* QueueBrowser outside the JVM, clients should close them when they
* are not needed. Relying on garbage collection to eventually reclaim
* these resources may not be timely enough.
*
* @throws JMSException if a JMS fails to close this
* Browser due to some JMS error.
*/
public void close() throws JMSException {
verifyState();
closed = true;
Reply reply = null;
try {
reply = requestRegistry.request(new com.swiftmq.jms.smqp.v510.CloseBrowserRequest(dispatchId, browserDispatchId));
} catch (Exception e) {
throw ExceptionConverter.convert(e);
}
if (!reply.isOk()) {
throw ExceptionConverter.convert(reply.getException());
}
}
use of com.swiftmq.tools.requestreply.Reply in project swiftmq-client by iitsoftware.
the class QueueConnectionConsumerImpl method createConsumer.
void createConsumer(QueueImpl queue, String messageSelector) throws JMSException {
if (queue == null)
throw new NullPointerException("createConsumer, queue is null!");
queueName = queue.getQueueName();
Reply reply = null;
try {
reply = requestRegistry.request(new CreateConsumerRequest(dispatchId, (QueueImpl) queue, messageSelector));
} catch (Exception e) {
throw ExceptionConverter.convert(e);
}
if (!reply.isOk())
throw ExceptionConverter.convert(reply.getException());
fillCache();
}
Aggregations