Commit 8adaba5e authored by Andre Freyssinet's avatar Andre Freyssinet

JORAM-333: Fix a prefix to JMS MessageID through the ConnectionFactory.

parent d03caafd
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2001 - 2013 ScalAgent Distributed Technologies
* Copyright (C) 2001 - 2019 ScalAgent Distributed Technologies
* Copyright (C) 2004 - Bull SA
* Copyright (C) 1996 - 2000 Dyade
*
......@@ -44,6 +44,7 @@ public class ClassicAdmin {
System.out.println("Classic administration...");
ConnectionFactory cf = TcpConnectionFactory.create("localhost", 16010);
((TcpConnectionFactory) cf).getParameters().messageIdPrefix = "classicfromcf";
AdminModule.connect(cf, "root", "root");
Queue queue = Queue.create("queue");
......
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2001 - 2009 ScalAgent Distributed Technologies
* Copyright (C) 2001 - 2019 ScalAgent Distributed Technologies
* Copyright (C) 1996 - 2000 Dyade
*
* This library is free software; you can redistribute it and/or
......@@ -46,7 +46,7 @@ public class MsgListener implements MessageListener {
Destination destination = msg.getJMSDestination();
Destination replyTo = msg.getJMSReplyTo();
System.out.println(ident + " receives message from=" + destination + ",replyTo=" + replyTo);
System.out.println(ident + " receives message " + msg.getJMSMessageID() + " from=" + destination + ",replyTo=" + replyTo);
Enumeration e = msg.getPropertyNames();
while (e.hasMoreElements()) {
String key = (String) e.nextElement();
......
<?xml version="1.0"?>
<!--
- Copyright (C) 2000 - 2012 ScalAgent Distributed Technologies
- Copyright (C) 2000 - 2019 ScalAgent Distributed Technologies
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
......@@ -32,6 +32,7 @@
</InitialContext>
<TcpConnectionFactory name="cf" host="localhost" port="16010">
<property name="messageIdPrefix" value="classicfromxml"/>
<outInterceptors>
<interceptor className="classic.Interceptor"/>
</outInterceptors>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment