use of com.swiftmq.jms.BytesMessageImpl in project swiftmq-ce by iitsoftware.
the class TopicAnnounceSender method send.
// <-- Exposed Methods
private void send(String dest, QueueSender sender, VersionObject vo) throws Exception {
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace(ctx.topicManager.getName(), toString() + "/send, dest: " + dest + ", vo: " + vo);
dos.rewind();
dos.writeInt(vo.getDumpId());
vo.writeContent(dos);
BytesMessageImpl msg = new BytesMessageImpl();
msg.writeBytes(dos.getBuffer(), 0, dos.getCount());
msg.setJMSPriority(MessageImpl.MAX_PRIORITY);
msg.setJMSDestination(new QueueImpl(TopicManagerImpl.TOPIC_QUEUE + "@" + dest));
QueuePushTransaction transaction = sender.createTransaction();
transaction.putMessage(msg);
transaction.commit();
}
Aggregations