Posted: Sun Jul 15, 2012 8:10 am Post subject: Setting Expiry on MQMD (MQ Import)
Apprentice
Joined: 21 Oct 2009 Posts: 29
Hi,
Iv connected a MQ Import (one way) to a bpel process. Im passing a very simple xml to the MQ Import , just need to set Expiry in the MQMD.
Im trying to do the same using Data Binding class.
Iv tried:
1.
public class TestMQ extends MQDataBindingImplXML {
public void write(MQMD md, List headers, MQDataOutputStream output)
throws IOException {
System.out.println("Here");
md.setExpiry(10000); // 10 seconds
super.write((com.ibm.websphere.sca.mq.structures.MQMD)md, headers, output);
}
}
Given this class under Binding (Default Input Data Format) on mq import.
But "Here" does not appear in the console and expiry is not changed
2.
Iv tried the implementing Custom Body data binding and can change expiry but the output (xml) is lost as we need to construct it
Not tried custom MQ Header data binding .
Im using v6.2 and not very familiar with wps (Worked more on MB)
I am aware this is simpler using smo and mediation module but Im trying directly from bpel and mq import.
Please advice on how this can be achieved and what Im doing wrong in either of the methods.
It seems iv made an incorrect import for MQMD. Used the one in the mq jar instead of com.ibm.websphere.sca.mq.structures.MQMD . Hence needed to put the cast which should otherwise not be needed.
That also explains why the write method of custom class(method 1) isnt called. Its not overriden correctly.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum