This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unable to receive object message

 
Ambika Jain
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am unable to read the ObjectMessage at the receiving end.

--------------------code for sending object message-------
:
msg = ses.createObjectMessage();
File f = new File("C:/My/Work/SunMQ/P4");
msg.setObject(f);

msgPro.send(ses.createMessage());
:
---------------------------------------------------------
--------------------code for receiving object message----
:
while(true){
Message m = msgCons.receive();
System.out.println(" 1a" + m.getJMSMessageID());
if ( m instanceof ObjectMessage){ // my message doesn't get inside this loop

File f = (File) m;
System.out.println(" Message receive ");

}else { break; }
}
:
---------------------------------------------------------
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic