cancel
Showing results for 
Search instead for 
Did you mean: 

JMS Adapter EJB Add-on

Former Member
0 Kudos

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();

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Yes u right

Set additional JMS Properties

will give me a constant value for JMSXGROUPID

but I need to tranfer another value in the last message

of the adapter

I will ask SAP through OSS

thx for the help,

Shai

Answers (0)