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 » IBM MQ Java / JMS » getStringProperty("JMSXAppID") problem

Post new topic  Reply to topic
 getStringProperty("JMSXAppID") problem « View previous topic :: View next topic » 
Author Message
aw_all
PostPosted: Mon Aug 09, 2010 11:44 pm    Post subject: getStringProperty("JMSXAppID") problem Reply with quote

Newbie

Joined: 05 Aug 2010
Posts: 6

I found out that in JMS,
Code:
Message.getStringProperty("JMSXAppID")

is a similar methods to putApplicationName in IBM MQAPI.

however this line cause an exception, and when i print out the exception, it's null.

Is it related to the client? The client is a non JMS client, so I guess it will not set String Property.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Aug 10, 2010 12:31 am    Post subject: Re: getStringProperty("JMSXAppID") problem Reply with quote

Grand High Poobah

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

aw_all wrote:
I found out that in JMS,
Code:
Message.getStringProperty("JMSXAppID")

is a similar methods to putApplicationName in IBM MQAPI.

however this line cause an exception, and when i print out the exception, it's null.

Is it related to the client? The client is a non JMS client, so I guess it will not set String Property.

You're not coming through very clearly here.
Which API are you using, what are you trying to accomplish?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
aw_all
PostPosted: Tue Aug 10, 2010 12:51 am    Post subject: Reply with quote

Newbie

Joined: 05 Aug 2010
Posts: 6

I am using JMS, and trying to do something similar to putApplicationName, i want to get the name of the apllication that give the response.

So I use
Code:

try {
    Message.getStringProperty("JMSXAppID");
    // where Message is an instanceof BytesMessage
} catch (JMSException je) {
    //catch JMSException
} catch (Exception e) {
    //catch any other Exception
    System.out.println(e); //<----exception printed out is null
}


but it resulted in an Exception, and the thing it printed out is null.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Aug 10, 2010 10:32 am    Post subject: Reply with quote

Grand High Poobah

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

What is the linked exception and what is the reason code?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
aw_all
PostPosted: Tue Aug 10, 2010 6:53 pm    Post subject: Reply with quote

Newbie

Joined: 05 Aug 2010
Posts: 6

problem solved, thank you for helping
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Aug 11, 2010 4:44 am    Post subject: Reply with quote

Grand High Poobah

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

aw_all wrote:
problem solved, thank you for helping


Care to post the solution for the benefit of others?
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » IBM MQ Java / JMS » getStringProperty("JMSXAppID") problem
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.