5 Replies Latest reply on Oct 3, 2002 1:41 PM by simon smith

    JMS context prob, onException thrown

    simon smith Newbie

      Hi Folks,
      We ve been working with 2.4.4 for a while now and everything is hunky dory, So we decided to move up to 3.0.2 so we could use the onException method of JMS which supposedly didn't work with 2.4.4.
      The App runs up a JMS connection to a JBRoker server and grabs a request off it. The system then does various things with this request until its time to post it onto our own JBOSS queue for the other system to pick it up, it is here where we fall over on a onException() message.

      The system requires that we we have to different JNDI setup, which we do in code. Please see below that when we look for the request on the JBRoker server we use their specific JNDI, before we log our request(return) onto our own queue we swap the JNDI before getting the context, well we don't it falls over as its trying to get the new context.
      See below for output.
      FIRST THING TO LOOK FOR IS THE JNDI VARIABLES, the first context is created succesfully ( look at the oi 1 , oi 2 .....) , If you now go to the second set of JNDI VARIABLES where we try and creat the second CONTEXT you ll see that only "oi 0" is printed to the screen, you'll see the values of our JNDI vars were trying to assign.


      PLEASE any info mucho appreciated, remeber it worked seamlessly in 2.4.4 so it could be something as simple as a config variation.
      DEBUG [main] (?:?) - com.sssw.jbroker.rmi.PortableRemoteObjectDelegate
      DEBUG [main] (?:?) - com.sssw.jms.naming.JMQObjectFactory
      DEBUG [main] (?:?) - com.sssw.jbroker.rmi.UtilDelegate
      DEBUG [main] (?:?) - com.sun.jndi.cosnaming.CNCtxFactory
      DEBUG [main] (?:?) - iioploc://192.168.70.26:3506
      DEBUG [main] (?:?) - com.sssw.jbroker.rmi.StubDelegate
      DEBUG [main] (?:?) - oi 0.5
      DEBUG [main] (?:?) - oi 1
      DEBUG [main] (?:?) - oi 2
      DEBUG [main] (?:?) - oi 3
      DEBUG [main] (JMSFactory.java:167) - com.pindartech.yponyell.request.RequestHandler@ce40dd subscribed to queue: queue/queue0
      DEBUG [main] (SybaseDAO.java:58) - creating SybaseDAO object...
      DEBUG [main] (RequestHandler.java:128) - RequestHandler initialisation complete...
      DEBUG [JBroker Worker 1] (RequestHandler.java:150) - Current timestamp...1033485370659
      DEBUG [JBroker Worker 1] (RequestHandler.java:151) - Message timestamp...1033467383691
      DEBUG [JBroker Worker 1] (RequestHandler.java:155) - Trigger age...1033467383691
      DEBUG [JBroker Worker 1] (RequestHandler.java:169) - Started message processing at...1033485370705
      DEBUG [JBroker Worker 1] (RequestHeader.java:459) - assigned request data
      DEBUG [JBroker Worker 1] (RequestHeader.java:399) - HERE IS THE MERGED ORDER IDBL51162F000001
      DEBUG [JBroker Worker 1] (Request.java:81) - In checkBookAndSize(Request)...
      DEBUG [JBroker Worker 1] (SybaseDAO.java:116) - starting DB conn...
      DEBUG [JBroker Worker 1] (?:?) - executing stored proc...
      DEBUG [JBroker Worker 1] (?:?) - extracting results...
      DEBUG [JBroker Worker 1] (Request.java:99) - alreet Im here about to return the data 0
      DEBUG [JBroker Worker 1] (Request.java:113) - alreet Im here about to return the data 1
      DEBUG [JBroker Worker 1] (Request.java:117) - alreet Im here about to return the data5
      DEBUG [JBroker Worker 1] (Request.java:129) - In updateRequestStatus(Request)...
      DEBUG [JBroker Worker 1] (?:?) - executing stored proc...
      DEBUG [JBroker Worker 1] (?:?) - extracting results...
      DEBUG [JBroker Worker 1] (Request.java:142) - advert already requested
      DEBUG [JBroker Worker 1] (SybaseDAO.java:125) - stopping DB conn...
      DEBUG [JBroker Worker 1] (Request.java:178) - Oaky at the end of updated REqueststatus
      DEBUG [JBroker Worker 1] (RequestHandler.java:183) - Request status problem...
      DEBUG [JBroker Worker 1] (RequestHandler.java:192) - YA BASSS 3
      DEBUG [JBroker Worker 1] (YPError.java:160) - yo mamamamama
      DEBUG [JBroker Worker 1] (Sender.java:165) - about to GET NEW FACTORY JMS
      DEBUG [JBroker Worker 1] (?:?) - Getting context...
      DEBUG [JBroker Worker 1] (?:?) - ConnectionFactory
      DEBUG [JBroker Worker 1] (?:?) - oi 0
      DEBUG [JBroker Worker 1] (?:?) - org.jnp.interfaces.NamingContextFactory
      DEBUG [JBroker Worker 1] (?:?) - onion:1099
      DEBUG [JBroker Worker 1] (?:?) - org.jboss.naming
      FATAL [JBroker Worker 1] (RequestHandler.java:226) - Connection lost!
      FATAL [JBroker Worker 1] (RequestHandler.java:227) - Exception: onMessage raised unexpected exception
      com.sssw.jms.api.JMQMessageNotDeliveredException: onMessage raised unexpected exception
      at java.lang.Throwable.fillInStackTrace(Native Method)
      at java.lang.Throwable.fillInStackTrace(Compiled Code)
      at java.lang.Throwable.(Compiled Code)
      at java.lang.Exception.(Compiled Code)
      at javax.jms.JMSException.(JMSException.java:62)
      at com.sssw.jms.api.JMQMessageNotDeliveredException.(JMQMessageNotDeliveredException.java:54)
      at com.sssw.jms.core.JMQMessageConsumer.run(Compiled Code)
      at com.sssw.jms.core.JMQMessageConsumer.receiveMessages(JMQMessageConsumer.java:339)
      at com.sssw.jms.core.MessageClientImpl.receiveMessages(Compiled Code)