Author: pferraro
Date: 2008-09-11 13:36:09 -0400 (Thu, 11 Sep 2008)
New Revision: 1810
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/ha/ClusteredMCMPHandlerImpl.java
Log:
Label as thread safe
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/ha/ClusteredMCMPHandlerImpl.java
===================================================================
---
trunk/mod_cluster/src/main/java/org/jboss/modcluster/ha/ClusteredMCMPHandlerImpl.java 2008-09-11
17:34:32 UTC (rev 1809)
+++
trunk/mod_cluster/src/main/java/org/jboss/modcluster/ha/ClusteredMCMPHandlerImpl.java 2008-09-11
17:36:09 UTC (rev 1810)
@@ -31,18 +31,12 @@
import java.util.concurrent.atomic.AtomicInteger;
import net.jcip.annotations.GuardedBy;
+import net.jcip.annotations.ThreadSafe;
import org.apache.catalina.util.StringManager;
import org.jboss.ha.framework.interfaces.HAServiceKeyProvider;
import org.jboss.ha.framework.interfaces.HASingletonMBean;
import org.jboss.logging.Logger;
-import org.jboss.modcluster.config.MCMPHandlerConfiguration;
-import org.jboss.modcluster.mcmp.AbstractMCMPHandler;
-import org.jboss.modcluster.mcmp.AddressPort;
-import org.jboss.modcluster.mcmp.MCMPHandler;
-import org.jboss.modcluster.mcmp.MCMPRequest;
-import org.jboss.modcluster.mcmp.MCMPServer;
-import org.jboss.modcluster.mcmp.MCMPServerState;
import org.jboss.modcluster.Constants;
import org.jboss.modcluster.Utils;
import org.jboss.modcluster.ha.rpc.BooleanGroupRpcResponse;
@@ -52,7 +46,14 @@
import org.jboss.modcluster.ha.rpc.MCMPServerDiscoveryEvent;
import org.jboss.modcluster.ha.rpc.StringGroupRpcResponse;
import org.jboss.modcluster.ha.rpc.ThrowableGroupRpcResponse;
+import org.jboss.modcluster.mcmp.AbstractMCMPHandler;
+import org.jboss.modcluster.mcmp.AddressPort;
+import org.jboss.modcluster.mcmp.MCMPHandler;
+import org.jboss.modcluster.mcmp.MCMPRequest;
+import org.jboss.modcluster.mcmp.MCMPServer;
+import org.jboss.modcluster.mcmp.MCMPServerState;
+@ThreadSafe
public class ClusteredMCMPHandlerImpl extends AbstractMCMPHandler implements
ClusteredMCMPHandler
{
static final Object[] NULL_ARGS = new Object[0];
@@ -67,7 +68,6 @@
private final MCMPHandler localHandler;
private final HASingletonMBean singleton;
private final ClusteredMCMPHandlerRpcHandler rpcStub = new RpcStub();
-// private AdvertiseListener advertiseListener;
private volatile String haServiceName;
@@ -422,7 +422,7 @@
{
// Just log it; we'll retry later
String msg = addition ? "modcluster.error.discovery.add" :
"modcluster.error.discovery.remove";
- log.error(this.sm.getString(msg, address, new Integer(port)),
((ThrowableGroupRpcResponse) response).getValue());
+ log.error(this.sm.getString(msg, address, Integer.valueOf(port)),
((ThrowableGroupRpcResponse) response).getValue());
}
}
@@ -430,7 +430,7 @@
{
synchronized (this.errorState)
{
- if (this.errorState.size() == 0 || this.errorState.get(this.errorState.size()
-1).booleanValue())
+ if (this.errorState.size() == 0 || this.errorState.get(this.errorState.size() -
1).booleanValue())
{
this.errorState.add(Boolean.FALSE);
}
Show replies by date