Permalink
Browse files

git-svn-id: https://flexapps.svn.sourceforge.net/svnroot/flexapps/cen…

…sus2@641 381d3abc-5231-0410-a0e4-b068e20cbb11
  • Loading branch information...
1 parent 0c7a86d commit bab2e9fc333275ea23dd9f9f8db92a1b28988ccc jlward4 committed Mar 31, 2010
View
@@ -3,10 +3,16 @@ Deployment instructions
- Update the jboss/server/default/deployers/jbossws.deployer/META-INF/jboss-beans.xml file:
<!--<property name="webServiceHost"></property>-->
-- Add the Valve to jbossweb.sar/server.xml
+- Add the Valves to jbossweb.sar/server.xml
<Engine name="jboss.web" defaultHost="localhost">
<Valve className="com.jamesward.census2.CensusValve"/>
+- Update the Connector in the jbossweb.sar/server.xml
+<Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}"
+ connectionTimeout="20000" redirectPort="8443" compression="force"
+ maxThreads="500" minSpareThreads="100" maxSpareThreads="75"
+ proxyName="www.jamesward.com" proxyPort="80"/>
+
- Add the class files from the census2-tests/valve project to jbossweb.sar/
- Add dependency libs for the Valve to jbossweb.sar/
@@ -18,3 +24,7 @@ Deployment instructions
- deploy census2-tests.war
- deploy census2.war
+
+- update the deploy/census2.war/tests.xml file
+
+- update the deploy/census2.war/blazeds_config.xml file
View
@@ -367,7 +367,7 @@
</mx:itemDoubleClick>
</mx:List>
<mx:Spacer height="10"/>
- <controls:LabelLink url="http://www.jamesward.com/blog/census" label="Learn more about Census"/>
+ <controls:LabelLink url="http://www.jamesward.com/ria-benchmark" label="Learn more about Census"/>
</mx:VBox>
<mx:VBox width="100%" height="100%" horizontalAlign="center" verticalGap="0" paddingTop="40" paddingLeft="0" paddingRight="20" paddingBottom="10">
<mx:HRule width="100%"/>
@@ -44,7 +44,7 @@ public class TextFormatters
}
else if (n >= 1000)
{
- if ((n % 10) == 0)
+ if ((n % 1000) == 0)
{
nf.precision = 0;
}
@@ -72,7 +72,7 @@ public class TextFormatters
if (n >= 1000)
{
- if ((n % 10) == 0)
+ if ((n % 1000) == 0)
{
nf.precision = 0;
}
@@ -52,7 +52,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</mx:verticalAxisRenderers>
<mx:horizontalAxis>
- <mx:LinearAxis id="bcHA" labelFunction="TextFormatters.byteFormat"/>
+ <mx:LinearAxis id="bcHA" labelFunction="TextFormatters.byteFormat" minimum="0"/>
</mx:horizontalAxis>
<mx:horizontalAxisRenderers>
@@ -52,7 +52,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</mx:verticalAxisRenderers>
<mx:horizontalAxis>
- <mx:LinearAxis id="bcHA" labelFunction="TextFormatters.byteFormat"/>
+ <mx:LinearAxis id="bcHA" labelFunction="TextFormatters.byteFormat" minimum="0"/>
</mx:horizontalAxis>
<mx:horizontalAxisRenderers>
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
@@ -27,6 +27,22 @@ public void doGet(HttpServletRequest request, HttpServletResponse response)
String testId = request.getParameter("testId");
String resultType = request.getParameter("resultType");
+ String ipAddress;
+
+ if (request.getParameter("ipAddress") != null)
+ {
+ ipAddress = request.getParameter("ipAddress");
+ }
+ else if (request.getHeader("X-Forwarded-For") != null)
+ {
+ ipAddress = request.getHeader("X-Forwarded-For");
+ }
+ else
+ {
+ ipAddress = request.getRemoteAddr();
+ }
+
+
Boolean gzip = false;
if (request.getParameter("gzip").equals("true"))
@@ -47,7 +63,7 @@ public void doGet(HttpServletRequest request, HttpServletResponse response)
else
{
// save the results to DB
- CensusResult newCensusResult = new CensusResult(request.getRemoteAddr(), testId, resultType, resultData, gzip, numRows);
+ CensusResult newCensusResult = new CensusResult(ipAddress, testId, resultType, resultData, gzip, numRows);
ObjectContainer db4oServer = (ObjectContainer)getServletContext().getAttribute(Db4oServletContextListener.KEY_DB4O_SERVER);
// check for dups - only allow one entry per IP per testId per resultType

0 comments on commit bab2e9f

Please sign in to comment.