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);

                try
                {
                    consumer = jmssession.createConsumer (queue);
        
                     ... do something here
]
                        consumer.close();
                 }
                
           
                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.

Thanks


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
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to