JBoss hornetq SVN: r12216 - trunk/hornetq-journal/src/main/java/org/hornetq/core/asyncio/impl.
by do-not-reply@jboss.org
Author: borges
Date: 2012-02-28 11:44:34 -0500 (Tue, 28 Feb 2012)
New Revision: 12216
Modified:
trunk/hornetq-journal/src/main/java/org/hornetq/core/asyncio/impl/AsynchronousFileImpl.java
Log:
Add dummy hashCode and equals to document situation with CallbackHolder.compareTo(,)
Modified: trunk/hornetq-journal/src/main/java/org/hornetq/core/asyncio/impl/AsynchronousFileImpl.java
===================================================================
--- trunk/hornetq-journal/src/main/java/org/hornetq/core/asyncio/impl/AsynchronousFileImpl.java 2012-02-28 16:44:20 UTC (rev 12215)
+++ trunk/hornetq-journal/src/main/java/org/hornetq/core/asyncio/impl/AsynchronousFileImpl.java 2012-02-28 16:44:34 UTC (rev 12216)
@@ -790,6 +790,24 @@
this.message = message;
}
+
+ /**
+ * See {@link CallbackHolder}.
+ */
+ @Override
+ public int hashCode()
+ {
+ return super.hashCode();
+ }
+
+ /**
+ * See {@link CallbackHolder}.
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ return super.equals(obj);
+ }
}
private class PollerRunnable implements Runnable
12 years, 10 months
JBoss hornetq SVN: r12215 - trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest.
by do-not-reply@jboss.org
Author: borges
Date: 2012-02-28 11:44:20 -0500 (Tue, 28 Feb 2012)
New Revision: 12215
Modified:
trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/Hornetq.java
Log:
Remove misleading variable initialization.
Modified: trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/Hornetq.java
===================================================================
--- trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/Hornetq.java 2012-02-28 16:44:06 UTC (rev 12214)
+++ trunk/hornetq-rest/hornetq-rest/src/main/java/org/hornetq/rest/Hornetq.java 2012-02-28 16:44:20 UTC (rev 12215)
@@ -1,12 +1,5 @@
package org.hornetq.rest;
-import org.hornetq.api.core.client.ClientMessage;
-import org.jboss.resteasy.spi.ResteasyProviderFactory;
-import org.hornetq.rest.util.HttpMessageHelper;
-import org.jboss.resteasy.util.GenericType;
-
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.ext.MessageBodyReader;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -14,6 +7,14 @@
import java.io.Serializable;
import java.lang.reflect.Type;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.ext.MessageBodyReader;
+
+import org.hornetq.api.core.client.ClientMessage;
+import org.hornetq.rest.util.HttpMessageHelper;
+import org.jboss.resteasy.spi.ResteasyProviderFactory;
+import org.jboss.resteasy.util.GenericType;
+
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
@@ -44,7 +45,7 @@
public static void setEntity(ClientMessage message, Serializable object, String contentType)
{
if (contentType != null) message.putStringProperty(HttpHeaderProperty.CONTENT_TYPE, contentType);
- byte[] data = new byte[0];
+ byte[] data;
try
{
ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
@@ -90,7 +91,6 @@
*
* @param message
* @param type
- * @param <T>
* @return
*/
public static <T> T getEntity(ClientMessage message, Class<T> type)
@@ -104,7 +104,6 @@
* @param message
* @param type
* @param factory
- * @param <T>
* @return
*/
public static <T> T getEntity(ClientMessage message, Class<T> type, ResteasyProviderFactory factory)
@@ -118,7 +117,6 @@
* @param message
* @param type
* @param factory
- * @param <T>
* @return
* @throws UnknownMediaType
* @throws UnmarshalException
12 years, 10 months
JBoss hornetq SVN: r12214 - trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl.
by do-not-reply@jboss.org
Author: borges
Date: 2012-02-28 11:44:06 -0500 (Tue, 28 Feb 2012)
New Revision: 12214
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
Log:
threadPool gets shutdownNow() after time-out.
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2012-02-28 16:43:48 UTC (rev 12213)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2012-02-28 16:44:06 UTC (rev 12214)
@@ -612,21 +612,18 @@
postOffice.stop();
}
+
if (scheduledPool != null)
{
- List<Runnable> tasks = scheduledPool.shutdownNow();
- for (Runnable task : tasks)
+ // we just interrupt all running tasks, these are supposed to be pings and the like.
+ scheduledPool.shutdownNow();
+ }
+
+ if (memoryManager != null)
{
- HornetQServerImpl.log.info(this + "::Waiting for " + task);
+ memoryManager.stop();
}
- }
- if (memoryManager != null)
- {
- memoryManager.stop();
- }
-
-
if (threadPool != null)
{
threadPool.shutdown();
@@ -634,29 +631,24 @@
{
if (!threadPool.awaitTermination(10, TimeUnit.SECONDS))
{
- HornetQServerImpl.log.warn("Timed out waiting for pool to terminate");
+ HornetQServerImpl.log.warn("Timed out waiting for pool to terminate " + threadPool +
+ ". Interrupting all its threads!");
+ for (Runnable r : threadPool.shutdownNow())
+ {
+ log.debug("Cancelled the execution of " + r);
+ }
}
}
catch (InterruptedException e)
{
// Ignore
}
- threadPool = null;
}
- try
- {
- if (!scheduledPool.awaitTermination(10, TimeUnit.SECONDS))
- {
- HornetQServerImpl.log.warn("Timed out waiting for scheduled pool to terminate");
- }
- }
- catch (InterruptedException e)
- {
- // Ignore
- }
+ scheduledPool = null;
+ threadPool = null;
- securityStore.stop();
+ securityStore.stop();
threadPool = null;
12 years, 10 months
JBoss hornetq SVN: r12213 - trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl.
by do-not-reply@jboss.org
Author: borges
Date: 2012-02-28 11:43:48 -0500 (Tue, 28 Feb 2012)
New Revision: 12213
Modified:
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFile.java
Log:
Avoid warnings if the file does not exist.
Modified: trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFile.java
===================================================================
--- trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFile.java 2012-02-28 14:55:00 UTC (rev 12212)
+++ trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFile.java 2012-02-28 16:43:48 UTC (rev 12213)
@@ -103,7 +103,7 @@
close();
}
- if (!file.delete())
+ if (file.exists() && !file.delete())
{
log.error("Failed to delete file " + this);
}
12 years, 10 months
JBoss hornetq SVN: r12212 - branches.
by do-not-reply@jboss.org
Author: jbertram
Date: 2012-02-28 09:55:00 -0500 (Tue, 28 Feb 2012)
New Revision: 12212
Added:
branches/Branch_2_2_EAP_HORNETQ-787/
Log:
[HORNETQ-787] create branch for this feature
12 years, 10 months
JBoss hornetq SVN: r12211 - projects/jopr-plugin/trunk/src/main/java/org/jboss/as/integration/hornetq/jopr.
by do-not-reply@jboss.org
Author: ataylor
Date: 2012-02-28 05:53:50 -0500 (Tue, 28 Feb 2012)
New Revision: 12211
Modified:
projects/jopr-plugin/trunk/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSConnectionFactoryDiscoveryComponent.java
projects/jopr-plugin/trunk/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSQueueDiscoveryComponent.java
projects/jopr-plugin/trunk/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSTopicDiscoveryComponent.java
Log:
HORNETQ-852 - fixed version of components
Modified: projects/jopr-plugin/trunk/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSConnectionFactoryDiscoveryComponent.java
===================================================================
--- projects/jopr-plugin/trunk/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSConnectionFactoryDiscoveryComponent.java 2012-02-27 20:40:42 UTC (rev 12210)
+++ projects/jopr-plugin/trunk/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSConnectionFactoryDiscoveryComponent.java 2012-02-28 10:53:50 UTC (rev 12211)
@@ -53,8 +53,8 @@
set.add(new DiscoveredResourceDetails(resourceType,
queueName,
queueName,
+ null,
"a JMS ConnectionFactory",
- "",
resourceDiscoveryContext.getDefaultPluginConfiguration(),
null));
}
Modified: projects/jopr-plugin/trunk/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSQueueDiscoveryComponent.java
===================================================================
--- projects/jopr-plugin/trunk/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSQueueDiscoveryComponent.java 2012-02-27 20:40:42 UTC (rev 12210)
+++ projects/jopr-plugin/trunk/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSQueueDiscoveryComponent.java 2012-02-28 10:53:50 UTC (rev 12211)
@@ -58,8 +58,8 @@
set.add(new DiscoveredResourceDetails(resourceType,
queueName,
queueName,
+ null,
"a JMS Queue",
- "",
resourceDiscoveryContext.getDefaultPluginConfiguration(),
null));
}
Modified: projects/jopr-plugin/trunk/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSTopicDiscoveryComponent.java
===================================================================
--- projects/jopr-plugin/trunk/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSTopicDiscoveryComponent.java 2012-02-27 20:40:42 UTC (rev 12210)
+++ projects/jopr-plugin/trunk/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSTopicDiscoveryComponent.java 2012-02-28 10:53:50 UTC (rev 12211)
@@ -59,11 +59,11 @@
set.add(new DiscoveredResourceDetails(resourceType,
queueName,
queueName,
+ null,
"a JMS Topic",
- "",
resourceDiscoveryContext.getDefaultPluginConfiguration(),
null));
}
return set;
}
-}
\ No newline at end of file
+}
12 years, 10 months
JBoss hornetq SVN: r12210 - trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl.
by do-not-reply@jboss.org
Author: clebert.suconic
Date: 2012-02-27 15:40:42 -0500 (Mon, 27 Feb 2012)
New Revision: 12210
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionImpl.java
Log:
https://issues.jboss.org/browse/JBPAPP-8243 - duh
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionImpl.java 2012-02-27 20:35:44 UTC (rev 12209)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionImpl.java 2012-02-27 20:40:42 UTC (rev 12210)
@@ -1908,7 +1908,7 @@
private void doCleanup(boolean failingOver)
{
- if (remotingConnection == null)
+ if (remotingConnection != null)
{
remotingConnection.removeFailureListener(this);
}
12 years, 10 months
JBoss hornetq SVN: r12209 - in branches/Branch_2_2_AS7/src/main/org/hornetq/core: config/impl and 1 other directory.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2012-02-27 15:35:44 -0500 (Mon, 27 Feb 2012)
New Revision: 12209
Modified:
branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
branches/Branch_2_2_AS7/src/main/org/hornetq/core/config/impl/Validators.java
Log:
JBPAPP-8246 - Possible (unlikely though) NPE on validators
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
===================================================================
--- branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2012-02-27 20:32:06 UTC (rev 12208)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2012-02-27 20:35:44 UTC (rev 12209)
@@ -1909,7 +1909,7 @@
private void doCleanup(boolean failingOver)
{
- if (remotingConnection == null)
+ if (remotingConnection != null)
{
remotingConnection.removeFailureListener(this);
}
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/core/config/impl/Validators.java
===================================================================
--- branches/Branch_2_2_AS7/src/main/org/hornetq/core/config/impl/Validators.java 2012-02-27 20:32:06 UTC (rev 12208)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/core/config/impl/Validators.java 2012-02-27 20:35:44 UTC (rev 12209)
@@ -69,7 +69,7 @@
public void validate(final String name, final Object value)
{
Number val = (Number)value;
- if (val != null && val.intValue() < 0 || val.intValue() > 100)
+ if (val != null && (val.intValue() < 0 || val.intValue() > 100))
{
throw new IllegalArgumentException(String.format("%s must be a valid percentual value between 0 and 100 (actual value: %s)",
name,
12 years, 10 months
JBoss hornetq SVN: r12208 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2012-02-27 15:32:06 -0500 (Mon, 27 Feb 2012)
New Revision: 12208
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
Log:
https://issues.jboss.org/browse/JBPAPP-8243 - duh!
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2012-02-27 20:30:27 UTC (rev 12207)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2012-02-27 20:32:06 UTC (rev 12208)
@@ -1909,7 +1909,7 @@
private void doCleanup(boolean failingOver)
{
- if (remotingConnection == null)
+ if (remotingConnection != null)
{
remotingConnection.removeFailureListener(this);
}
12 years, 10 months
JBoss hornetq SVN: r12207 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/config/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2012-02-27 15:30:27 -0500 (Mon, 27 Feb 2012)
New Revision: 12207
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/config/impl/Validators.java
Log:
JBPAPP-8246 - Possible (unlikely though) NPE on validators
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/config/impl/Validators.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/config/impl/Validators.java 2012-02-27 15:05:24 UTC (rev 12206)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/config/impl/Validators.java 2012-02-27 20:30:27 UTC (rev 12207)
@@ -69,7 +69,7 @@
public void validate(final String name, final Object value)
{
Number val = (Number)value;
- if (val != null && val.intValue() < 0 || val.intValue() > 100)
+ if (val == null || (val.intValue() < 0 || val.intValue() > 100))
{
throw new IllegalArgumentException(String.format("%s must be a valid percentual value between 0 and 100 (actual value: %s)",
name,
12 years, 10 months