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 » JMS Linked Exception???

Post new topic  Reply to topic
 JMS Linked Exception??? « View previous topic :: View next topic » 
Author Message
cschaul
PostPosted: Tue Apr 22, 2003 11:37 am    Post subject: JMS Linked Exception??? Reply with quote

Novice

Joined: 08 Nov 2002
Posts: 13

How do i get the linked exception in this snippet of code? It only gos into the throwable catch block. Im calling this method from another class with:
Sender.sendMessage(text);

Here's the sendmessage method:
public void sendMessage(String text) {
try {
TextMessage message = session.createTextMessage(text);
sender.send(message);
} catch (JMSException jmsx) {
System.out.println("There was an error");
jmsx.printStackTrace();
Exception ex = jmsx.getLinkedException();
if (ex != null) {
ex.printStackTrace();
}
} catch (Throwable e) {
setExceptionMessage(e);
System.out.println("Error sending message:" + message + " Reason: " + e.getMessage());
}
}
Back to top
View user's profile Send private message
techno
PostPosted: Tue Apr 22, 2003 9:12 pm    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

You may not be getting JMSException !!
Back to top
View user's profile Send private message
cschaul
PostPosted: Wed Apr 23, 2003 3:24 am    Post subject: Reply with quote

Novice

Joined: 08 Nov 2002
Posts: 13

Ok, i was trying to test it by connecting to nonexistent queues and trying to put a message on those queues. That wouldnt throw a JMSException?
If it doesnt, what such test could i setup so it would throw that type of exception?

Thanks,
Chris
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 » JMS Linked Exception???
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.