geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jb...@apache.org
Subject svn commit: r825167 - in /geronimo/sandbox/jbohn/daytrader-bp: assemblies/web/daytrader-web-jdbc/src/main/webapp/ modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/ modules/core/src/main/resources/OSGI-INF/blueprint/ modules/util/sr...
Date Wed, 14 Oct 2009 15:30:32 GMT
Author: jbohn
Date: Wed Oct 14 15:30:31 2009
New Revision: 825167

URL: http://svn.apache.org/viewvc?rev=825167&view=rev
Log:
updates to UI and TradeServicesManager to only work with registered TradeServices and honor
current selection

Modified:
    geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/src/main/webapp/config.jsp
    geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManager.java
    geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManagerImpl.java
    geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/resources/OSGI-INF/blueprint/listener.xml
    geronimo/sandbox/jbohn/daytrader-bp/modules/util/src/main/java/org/apache/geronimo/samples/daytrader/util/TradeConfig.java
    geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TestServlet.java
    geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeConfigServlet.java

Modified: geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/src/main/webapp/config.jsp
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/src/main/webapp/config.jsp?rev=825167&r1=825166&r2=825167&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/src/main/webapp/config.jsp
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/src/main/webapp/config.jsp
Wed Oct 14 15:30:31 2009
@@ -21,9 +21,17 @@
 <TITLE>Welcome to DayTrader</TITLE>
 </HEAD>
 <BODY bgcolor="#ffffff" link="#000099">
-<%@ page import="org.apache.geronimo.samples.daytrader.util.TradeConfig"
+<%@ page import="java.util.ArrayList, org.apache.geronimo.samples.daytrader.util.TradeConfig,
org.apache.geronimo.samples.daytrader.core.*, org.apache.geronimo.samples.daytrader.core.util.*"
 	session="false" isThreadSafe="true" isErrorPage="false"%>
 
+<% 
+    TradeServicesManager tradeServicesManager = null;
+
+    if (tradeServicesManager == null) {
+        tradeServicesManager = TradeServiceUtilities.getTradeServicesManager();
+    }
+ %>
+
 <TABLE style="font-size: smaller">
 	<TBODY>
 		<TR>
@@ -79,50 +87,85 @@
 			<HR>
 			</TD>
 		</TR>
-		<%
-			String configParm = null;
-			String names[] = null;
-			int index;
-			%>
-			
-		<tr>
-			<INPUT type="hidden" name="RunTimeMode" value="TradeConfig.JDBC"/>
-		</tr>
-		
-		<tr>
-			<INPUT type="hidden" name="JPALayer" value="0"/>
-		</tr>
-		
-		<tr>
-			<INPUT type="hidden" name="OrderProcessingMode" value="0"/>
-		</tr>
-		
-		<tr>
-			<INPUT type="hidden" name="AcessMode" value="0"/>
-		</tr>		
-		
-		<TR>
-			<TD align="left"><B>Scenario Workload Mix</B>
-			<P align="left"><%configParm = "WorkloadMix";
-names = TradeConfig.workloadMixNames;
-index = TradeConfig.workloadMix;
-for (int i = 0; i < names.length; i++) {
-	out.print(
-		"<INPUT type=\"radio\" name=\""
-			+ configParm
-			+ "\" value=\""
-			+ i
-			+ "\" ");
-	if (index == i)
-		out.print("checked");
-	out.print("> " + names[i] + "<BR>");
-}
-%></P>
+
+
+        <%
+            String configParm = null;
+            String names[] = null;
+            int index;
+        %>
+
+
+		<TR>
+			<TD align="left"><B>Run-Time Mode </B>
+			<P align="left">
+            <%
+                ArrayList activeModes = tradeServicesManager.getCurrentModes();
+                configParm = "RunTimeMode";
+                names = TradeConfig.runTimeModeNames;
+                index = TradeConfig.runTimeMode;
+                for (int i = 0; i < activeModes.size(); i++) {
+                    out.print("<INPUT type=\"radio\" name=\""
+                             + configParm
+                             + "\" value=\""
+                             + (Integer)activeModes.get(i)
+                             + "\" ");
+                    if (index == (Integer)activeModes.get(i)) out.print("checked");
+                    out.print("> " + names[(Integer)activeModes.get(i)] + "<BR>");
+                }
+            %>
+            </P>
+			</TD>
+			<TD><BR>
+			Run Time Mode determines server implementation of the TradeServices
+			to use in the DayTrader application Enterprise Java Beans including
+			Session, Entity and Message beans or Direct mode which uses direct
+			database and JMS access. See <A href="docs/tradeFAQ.html">DayTrader
+			FAQ</A> for details.<BR>
 			</TD>
-			<TD>This setting determines the runtime workload mix of DayTrader
-			operations when driving the benchmark through TradeScenarioServlet.
-			See <A href="docs/tradeFAQ.html">DayTrader FAQ</A> for details.</TD>
 		</TR>
+
+
+        <TR>
+            <INPUT type="hidden" name="JPALayer" value="0"/>
+        </TR>
+
+
+        <TR>
+            <INPUT type="hidden" name="OrderProcessingMode" value="0"/>
+        </TR>
+
+
+        <TR>
+            <INPUT type="hidden" name="AcessMode" value="0"/>
+        </TR>
+
+
+        <TR>
+            <TD align="left"><B>Scenario Workload Mix</B>
+                <P align="left">
+                <%
+                    configParm = "WorkloadMix";
+                    names = TradeConfig.workloadMixNames;
+                    index = TradeConfig.workloadMix;
+                    for (int i = 0; i < names.length; i++) {
+                        out.print("<INPUT type=\"radio\" name=\""
+                                 + configParm
+                                 + "\" value=\""
+                                 + i
+                                 + "\" ");
+                        if (index == i) out.print("checked");
+	                    out.print("> " + names[i] + "<BR>");
+                    }
+                %>
+                </P>
+            </TD>
+            <TD>This setting determines the runtime workload mix of DayTrader
+            operations when driving the benchmark through TradeScenarioServlet.
+            See <A href="docs/tradeFAQ.html">DayTrader FAQ</A> for details.</TD>
+        </TR>
+
+
 		<TR>
 			<TD align="left"><B>WebInterface</B>
 			<P align="left"><%configParm = "WebInterface";
@@ -198,11 +241,15 @@
 			web request. Change this value to repeat operations multiple times
 			per web request.</TD>
 		</TR>
-		
-		<tr>
-			<INPUT type="hidden" name="EnablePublishQuotePriceChange" value=""/>
-		</tr>
-		
+		<TR>
+			<TD align="left"><INPUT type="checkbox"
+                <%=TradeConfig.getPublishQuotePriceChange() ? "checked" : ""%>
+                name="EnablePublishQuotePriceChange"> <B><FONT size="-1">Publish
Quote Updates</FONT></B><BR>
+            </TD>
+            <TD>
+                Publish quote price changes to a JMS topic.<BR>
+            </TD>
+        </TR>
 		<TR>
 			<TD align="left"><INPUT type="checkbox"
                 <%=TradeConfig.getLongRun() ? "checked" : ""%>

Modified: geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManager.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManager.java?rev=825167&r1=825166&r2=825167&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManager.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManager.java
Wed Oct 14 15:30:31 2009
@@ -16,7 +16,7 @@
  */
 package org.apache.geronimo.samples.daytrader.core;
 
-import java.util.Set;
+import java.util.ArrayList;
 
 import org.apache.geronimo.samples.daytrader.core.TradeServices;
 import org.apache.geronimo.samples.daytrader.core.TradeDBServices;
@@ -34,6 +34,13 @@
       */
     public void setTradeServices(TradeServices tradeServices);
 
+
+    /**
+      * Get CurrentModes that are registered
+      */
+    public ArrayList<Integer> getCurrentModes();
+
+
     /**
       * Get the currently selected TradeServices
       */

Modified: geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManagerImpl.java?rev=825167&r1=825166&r2=825167&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManagerImpl.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManagerImpl.java
Wed Oct 14 15:30:31 2009
@@ -16,7 +16,7 @@
  */
 package org.apache.geronimo.samples.daytrader.core;
 
-import java.util.HashMap;
+import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.Map;
 
@@ -45,9 +45,8 @@
 
 public class TradeServicesManagerImpl implements TradeServicesManager {
 
-    private Map<Integer, TradeServices> tradeServicesMap = new HashMap<Integer,
TradeServices>();
-    private Map<Integer, TradeDBServices> tradeDBServicesMap = new HashMap<Integer,
TradeDBServices>();
-    private int currentMode = TradeConfig.JDBC;
+    private static TradeServices[] tradeServicesList = new TradeServices[TradeConfig.runTimeModeNames.length]
;
+    private static TradeDBServices[] tradeDBServicesList = new TradeDBServices[TradeConfig.runTimeModeNames.length];
     private String test;
 
     // This lock is used to serialize market summary operations.
@@ -64,20 +63,27 @@
     }
 
     /**
-      * Set Test
+      * init
       */
-    public void setTest(String test)
+    public void init()
     {
-//        System.out.println("@JAB TradeServicesManagerImpl.setTest " + test);
-        this.test = test;
+//        System.out.println("@JAB TradeServicesManagerImpl.init - Initialized ");
     }
 
+
     /**
-      * init
+      * Get CurrentModes that are registered
       */
-    public void init()
+    public ArrayList<Integer> getCurrentModes()
     {
-//        System.out.println("@JAB TradeServicesManagerImpl.init - Initialized ");
+        ArrayList<Integer> modes = new ArrayList<Integer>();
+        for (int i=0; i<tradeServicesList.length; i++) {
+            TradeServices tradeServicesRef = tradeServicesList[i];
+            if (tradeServicesRef != null) {
+                modes.add(tradeServicesRef.getMode());
+            }
+        }
+        return modes;
     }
 
     /**
@@ -85,10 +91,9 @@
       */
     public void setTradeServices(TradeServices tradeServices)
     {
-//        System.out.println("@JAB TradeServicesManagerImpl.setTradeServices current size
" + tradeServicesMap.size() + " adding ");
-//        System.out.println("@JAB TradeServicesManagerImpl.setTradeServices current size
" + tradeServicesMap.size() + " adding " + tradeServices);
-        tradeServicesMap.put(tradeServices.getMode(), tradeServices);
-//        System.out.println("@JAB TradeServicesManagerImpl.setTradeServices new size " +
tradeServicesMap.size());
+//        System.out.println("@JAB TradeServicesManagerImpl.setTradeServices adding " + tradeServices);
+        tradeServicesList[tradeServices.getMode()] = tradeServices;
+//        System.out.println("@JAB TradeServicesManagerImpl.setTradeServices added ");
     }
 
     /**
@@ -96,18 +101,16 @@
       */
     public void setTradeServicesJPA(TradeServices tradeServicesJPA)
     {
-//        System.out.println("@JAB TradeServicesManagerImpl.setTradeServicesJPA current size
" + tradeServicesMap.size() + " adding " + tradeServicesJPA);
-        tradeServicesMap.put(tradeServicesJPA.getMode(), tradeServicesJPA);
-//        System.out.println("@JAB TradeServicesManagerImpl.setTradeServicesJPA new size
" + tradeServicesMap.size());
+//        System.out.println("@JAB TradeServicesManagerImpl.setTradeServicesJPA adding "
+ tradeServicesJPA);
+        tradeServicesList[tradeServicesJPA.getMode()] = tradeServicesJPA;
+//        System.out.println("@JAB TradeServicesManagerImpl.setTradeServicesJPA added");
     }
 
 
     public TradeServices getTradeServices()
     {
-        // @JAB for now this is hard-coded to JDBC.
-        // Eventually, we need to keep track of the selected TradeServices and return that
-//        System.out.println("@JAB TradeServicesManagerImpl.getTradeServices - returning
" + tradeServicesMap.get(currentMode));
-        return tradeServicesMap.get(currentMode);
+//        System.out.println("@JAB TradeServicesManagerImpl.getTradeServices - returning
" + tradeServicesList[TradeConfig.runTimeMode]);
+        return tradeServicesList[TradeConfig.runTimeMode];
     }
 
     /**
@@ -115,9 +118,9 @@
       */
     public void setTradeDBServices(TradeDBServices tradeDBServices)
     {
-//        System.out.println("@JAB TradeServicesManagerImpl.setTradeDBServices current size
" + tradeDBServicesMap.size() + " adding " + tradeDBServices);
-        tradeDBServicesMap.put(tradeDBServices.getMode(), tradeDBServices);
-//        System.out.println("@JAB TradeServicesManagerImpl.setTradeDBServices new size "
+ tradeDBServicesMap.size());
+//        System.out.println("@JAB TradeServicesManagerImpl.setTradeDBServices adding " +
tradeDBServices);
+        tradeDBServicesList[tradeDBServices.getMode()] = tradeDBServices;
+//        System.out.println("@JAB TradeServicesManagerImpl.setTradeDBServices added");
     }
 
     /**
@@ -125,18 +128,16 @@
       */
     public void setTradeDBServicesJPA(TradeDBServices tradeDBServicesJPA)
     {
-//        System.out.println("@JAB TradeServicesManagerImpl.setTradeDBServicesJPA current
size " + tradeDBServicesMap.size() + " adding " + tradeDBServicesJPA);
-        tradeDBServicesMap.put(tradeDBServicesJPA.getMode(), tradeDBServicesJPA);
-//        System.out.println("@JAB TradeServicesManagerImpl.setTradeDBServicesJPA new size
" + tradeDBServicesMap.size());
+//        System.out.println("@JAB TradeServicesManagerImpl.setTradeDBServicesJPA adding
" + tradeDBServicesJPA);
+        tradeDBServicesList[tradeDBServicesJPA.getMode()] = tradeDBServicesJPA;
+//        System.out.println("@JAB TradeServicesManagerImpl.setTradeDBServicesJPA added");
     }
 
 
     public TradeDBServices getTradeDBServices()
     {
-        // @JAB for now this is hard-coded to JDBC.
-        // Eventually, we need to keep track of the selected TradeServices and return that
-//        System.out.println("@JAB TradeServicesManagerImpl.getTradeServices - returning
" + tradeServicesMap.get(currentMode));
-        return tradeDBServicesMap.get(currentMode);
+//        System.out.println("@JAB TradeServicesManagerImpl.getTradeDBServices - returning
" + tradeServicesList[TradeConfig.runTimeMode]);
+        return tradeDBServicesList[TradeConfig.runTimeMode];
     }
 
     /**
@@ -144,11 +145,11 @@
       */
     public void bindService(TradeServices tradeServices, Map props)
     {
-//        System.out.println("@JAB TradeServicesManagerImpl.bindService current size " +
tradeServicesMap.size() + " adding " + tradeServices + "Properties " + props);
+//        System.out.println("@JAB TradeServicesManagerImpl.bindService adding " + tradeServices
+ "Properties " + props);
         if (tradeServices != null) {
-            tradeServicesMap.put(tradeServices.getMode(), tradeServices);
+            tradeServicesList[tradeServices.getMode()] = tradeServices;
         }
-//        System.out.println("@JAB TradeServicesManagerImpl.bindService new size " + tradeServicesMap.size());
+//        System.out.println("@JAB TradeServicesManagerImpl.bindService added");
     }
 
     /**
@@ -156,11 +157,11 @@
       */
     public void unbindService(TradeServices tradeServices, Map props)
     {
-//        System.out.println("@JAB TradeServicesManagerImpl.unbindService current size "
+ tradeServicesMap.size() + " adding " + tradeServices + "Properties " + props);
+//        System.out.println("@JAB TradeServicesManagerImpl.unbindService removing " + tradeServices
+ "Properties " + props);
         if (tradeServices != null) {
-            tradeServicesMap.remove(tradeServices.getMode());
+            tradeServicesList[tradeServices.getMode()] = null;
         }
-//        System.out.println("@JAB TradeServicesManagerImpl.unbindService new size " + tradeServicesMap.size());
+//        System.out.println("@JAB TradeServicesManagerImpl.unbindService removed ");
     }
 
     /**
@@ -168,11 +169,11 @@
       */
     public void bindDBService(TradeDBServices tradeDBServices, Map props)
     {
-//        System.out.println("@JAB TradeServicesManagerImpl.bindDBService current size "
+ tradeDBServicesMap.size() + " adding " + tradeDBServices + "Properties " + props);
+//        System.out.println("@JAB TradeServicesManagerImpl.bindDBService adding " + tradeDBServices
+ "Properties " + props);
         if (tradeDBServices != null) {
-            tradeDBServicesMap.put(tradeDBServices.getMode(), tradeDBServices);
+            tradeDBServicesList[tradeDBServices.getMode()] = tradeDBServices;
         }
-//        System.out.println("@JAB TradeServicesManagerImpl.bindDBService new size " + tradeDBServicesMap.size());
+//        System.out.println("@JAB TradeServicesManagerImpl.bindDBService added");
     }
 
     /**
@@ -180,11 +181,11 @@
       */
     public void unbindDBService(TradeServices tradeDBServices, Map props)
     {
-//        System.out.println("@JAB TradeServicesManagerImpl.unbindDBService current size
" + tradeDBServicesMap.size() + " adding " + tradeDBServices + "Properties " + props);
+//        System.out.println("@JAB TradeServicesManagerImpl.unbindDBService removing " +
tradeDBServices + "Properties " + props);
         if (tradeDBServices != null) {
-            tradeDBServicesMap.remove(tradeDBServices.getMode());
+            tradeDBServicesList[tradeDBServices.getMode()] = null;
         }
-//        System.out.println("@JAB TradeServicesManagerImpl.unbindDBService new size " +
tradeDBServicesMap.size());
+//        System.out.println("@JAB TradeServicesManagerImpl.unbindDBService removed");
     }
 
     /**
@@ -260,7 +261,7 @@
             Log.trace("TradeAction:getMarketSummaryInternal()");
         }
         MarketSummaryDataBean marketSummaryData = null;
-        marketSummaryData = tradeServicesMap.get(currentMode).getMarketSummary();
+        marketSummaryData = tradeServicesList[TradeConfig.runTimeMode].getMarketSummary();
         return marketSummaryData;
     }
 

Modified: geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/resources/OSGI-INF/blueprint/listener.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/resources/OSGI-INF/blueprint/listener.xml?rev=825167&r1=825166&r2=825167&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/resources/OSGI-INF/blueprint/listener.xml
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/resources/OSGI-INF/blueprint/listener.xml
Wed Oct 14 15:30:31 2009
@@ -7,7 +7,6 @@
       <property name="tradeDBServices" ref="tradeDBServicesRefJDBC"/>
       <property name="tradeServicesJPA" ref="tradeServicesRefJPA"/>
       <property name="tradeDBServicesJPA" ref="tradeDBServicesRefJPA"/>
-      <property name="test" value="test"/>
   </bean>
   
   <service id="TradeServicesManager" ref="tradeServicesManagerBean" interface="org.apache.geronimo.samples.daytrader.core.TradeServicesManager"/>

Modified: geronimo/sandbox/jbohn/daytrader-bp/modules/util/src/main/java/org/apache/geronimo/samples/daytrader/util/TradeConfig.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/util/src/main/java/org/apache/geronimo/samples/daytrader/util/TradeConfig.java?rev=825167&r1=825166&r2=825167&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/util/src/main/java/org/apache/geronimo/samples/daytrader/util/TradeConfig.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/util/src/main/java/org/apache/geronimo/samples/daytrader/util/TradeConfig.java
Wed Oct 14 15:30:31 2009
@@ -38,7 +38,7 @@
     public static final int SESSION3 = 2;
     public static final int JDBC = 3;
     public static final int JPA = 4;
-    public static int runTimeMode = DIRECT;
+    public static int runTimeMode = JDBC;
 	
     /* Trade JPA Layer parameters */
 	public static String[] jpaLayerNames = {"OpenJPA", "Hibernate"};

Modified: geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TestServlet.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TestServlet.java?rev=825167&r1=825166&r2=825167&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TestServlet.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TestServlet.java
Wed Oct 14 15:30:31 2009
@@ -76,7 +76,7 @@
             TradeServices tradeServices = tradeServicesManager.getTradeServices();
 		try {
 			Log.debug("Enter TestServlet doGet");
-			TradeConfig.runTimeMode = TradeConfig.DIRECT;
+			TradeConfig.runTimeMode = TradeConfig.JDBC;
 			for (int i=0; i<10; i++) 
 			{
 				tradeServices.createQuote("s:"+i, "Company " + i, new BigDecimal(i*1.1));

Modified: geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeConfigServlet.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeConfigServlet.java?rev=825167&r1=825166&r2=825167&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeConfigServlet.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeConfigServlet.java
Wed Oct 14 15:30:31 2009
@@ -119,9 +119,10 @@
 			try
 			{
 				int i = Integer.parseInt(runTimeModeStr);
-				if ((i >= 0)
-					&& (i < TradeConfig.runTimeModeNames.length)) //Input validation
-					TradeConfig.setRunTimeMode(i);
+				if ((i >= 0) && (i < TradeConfig.runTimeModeNames.length)) //Input validation
+                                {
+                                    TradeConfig.setRunTimeMode(i);
+                                }
 			}
 			catch (Exception e)
 			{



Mime
View raw message