commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Marsh <mars...@nitesco.com>
Subject Re: commons messenger
Date Sun, 14 Jul 2002 15:21:35 GMT
Following is the stack trace from the exception. What's interesting is
that my code is in a loop consuming messages, only doing the open once.
The stack trace looks like it's in the open code (createMessageConsumer)
again..... 

com.mycompany.thiercompany.FACTSClickQueueListener     - client.run 
  javax.jms.JMSException: MQJMS2008: failed to open MQ queue      at
 
com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:418)  
at
 
com.ibm.mq.jms.MQQueueSession.createReceiver(MQQueueSession.java:434)       
at
 
com.ibm.mq.jms.MQQueueSession.createReceiver(MQQueueSession.java:368)       
at
 
org.apache.commons.messenger.MessengerSupport.createMessageConsumer(MessengerSupport.java:824)
     
  at
org.apache.commons.messenger.MessengerSupport.getMessageConsumer(MessengerSupport.java:790)

at
 
org.apache.commons.messenger.MessengerSupport.receive(MessengerSupport.java:227)    
at
 
com.mycompany.thiercompany.FACTSClickQueueListener.run(FACTSClickQueueListener.java(Compiled
Code))       at
 
com.mycompany.thiercompany.FACTSClickQueueListener.main(FACTSClickQueueListener.java:67) 
at
  java.lang.reflect.Method.invoke(Native Method)       at
 
com.ibm.websphere.client.applicationclient.launchClient.createContainerAndLaunchApp(launchClient.java:448)
 
  at
com.ibm.websphere.client.applicationclient.launchClient.main(launchClient.java:304) 
at
  java.lang.reflect.Method.invoke(Native Method)       at
  com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:158)


James Strachan wrote:
> 
> From: "Thomas Marsh" <marsht1@nitesco.com>
> > Hi all. Back again.
> >
> > We've been using commons messenger with IBM's MQSeries in unit test /
> > system test mode now for about a month. Things have been going sweetly.
> 
> Great!
> 
> > We're using it in an application (not a servlet) with a client
> > connection (TCPIP) from an AIX platform to an MVS platform. The
> > application picks up xml point-to-point messages from the queue and
> > passes them to an EJB for processing. (Websphere 4.0 AE does not have
> > MDBs).
> >
> > Periodically, the MQ administrator will ask, "Why do I see the number of
> > connections on the MQ monitor grow? Most of the time, I only see one
> > connection per application / per queue".
> >
> > This week, we've been cranking up the volume and BANG! We get an MQ
> > message on both the consumer and the producer's side saying "error 2017
> > - Handle_not_available". We restart the application and everythings
> > OK.... Always seems to die around message 127.....
> >
> > code on the consumer:
> >
> > messenger = MessengerManager.get(jndiQCF);
> > if (messenger == null) {
> > throw new JMSException("No such messenger called: " + jndiQCF);
> > }
> > Destination destination = messenger.getDestination(jndiQ);
> > if (destination == null) {
> > throw new JMSException("Could not find destination: " + jndiQ);
> > }
> > do {
> > if (fcqlEJB == null) {
> > try {
> > fcqlEJB = getEJB(ejbserver, ejblookupname);
> > } catch (Exception e) {
> > logger.fatal("client.run", e);
> > return;
> > }
> > }
> >
> > TextMessage textMessage = (TextMessage)
> > messenger.receive(destination);
> > msgtext = textMessage.getText();
> >
> > // use the reflected method to execute the onMessage(String msg)
> > method
> > try {
> > onMessageMethod.invoke(fcqlEJB, new Object[] { msgtext });
> > messenger.commit();
> > } catch (Exception e) {
> > messenger.rollback();
> > logger.error("onMessage invoke failed", e);
> > return;
> > }
> >
> > if (logger.isDebugEnabled()) {
> > logger.debug(textMessage.getJMSMessageID());
> > logger.debug("Message text" + msgtext);
> > }
> > } while (rf);
> >
> > // close the JMS connection to release any background threads
> > messenger.close();
> >
> > Is the messenger using the same connection each receive? Does anyone
> > have any ideas?
> 
> The messenger.close() will close the current connection. Are you sure you
> want to do that for each time you send a message?
> 
> Just in case anything wacky was going on I've just been over the close logic
> once more and patched the code slightly so that I'm pretty sure now that
> close() will correctly close things down nicely even if some wierd exception
> were to occur during the close. I wonder if using the latest CVS HEAD fixes
> it?
> 
> BTW do you have a stack trace for the error you get with MQ?
> 
> James
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>

-- 
Tom Marsh

mailto:marsht1@nitesco.com
http://www.nitesco.com

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message