on 09-14-2006 9:02 PM
hi
I want to add this code to change ONLY the JMS_IBM_Last_Msg_In_Group JMS Parameter
any way to do it with EJB after all the messages are sent with the adapter?
Thx,Shai
MQConnectionFactory factory = new MQConnectionFactory();
factory.setQueueManager("QM_host")
MQQueue destination = new MQQueue("default");
destination.setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ);
Connection connection = factory.createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer producer = session.createProducer(destination);
String groupId = "ID:" + new BigInteger(24 * 8, new Random()).toString(16);
for (int i = 1; i <= 5; i++) {
TextMessage message = session.createTextMessage();
message.setStringProperty("JMSXGroupID", groupId);
message.setIntProperty("JMSXGroupSeq", i);
if (i == 5) {
message.setBooleanProperty("JMS_IBM_Last_Msg_In_Group", true);
}
message.setText("Message " + i);
producer.send(message);
}
connection.close();
Hi Shai,
I'm not too convinced that this is the XI-way to go. The JMS adapter will have its own MQ Connection and handle the communication with JMS (putting the message on the queue, etc.)
I believe, you should try one of the following options (even though I don't know whether they will work):
Set Additional JMS Properties in the Communication Channel configuration (this will only allow a fixed value to be set)
Implement a module that accomplishes this task. However, I don't know if this is supported by the Module Chain.
Have you asked SAP (through an OSS Message) whether this can be accomplishe in a Module?
regards,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.