ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Process Server (WID/WPS/WAS+) » Setting Expiry on MQMD (MQ Import)

Post new topic  Reply to topic
 Setting Expiry on MQMD (MQ Import) « View previous topic :: View next topic » 
Author Message
Karan
PostPosted: Sun Jul 15, 2012 8:10 am    Post subject: Setting Expiry on MQMD (MQ Import) Reply with quote

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.
Back to top
View user's profile Send private message
Karan
PostPosted: Mon Jul 16, 2012 1:17 am    Post subject: Reply with quote

Apprentice

Joined: 21 Oct 2009
Posts: 29

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Process Server (WID/WPS/WAS+) » Setting Expiry on MQMD (MQ Import)
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.