Author: pferraro
Date: 2008-09-23 10:48:47 -0400 (Tue, 23 Sep 2008)
New Revision: 1891
Modified:
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/client/RequestDriver.java
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/servlet/RecordServlet.java
Log:
Fixed constants usage
Modified:
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/client/RequestDriver.java
===================================================================
---
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/client/RequestDriver.java 2008-09-23
13:53:53 UTC (rev 1890)
+++
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/client/RequestDriver.java 2008-09-23
14:48:47 UTC (rev 1891)
@@ -11,6 +11,8 @@
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
+import org.jboss.modcluster.demo.Constants;
+
/**
* @author Brian Stansberry
* @version $Id: PerfTest2.java 68892 2008-01-11 14:39:07Z bela(a)jboss.com $
@@ -19,8 +21,6 @@
{
private Client[] clients;
- public static final String NODE_HEADER = "X-ClusterNode";
-
private final ConcurrentMap<String, AtomicInteger> requestCounts = new
ConcurrentHashMap<String, AtomicInteger>();
private final ConcurrentMap<String, AtomicInteger> sessionCounts = new
ConcurrentHashMap<String, AtomicInteger>();
@@ -300,7 +300,7 @@
}
input.close(); // discard data
- String handlerNode = conn.getHeaderField(NODE_HEADER);
+ String handlerNode = conn.getHeaderField(Constants.NODE_HEADER);
String tmp_cookie = conn.getHeaderField("set-cookie");
if (tmp_cookie != null && cookie == null)
{
Modified:
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/servlet/RecordServlet.java
===================================================================
---
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/servlet/RecordServlet.java 2008-09-23
13:53:53 UTC (rev 1890)
+++
trunk/mod_cluster/src/demo/java/org/jboss/modcluster/demo/servlet/RecordServlet.java 2008-09-23
14:48:47 UTC (rev 1891)
@@ -43,6 +43,7 @@
private static final String DESTROY = "destroy";
private static final String TIMEOUT = "timeout";
+ private static final String JVM_ROUTE = "jvmRoute";
/**
* @{inheritDoc}
@@ -54,7 +55,7 @@
super.init(config);
Engine engine = (Engine)
ServerFactory.getServer().findServices()[0].getContainer();
- config.getServletContext().setAttribute("jvmRoute",
engine.getJvmRoute());
+ config.getServletContext().setAttribute(JVM_ROUTE, engine.getJvmRoute());
}
/**
@@ -82,6 +83,6 @@
}
}
- response.setHeader(Constants.NODE_HEADER, (String)
this.getServletContext().getAttribute("jvmRoute"));
+ response.setHeader(Constants.NODE_HEADER, (String)
this.getServletContext().getAttribute(JVM_ROUTE));
}
}
Show replies by date