geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hogst...@apache.org
Subject svn commit: r399537 - in /geronimo/daytrader/trunk/modules/web/src/main: java/org/apache/geronimo/samples/daytrader/web/TradeConfigServlet.java java/org/apache/geronimo/samples/daytrader/web/TradeServletAction.java webapp/config.jsp
Date Thu, 04 May 2006 04:16:33 GMT
Author: hogstrom
Date: Wed May  3 21:16:28 2006
New Revision: 399537

URL: http://svn.apache.org/viewcvs?rev=399537&view=rev
Log:
Updated to include Long Run Option

Modified:
    geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeConfigServlet.java
    geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeServletAction.java
    geronimo/daytrader/trunk/modules/web/src/main/webapp/config.jsp

Modified: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeConfigServlet.java
URL: http://svn.apache.org/viewcvs/geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeConfigServlet.java?rev=399537&r1=399536&r2=399537&view=diff
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeConfigServlet.java
(original)
+++ geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeConfigServlet.java
Wed May  3 21:16:28 2006
@@ -318,6 +318,15 @@
 		else 
 			Log.setActionTrace(false);						
 
+        String enableLongRun = req.getParameter("EnableLongRun");
+        
+        if (enableLongRun != null)
+            TradeConfig.setLongRun(true);
+        else 
+            TradeConfig.setLongRun(false);
+        currentConfigStr += "\t\tLong Run Enabled:\t\t" + TradeConfig.getLongRun()  + "\n";
+		
+		
 		System.out.println(currentConfigStr);
 
 	}

Modified: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeServletAction.java
URL: http://svn.apache.org/viewcvs/geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeServletAction.java?rev=399537&r1=399536&r2=399537&view=diff
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeServletAction.java
(original)
+++ geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeServletAction.java
Wed May  3 21:16:28 2006
@@ -80,8 +80,8 @@
             AccountDataBean accountData = tAction.getAccountData(userID);
             AccountProfileDataBean accountProfileData = tAction
                     .getAccountProfileData(userID);
-            Collection orderDataBeans = tAction.getOrders(userID);
-
+            ArrayList orderDataBeans = (TradeConfig.getLongRun() ? new ArrayList() : (ArrayList)
tAction.getOrders(userID));
+            
             req.setAttribute("accountData", accountData);
             req.setAttribute("accountProfileData", accountProfileData);
             req.setAttribute("orderDataBeans", orderDataBeans);

Modified: geronimo/daytrader/trunk/modules/web/src/main/webapp/config.jsp
URL: http://svn.apache.org/viewcvs/geronimo/daytrader/trunk/modules/web/src/main/webapp/config.jsp?rev=399537&r1=399536&r2=399537&view=diff
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/webapp/config.jsp (original)
+++ geronimo/daytrader/trunk/modules/web/src/main/webapp/config.jsp Wed May  3 21:16:28 2006
@@ -32,7 +32,7 @@
 status = (String) request.getAttribute("status");
 if (status != null) {
 %>
-<TABLE width="100%" height="30">
+<TABLE width="640" height="30">
 	<TBODY>
 		<TR>
 			<TD></TD>
@@ -243,6 +243,16 @@
 		</TR>
 		<TR>
 			<TD align="left"><INPUT type="checkbox"
+                <%=TradeConfig.getLongRun() ? "checked" : ""%>
+                name="EnableLongRun"> <B><FONT size="-1">Enable long run support</FONT></B><BR>
+            </TD>
+            <TD>
+                Enable long run support by disabling the show all orders query performed
on the Account page.<BR>
+            </TD>
+        </TR>
+        <TR>
+            <TD align="left">
+            <INPUT type="checkbox"
 				<%=TradeConfig.getActionTrace() ? "checked" : ""%>
 				name="EnableActionTrace"> <B><FONT size="-1">Enable operation trace</FONT></B><BR>
 			<INPUT type="checkbox" <%=TradeConfig.getTrace() ? "checked" : ""%>
@@ -258,7 +268,7 @@
 	</TBODY>
 </TABLE>
 
-<TABLE height="54" style="font-size: smaller">
+<TABLE width="640" height="54" style="font-size: smaller">
 	<TBODY>
 		<TR>
 			<TD colspan="2">



Mime
View raw message