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 » General Discussion » Generating Binary Correlation-ID from BigInteger not working

Post new topic  Reply to topic
 Generating Binary Correlation-ID from BigInteger not working « View previous topic :: View next topic » 
Author Message
starki78
PostPosted: Fri Jan 06, 2012 4:17 am    Post subject: Generating Binary Correlation-ID from BigInteger not working Reply with quote

Acolyte

Joined: 24 Sep 2007
Posts: 53

Hello,

We found out that we can make a successful Correlation with our Business partner (MQ-Series 6) if we set the Correlation-ID

this way:


String corrid = "EDE12333345555"

//setCorrelation ID for sending
correlationID = corrid.getBytes()




It fails this way:


//setCorrelation ID for sending
correlationID = generate();


public static byte[] generate()
{
BigInteger localBigInteger = BigInteger.valueOf(System.currentTimeMillis());
return localBigInteger.toByteArray();
}



Is there any explanation for this, any specification which can justify this?


I did a lot of research and found both combinations being used in the practise.


Thanks a lot
Starki
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jan 06, 2012 5:38 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Obvious question = why are you manually generating an id? Why not let the system generate one?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
starki78
PostPosted: Fri Jan 06, 2012 8:06 am    Post subject: Reply with quote

Acolyte

Joined: 24 Sep 2007
Posts: 53

thanks for your feedback.
We are non using WebSphere on the Client-Side but Java and need to implement this manually.

We have a Request-Response sceario

Java--->MQ-Request-Queue-->Custom Code (not changed for 7 years)-->
MQ-Response-Queue-->Java

And we need to understand why only
correlationID =corrid.getBytes()

and especially if this has any documented explanation.

I know that old examples use corrid.getBytes()
but do not understand the difference to the other option
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jan 06, 2012 8:12 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Look at the JMS and java base examples for request reply scenario.

They will give you more clarity.

Then post again a clear question. What you have posted so far is more "why does this not work" than "this is our design, what is the flaw in it..."...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
starki78
PostPosted: Fri Jan 06, 2012 8:25 am    Post subject: Reply with quote

Acolyte

Joined: 24 Sep 2007
Posts: 53

I reviewed them several times
over and over.

Sorry I think my question is very clear
but maybe wrong

bye
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jan 06, 2012 8:27 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

starki78 wrote:
I reviewed them several times
over and over.

Sorry I think my question is very clear
but maybe wrong

bye

Well the answer to your very clear question is that the correlationId is defined as byte[] (MQBYTE[24]). Deal with it!
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » Generating Binary Correlation-ID from BigInteger not working
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.