Note that there are some explanatory texts on larger screens.

plurals
  1. POJMS poison message removal
    text
    copied!<p>I'm trying to debug a web app hostde on weblogic 10r3 server. The App is receiving input from foreign IBM JMS Queue (classname: <code>com.ibm.mq.jms.MQQueue</code>) via Java Message Driven Beans.</p> <p>I wrote a small Test App to connect to that queue and sending test messages. The problem is for now test message generates exceptions and somehow it gets put back on queue and is looping again and again. This generate lots of exceptions rendering log unreadable.</p> <p>First I tried remove the poison message by constructing a consumer on my Test App, but the code blocks indefinitely on <code>consumer.receive()</code>.</p> <p>Then I tried to set <code>JMSexpiration</code> to some number instead of default 0, but in the end the message still used 0 as expiration.</p> <p>All Ideas Welcome, Many Thanks </p> <p>Code outline the JMS PRODUCER:</p> <pre><code> static String rawTradeUpload = "some long chunk of data" Hashtable ht = new Hashtable(); ht.put(Context.INITIAL_CONTEXT_FACTORY, weblogic.jndi.WLInitialContextFactory.class.getName()); //ht.put(Context.PROVIDER_URL, "t3://gprimeap1d.eur.nsroot.net:12016"); ht.put(Context.PROVIDER_URL, "t3://gprimeap1d.eur.nsroot.net:12001"); ht.put(Context.SECURITY_PRINCIPAL, "weblogic"); ht.put(Context.SECURITY_CREDENTIALS, "welcome5"); Connection con = null; Session s = null; try { if(ctx == null) ctx = new InitialContext(ht); ConnectionFactory myConnFactory = null; Queue myQueue = null; myConnFactory = (ConnectionFactory) ctx .lookup("SwiftConnectionFactory"); con = myConnFactory.createConnection(); s = con.createSession(false, Session.AUTO_ACKNOWLEDGE); myQueue = (Queue) ctx .lookup("IncomingSwiftFxQueue"); MessageProducer producer = s.createProducer(myQueue); Message msg = s.createTextMessage(rawTradeUpload); producer.send(msg); s.close(); con.close(); } catch (NamingException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (JMSException e) { // TODO Auto-generated catch block e.printStackTrace(); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload