[jboss-user] [JBoss Messaging] - Re: MessageConsumer thread never goes away

chip_schoch do-not-reply at jboss.com
Thu Jan 11 18:03:04 EST 2007

I am not sure what JBM is but I am running jdk1.5.0_10, JBoss 4.0.5 GA, and Messaging 1.0.1GA.   It would be difficult to post my actual code in this forum but it is essentially executing the following in the onMessage().

	       Properties p = new Properties ();

	        p.put (Context.PROVIDER_URL, "jnp://localhost:1099");
	        p.put (Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
	        p.put (Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");

	        InitialContext context = new InitialContext (p);

	        MessageConsumer consumer = null;
	        int             count    = 0;
	        Queue queue = (Queue) context.lookup (queuename);

	            consumer = jmssession.createConsumer (queue);
                     ... do something here
	        catch (Exception e)
	            System.err.println( "Exception while trying to clear error queue");

I verified that the createConsumer line is where the thread is being created and the thread remains when I undeploy my service.  Each time a message goes through a new thread is created that never goes away.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4000634#4000634

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4000634

More information about the jboss-user mailing list