incubator-aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jb...@apache.org
Subject svn commit: r934558 - in /incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources: PingJspEL.jsp config.jsp displayQuote.jsp marketSummary.jsp
Date Thu, 15 Apr 2010 19:32:20 GMT
Author: jbohn
Date: Thu Apr 15 19:32:20 2010
New Revision: 934558

URL: http://svn.apache.org/viewvc?rev=934558&view=rev
Log:
merge 933727 from trunk to branch - ARIES-186 AriesTrader - some changes to prevent repeat
lookup of the TradeServicesManager reference in the jsps and a little more cleanup

Modified:
    incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/PingJspEL.jsp
    incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/config.jsp
    incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/displayQuote.jsp
    incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/marketSummary.jsp

Modified: incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/PingJspEL.jsp
URL: http://svn.apache.org/viewvc/incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/PingJspEL.jsp?rev=934558&r1=934557&r2=934558&view=diff
==============================================================================
--- incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/PingJspEL.jsp
(original)
+++ incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/PingJspEL.jsp
Thu Apr 15 19:32:20 2010
@@ -23,53 +23,52 @@
 <%@ page import="org.apache.aries.samples.ariestrader.util.*,org.apache.aries.samples.ariestrader.api.*,org.apache.aries.samples.ariestrader.api.persistence.*"
session="false" %>
 
 <%!
-int hitCount = 0;
-String initTime = new java.util.Date().toString();
+    int hitCount = 0;
+    String initTime = new java.util.Date().toString();
+    TradeServicesManager tradeServicesManager = null;
 %>
  
 <%
-// setup some variables to work with later
-int someint1 = TradeConfig.rndInt(100) + 1;
-pageContext.setAttribute("someint1", new Integer(someint1));
-int someint2 = TradeConfig.rndInt(100) + 1;
-pageContext.setAttribute("someint2", new Integer(someint2));
-float somefloat1 = TradeConfig.rndFloat(100) + 1.0f;
-pageContext.setAttribute("somefloat1", new Float(somefloat1));
-float somefloat2 = TradeConfig.rndFloat(100) + 1.0f;
-pageContext.setAttribute("somefloat2", new Float(somefloat2));
-
-TradeServicesManager tradeServicesManager = null;
-
-if (tradeServicesManager == null) {
-    tradeServicesManager = TradeServiceUtilities.getTradeServicesManager();
-}
-TradeServices tradeServices = tradeServicesManager.getTradeServices();
-
-QuoteDataBean quoteData0=null, quoteData1=null, quoteData2=null, quoteData3=null;
-
-try { 
-	quoteData0 = tradeServices.getQuote(TradeConfig.rndSymbol());
-	quoteData1 = tradeServices.getQuote(TradeConfig.rndSymbol());
-	quoteData2 = tradeServices.getQuote(TradeConfig.rndSymbol());
-	quoteData3 = tradeServices.getQuote(TradeConfig.rndSymbol());
-}
-catch (Exception e)
-{
-    Log.error("PingJspEL.jsp  exception", e);
-}
-
-pageContext.setAttribute("quoteData0", quoteData0);
-pageContext.setAttribute("quoteData1", quoteData1);
-pageContext.setAttribute("quoteData2", quoteData2);
-pageContext.setAttribute("quoteData3", quoteData3);
-
-QuoteDataBean quoteData[] = new QuoteDataBean[4];
-quoteData[0] = quoteData0;
-quoteData[1] = quoteData1;
-quoteData[2] = quoteData2;
-quoteData[3] = quoteData3;
+    // setup some variables to work with later
+    int someint1 = TradeConfig.rndInt(100) + 1;
+    pageContext.setAttribute("someint1", new Integer(someint1));
+    int someint2 = TradeConfig.rndInt(100) + 1;
+    pageContext.setAttribute("someint2", new Integer(someint2));
+    float somefloat1 = TradeConfig.rndFloat(100) + 1.0f;
+    pageContext.setAttribute("somefloat1", new Float(somefloat1));
+    float somefloat2 = TradeConfig.rndFloat(100) + 1.0f;
+    pageContext.setAttribute("somefloat2", new Float(somefloat2));
+
+    if (tradeServicesManager == null) {
+        tradeServicesManager = TradeServiceUtilities.getTradeServicesManager();
+    }
+    TradeServices tradeServices = tradeServicesManager.getTradeServices();
+
+    QuoteDataBean quoteData0=null, quoteData1=null, quoteData2=null, quoteData3=null;
+
+    try { 
+    	quoteData0 = tradeServices.getQuote(TradeConfig.rndSymbol());
+    	quoteData1 = tradeServices.getQuote(TradeConfig.rndSymbol());
+    	quoteData2 = tradeServices.getQuote(TradeConfig.rndSymbol());
+    	quoteData3 = tradeServices.getQuote(TradeConfig.rndSymbol());
+    }
+    catch (Exception e)
+    {
+        Log.error("PingJspEL.jsp  exception", e);
+    }
+
+    pageContext.setAttribute("quoteData0", quoteData0);
+    pageContext.setAttribute("quoteData1", quoteData1);
+    pageContext.setAttribute("quoteData2", quoteData2);
+    pageContext.setAttribute("quoteData3", quoteData3);
+
+    QuoteDataBean quoteData[] = new QuoteDataBean[4];
+    quoteData[0] = quoteData0;
+    quoteData[1] = quoteData1;
+    quoteData[2] = quoteData2;
+    quoteData[3] = quoteData3;
 
-pageContext.setAttribute("quoteData", quoteData);
+    pageContext.setAttribute("quoteData", quoteData);
 %>
   
 <HR>

Modified: incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/config.jsp
URL: http://svn.apache.org/viewvc/incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/config.jsp?rev=934558&r1=934557&r2=934558&view=diff
==============================================================================
--- incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/config.jsp
(original)
+++ incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/config.jsp
Thu Apr 15 19:32:20 2010
@@ -24,9 +24,10 @@
 <%@ page import="java.util.ArrayList, org.apache.aries.samples.ariestrader.util.TradeConfig,
org.apache.aries.samples.ariestrader.api.*"
 	session="false" isThreadSafe="true" isErrorPage="false"%>
 
-<% 
+<%! 
     TradeServicesManager tradeServicesManager = null;
-
+%>
+<% 
     if (tradeServicesManager == null) {
         tradeServicesManager = TradeServiceUtilities.getTradeServicesManager();
     }
@@ -168,49 +169,26 @@ if (status != null) {
 
 		<TR>
 			<TD align="left"><B>WebInterface</B>
-			<P align="left"><%configParm = "WebInterface";
-names = TradeConfig.webInterfaceNames;
-index = TradeConfig.webInterface;
-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>
+                <P align="left">
+                <%
+                    configParm = "WebInterface";
+                    names = TradeConfig.webInterfaceNames;
+                    index = TradeConfig.webInterface;
+                    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 Web interface technology used, JSPs
 			or JSPs with static images and GIFs.</TD>
 		</TR>
-		<!--		<TR>
-			<TD align="left">
-			<B>Caching Type</B>
-			<P align="left"><%configParm = "CachingType";
-names = TradeConfig.cachingTypeNames;
-index = TradeConfig.cachingType;
-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 caching technology used for data caching
-			, DistributedMap, Command Caching or No Caching.
-			</TD>
-		</TR>-->
 		<TR>
 			<TD colspan="2" align="center"><B>Miscellaneous Settings</B></TD>
 		</TR>
@@ -241,15 +219,6 @@ for (int i = 0; i < names.length; i++) {
 			web request. Change this value to repeat operations multiple times
 			per web request.</TD>
 		</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: incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/displayQuote.jsp
URL: http://svn.apache.org/viewvc/incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/displayQuote.jsp?rev=934558&r1=934557&r2=934558&view=diff
==============================================================================
--- incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/displayQuote.jsp
(original)
+++ incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/displayQuote.jsp
Thu Apr 15 19:32:20 2010
@@ -17,9 +17,11 @@
 <%@ page
 	import="java.math.BigDecimal, org.apache.aries.samples.ariestrader.api.*, org.apache.aries.samples.ariestrader.api.persistence.*,
org.apache.aries.samples.ariestrader.util.*"
 	session="true" isThreadSafe="true" isErrorPage="false"%>
+<%! 
+    TradeServicesManager tradeServicesManager = null;
+%>
 <% 
     String symbol = request.getParameter("symbol");
-    TradeServicesManager tradeServicesManager = null;
 
     if (tradeServicesManager == null) {
         tradeServicesManager = TradeServiceUtilities.getTradeServicesManager();

Modified: incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/marketSummary.jsp
URL: http://svn.apache.org/viewvc/incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/marketSummary.jsp?rev=934558&r1=934557&r2=934558&view=diff
==============================================================================
--- incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/marketSummary.jsp
(original)
+++ incubator/aries/branches/0.1-incubating-RC1/samples/ariestrader/modules/ariestrader-web/src/main/resources/marketSummary.jsp
Thu Apr 15 19:32:20 2010
@@ -18,14 +18,15 @@
 	import="java.util.Collection, java.util.Iterator, org.apache.aries.samples.ariestrader.api.*,
org.apache.aries.samples.ariestrader.api.persistence.*, org.apache.aries.samples.ariestrader.util.*"
 	session="true" isThreadSafe="true" isErrorPage="false"%>
 
+<%! 
+    TradeServicesManager tradeServicesManager = null;
+%>
 <%
-TradeServicesManager tradeServicesManager = null;
-
-if (tradeServicesManager == null) {
-    tradeServicesManager = TradeServiceUtilities.getTradeServicesManager();
-}
+    if (tradeServicesManager == null) {
+        tradeServicesManager = TradeServiceUtilities.getTradeServicesManager();
+    }
 
-MarketSummaryDataBean marketSummaryData = tradeServicesManager.getMarketSummary();
+    MarketSummaryDataBean marketSummaryData = tradeServicesManager.getMarketSummary();
 %>
 <TABLE border="1" bgcolor="#ffffff" width="100%"
 	style="font-size: smaller">



Mime
View raw message