[jboss-cvs] JBossAS SVN: r71498 - trunk/jbossmq/src/main/org/jboss/mq/server.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Mar 31 14:57:14 EDT 2008
Author: adrian at jboss.org
Date: 2008-03-31 14:57:14 -0400 (Mon, 31 Mar 2008)
New Revision: 71498
Modified:
trunk/jbossmq/src/main/org/jboss/mq/server/ClientConsumer.java
Log:
Port JBAS-5354 from 4.2.x
Modified: trunk/jbossmq/src/main/org/jboss/mq/server/ClientConsumer.java
===================================================================
--- trunk/jbossmq/src/main/org/jboss/mq/server/ClientConsumer.java 2008-03-31 18:56:58 UTC (rev 71497)
+++ trunk/jbossmq/src/main/org/jboss/mq/server/ClientConsumer.java 2008-03-31 18:57:14 UTC (rev 71498)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.mq.server;
import java.util.HashMap;
@@ -122,8 +122,22 @@
messages.add(r);
if (!enqueued)
{
- threadPool.run(this);
enqueued = true;
+ boolean interrupted = Thread.interrupted();
+ try
+ {
+ threadPool.run(this);
+ }
+ catch (Exception e)
+ {
+ log.debug("Unable to use thread pool for delivering messages, will use the sending thread", e);
+ run();
+ }
+ finally
+ {
+ if (interrupted)
+ Thread.currentThread().interrupt();
+ }
}
}
}
More information about the jboss-cvs-commits
mailing list