This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes EJB and other Java EE Technologies and the fly likes can't set application specific properties Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "can Watch "can New topic
Author

can't set application specific properties

Gamb Rockwell
Greenhorn

Joined: Dec 09, 2003
Posts: 25
I am trying to set an application specific property on a message from a java program usign JMS and websphere MQ 5.3 but keep on getting errors when I try to open the message.

My code to set the property is :

message.setIntProperty("OrderNumber",num);

In my other application when I try to read the the property :

int prop = msg.getIntProperty("OrderNumber");


The error that I get is :

java.lang.NumberFormatException

at com.ibm.jms.JMSMessage.toInt(JMSMessage.java:6132)
at com.ibm.jms.JMSMessage.getIntProperty(JMSMessage.java:4012)
at com.verizon.aedw.SortMsg.MsgSorter.main(MsgSorter.java:82)
Exception in thread "main"


Also when I print out all message properties, my property "OrderNumber" does not show up in the receiving applications list.


If the problem is that I can't set the property do you know what could prevent me from doing that.

Thanks for your help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can't set application specific properties