geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jb...@apache.org
Subject svn commit: r816649 - in /geronimo/sandbox/jbohn/daytrader-bp/modules: core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/ web/src/main/java/org/apache/geronimo/samples/daytrader/web/
Date Fri, 18 Sep 2009 14:35:39 GMT
Author: jbohn
Date: Fri Sep 18 14:35:39 2009
New Revision: 816649

URL: http://svn.apache.org/viewvc?rev=816649&view=rev
Log:
remove some more references to TradeAction and use TradeService instead

Modified:
    geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJDBCDirect.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/TradeBuildDB.java
    geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeConfigServlet.java
    geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeServletAction.java

Modified: geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJDBCDirect.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJDBCDirect.java?rev=816649&r1=816648&r2=816649&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJDBCDirect.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJDBCDirect.java
Fri Sep 18 14:35:39 2009
@@ -88,6 +88,11 @@
 
         MarketSummaryDataBean marketSummaryData = null;
         Connection conn = null;
+
+        if (Log.doActionTrace()) {
+            Log.trace("TradeAction:getMarketSummary()");
+        }
+
         try {
             if (Log.doTrace())
                 Log.trace("TradeJDBCDirect:getMarketSummary - inSession(" + this.inSession
+ ")");
@@ -179,6 +184,9 @@
         Connection conn = null;
         OrderDataBean orderData = null;
 
+        if (Log.doActionTrace())
+            Log.trace("TradeAction:buy", userID, symbol, new Double(quantity), new Integer(orderProcessingMode));
+
         /*
          * total = (quantity * purchasePrice) + orderFee
          */
@@ -224,9 +232,13 @@
      * @see TradeServices#sell(String, Integer)
      */
     public OrderDataBean sell(String userID, Integer holdingID, int orderProcessingMode)
throws Exception {
+
         Connection conn = null;
         OrderDataBean orderData = null;
 
+        if (Log.doActionTrace())
+            Log.trace("TradeAction:sell", userID, holdingID, new Integer(orderProcessingMode));
+
         /*
          * total = (quantity * purchasePrice) + orderFee
          */
@@ -408,8 +420,9 @@
         commit(conn);
 
         // signify this order for user userID is complete
-        TradeAction tradeAction = new TradeAction(this);
-        tradeAction.orderCompleted(userID, orderID);
+//        TradeAction tradeAction = new TradeAction(this);
+//        tradeAction.orderCompleted(userID, orderID);
+        orderCompleted(userID, orderID);
 
         return orderData;
     }
@@ -441,7 +454,11 @@
     }
 
     public void orderCompleted(String userID, Integer orderID) throws Exception {
-        throw new UnsupportedOperationException("TradeJDBCDirect:orderCompleted method not
supported");
+//        throw new UnsupportedOperationException("TradeJDBCDirect:orderCompleted method
not supported");
+        if (Log.doActionTrace())
+            Log.trace("TradeAction:orderCompleted", userID, orderID);
+        if (Log.doTrace())
+            Log.trace("OrderCompleted", userID, orderID);
     }
 
     private HoldingDataBean createHolding(Connection conn, int accountID, String symbol,
double quantity,
@@ -515,8 +532,13 @@
      * @see TradeServices#getOrders(String)
      */
     public Collection getOrders(String userID) throws Exception {
+
         Collection orderDataBeans = new ArrayList();
         Connection conn = null;
+
+        if (Log.doActionTrace())
+            Log.trace("TradeAction:getOrders", userID);
+
         try {
             if (Log.doTrace())
                 Log.trace("TradeJDBCDirect:getOrders - inSession(" + this.inSession + ")",
userID);
@@ -552,8 +574,13 @@
      * @see TradeServices#getClosedOrders(String)
      */
     public Collection getClosedOrders(String userID) throws Exception {
+
         Collection orderDataBeans = new ArrayList();
         Connection conn = null;
+
+        if (Log.doActionTrace())
+            Log.trace("TradeAction:getClosedOrders", userID);
+
         try {
             if (Log.doTrace())
                 Log.trace("TradeJDBCDirect:getClosedOrders - inSession(" + this.inSession
+ ")", userID);
@@ -590,6 +617,10 @@
 
         QuoteDataBean quoteData = null;
         Connection conn = null;
+
+        if (Log.doActionTrace())
+            Log.trace("TradeAction:createQuote", symbol, companyName, price);
+
         try {
             if (Log.doTrace())
                 Log.traceEnter("TradeJDBCDirect:createQuote - inSession(" + this.inSession
+ ")");
@@ -628,9 +659,21 @@
      */
 
     public QuoteDataBean getQuote(String symbol) throws Exception {
+
         QuoteDataBean quoteData = null;
         Connection conn = null;
 
+        if (Log.doActionTrace())
+            Log.trace("TradeAction:getQuote", symbol);
+
+
+        if ((symbol == null) || (symbol.length() == 0) || (symbol.length() > 10)) {
+            if (Log.doActionTrace()) {
+                Log.trace("TradeAction:getQuote   ---  primitive workload");
+            }
+            return new QuoteDataBean("Invalid symbol", "", 0.0, FinancialUtils.ZERO, FinancialUtils.ZERO,
FinancialUtils.ZERO, FinancialUtils.ZERO, 0.0);
+        }
+
         try {
             if (Log.doTrace())
                 Log.trace("TradeJDBCDirect:getQuote - inSession(" + this.inSession + ")",
symbol);
@@ -687,10 +730,14 @@
      * @see TradeServices#getAllQuotes(String)
      */
     public Collection getAllQuotes() throws Exception {
+
         Collection quotes = new ArrayList();
         QuoteDataBean quoteData = null;
-
         Connection conn = null;
+
+        if (Log.doActionTrace())
+            Log.trace("TradeAction:getAllQuotes");
+
         try {
             conn = getConn();
 
@@ -718,8 +765,13 @@
      * @see TradeServices#getHoldings(String)
      */
     public Collection getHoldings(String userID) throws Exception {
+
         Collection holdingDataBeans = new ArrayList();
         Connection conn = null;
+
+        if (Log.doActionTrace())
+            Log.trace("TradeAction:getHoldings", userID);
+
         try {
             if (Log.doTrace())
                 Log.trace("TradeJDBCDirect:getHoldings - inSession(" + this.inSession + ")",
userID);
@@ -751,8 +803,13 @@
      * @see TradeServices#getHolding(Integer)
      */
     public HoldingDataBean getHolding(Integer holdingID) throws Exception {
+
         HoldingDataBean holdingData = null;
         Connection conn = null;
+
+        if (Log.doActionTrace())
+            Log.trace("TradeAction:getHolding", holdingID);
+
         try {
             if (Log.doTrace())
                 Log.trace("TradeJDBCDirect:getHolding - inSession(" + this.inSession + ")",
holdingID);
@@ -775,6 +832,10 @@
      * @see TradeServices#getAccountData(String)
      */
     public AccountDataBean getAccountData(String userID) throws Exception {
+
+        if (Log.doActionTrace())
+            Log.trace("TradeAction:getAccountData", userID);
+
         try {
             AccountDataBean accountData = null;
             Connection conn = null;
@@ -951,9 +1012,13 @@
      * @see TradeServices#getAccountProfileData(String)
      */
     public AccountProfileDataBean getAccountProfileData(String userID) throws Exception {
+
         AccountProfileDataBean accountProfileData = null;
         Connection conn = null;
 
+        if (Log.doActionTrace())
+            Log.trace("TradeAction:getAccountProfileData", userID);
+
         try {
             if (Log.doTrace())
                 Log.trace("TradeJDBCDirect:getAccountProfileData - inSession(" + this.inSession
+ ")", userID);
@@ -1016,9 +1081,13 @@
      * @see TradeServices#updateAccountProfile(AccountProfileDataBean)
      */
     public AccountProfileDataBean updateAccountProfile(AccountProfileDataBean profileData)
throws Exception {
+
         AccountProfileDataBean accountProfileData = null;
         Connection conn = null;
 
+        if (Log.doActionTrace())
+            Log.trace("TradeAction:updateAccountProfile", accountProfileData);
+
         try {
             if (Log.doTrace())
                 Log.trace("TradeJDBCDirect:updateAccountProfileData - inSession(" + this.inSession
+ ")", profileData
@@ -1106,6 +1175,10 @@
 
     public QuoteDataBean updateQuotePriceVolume(String symbol, BigDecimal changeFactor, double
sharesTraded)
         throws Exception {
+
+        if (Log.doActionTrace())
+            Log.trace("TradeAction:updateQuotePriceVolume", symbol, changeFactor, new Double(sharesTraded));
+
         return updateQuotePriceVolumeInt(symbol, changeFactor, sharesTraded, TradeConfig.getPublishQuotePriceChange());
     }
 
@@ -1195,6 +1268,10 @@
 
         AccountDataBean accountData = null;
         Connection conn = null;
+
+        if (Log.doActionTrace())
+            Log.trace("TradeAction:login", userID, password);
+
         try {
             if (Log.doTrace())
                 Log.trace("TradeJDBCDirect:login - inSession(" + this.inSession + ")", userID,
password);
@@ -1253,9 +1330,14 @@
      * @see TradeServices#logout(String)
      */
     public void logout(String userID) throws Exception {
+
+        Connection conn = null;
+
+        if (Log.doActionTrace())
+            Log.trace("TradeAction:logout", userID);
+
         if (Log.doTrace())
             Log.trace("TradeJDBCDirect:logout - inSession(" + this.inSession + ")", userID);
-        Connection conn = null;
         try {
             conn = getConn();
             PreparedStatement stmt = getStatement(conn, logoutSQL);
@@ -1277,10 +1359,14 @@
      */
 
     public AccountDataBean register(String userID, String password, String fullname, String
address, String email,
-        String creditcard, BigDecimal openBalance) throws Exception {
+        String creditCard, BigDecimal openBalance) throws Exception {
 
         AccountDataBean accountData = null;
         Connection conn = null;
+
+        if (Log.doActionTrace())
+            Log.trace("TradeAction:register", userID, password, fullname, address, email,
creditCard, openBalance);
+
         try {
             if (Log.doTrace())
                 Log.traceEnter("TradeJDBCDirect:register - inSession(" + this.inSession +
")");
@@ -1312,7 +1398,7 @@
             stmt.setString(3, fullname);
             stmt.setString(4, address);
             stmt.setString(5, email);
-            stmt.setString(6, creditcard);
+            stmt.setString(6, creditCard);
             stmt.executeUpdate();
             stmt.close();
 

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=816649&r1=816648&r2=816649&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
Fri Sep 18 14:35:39 2009
@@ -20,8 +20,9 @@
 import javax.servlet.http.*;
 
 //import org.apache.geronimo.samples.daytrader.*;
-import org.apache.geronimo.samples.daytrader.core.TradeAction;
+import org.apache.geronimo.samples.daytrader.core.TradeServices;
 import org.apache.geronimo.samples.daytrader.util.*;
+import org.apache.geronimo.samples.daytrader.web.util.*;
 
 import java.io.IOException;
 import java.math.BigDecimal;
@@ -69,11 +70,12 @@
 		throws ServletException, IOException 
 	{
 		try {
+                    TradeServices tradeServices = ServletUtilities.getTradeServices();
 			Log.debug("Enter TestServlet doGet");
 			TradeConfig.runTimeMode = TradeConfig.DIRECT;
 			for (int i=0; i<10; i++) 
 			{
-				new TradeAction().createQuote("s:"+i, "Company " + i, new BigDecimal(i*1.1));
+				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/TradeBuildDB.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeBuildDB.java?rev=816649&r1=816648&r2=816649&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeBuildDB.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeBuildDB.java
Fri Sep 18 14:35:39 2009
@@ -27,6 +27,7 @@
 import org.apache.geronimo.samples.daytrader.core.direct.*;
 import org.apache.geronimo.samples.daytrader.beans.*;
 import org.apache.geronimo.samples.daytrader.util.*;
+import org.apache.geronimo.samples.daytrader.web.util.*;
 
 /**
  * TradeBuildDB uses operations provided by the TradeApplication to 
@@ -57,7 +58,7 @@
         throws Exception {
         String symbol, companyName;
         int errorCount = 0; // Give up gracefully after 10 errors
-        TradeAction tradeAction = new TradeAction();
+        TradeServices tradeServices = ServletUtilities.getTradeServices();
 
         // TradeStatistics.statisticsEnabled=false; // disable statistics
         out.println("<HEAD><BR><EM> TradeBuildDB: Building DayTrader Database...</EM><BR>"
@@ -172,7 +173,7 @@
             + TradeConfig.getMAX_QUOTES() + " Quotes ****</BR>");
         // Attempt to delete all of the Trade users and Trade Quotes first
         try {
-            tradeAction.resetTrade(true);
+            tradeServices.resetTrade(true);
         } catch (Exception e) {
             Log.error(e, "TradeBuildDB: Unable to delete Trade users "+
                 "(uid:0, uid:1, ...) and Trade Quotes (s:0, s:1, ...)");
@@ -182,7 +183,7 @@
             companyName = "S" + i + " Incorporated";
             try {
                 QuoteDataBean quoteData =
-                    tradeAction.createQuote(symbol, companyName,
+                    tradeServices.createQuote(symbol, companyName,
                         new java.math.BigDecimal(TradeConfig.rndPrice()));
                 if (i % 10 == 0) {
                     out.print("....." + symbol);
@@ -220,7 +221,7 @@
             }
             try {
                 AccountDataBean accountData =
-                    tradeAction.register(userID, "xxx", fullname, address,
+                    tradeServices.register(userID, "xxx", fullname, address,
                         email, creditcard, new BigDecimal(initialBalance));
                 String results;
                 if (accountData != null) {
@@ -237,7 +238,7 @@
                         symbol = TradeConfig.rndSymbol();
                         quantity = TradeConfig.rndQuantity();
                         orderData =
-                            tradeAction.buy(userID, symbol, quantity,
+                            tradeServices.buy(userID, symbol, quantity,
                                 TradeConfig.orderProcessingMode);
                     }
                     if (i % 50 == 0) {

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=816649&r1=816648&r2=816649&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
Fri Sep 18 14:35:39 2009
@@ -19,11 +19,10 @@
 import javax.servlet.*;
 import javax.servlet.http.*;
 
-//import org.apache.geronimo.samples.daytrader.core.*;
 import org.apache.geronimo.samples.daytrader.core.RunStatsDataBean;
-import org.apache.geronimo.samples.daytrader.core.TradeAction;
 import org.apache.geronimo.samples.daytrader.core.TradeServices;
 import org.apache.geronimo.samples.daytrader.util.*;
+import org.apache.geronimo.samples.daytrader.web.util.*;
 
 import java.io.IOException;
 
@@ -71,9 +70,10 @@
 	{
 		RunStatsDataBean runStatsData = new RunStatsDataBean();
 		TradeConfig currentConfig = new TradeConfig();		
+                TradeServices tradeServices = ServletUtilities.getTradeServices();
 		try
 		{
-			runStatsData = new TradeAction().resetTrade(false);
+			tradeServices.resetTrade(false);
 			
 			req.setAttribute("runStatsData", runStatsData);
 			req.setAttribute("tradeConfig", currentConfig);

Modified: geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeServletAction.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeServletAction.java?rev=816649&r1=816648&r2=816649&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeServletAction.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeServletAction.java
Fri Sep 18 14:35:39 2009
@@ -73,13 +73,13 @@
     void doAccount(ServletContext ctx, HttpServletRequest req,
             HttpServletResponse resp, String userID, String results)
             throws javax.servlet.ServletException, java.io.IOException {
-        TradeServices tAction = ServletUtilities.getTradeServices();
+        TradeServices tradeServices = ServletUtilities.getTradeServices();
         try {
 
-            AccountDataBean accountData = tAction.getAccountData(userID);
-            AccountProfileDataBean accountProfileData = tAction
+            AccountDataBean accountData = tradeServices.getAccountData(userID);
+            AccountProfileDataBean accountProfileData = tradeServices
                     .getAccountProfileData(userID);
-            ArrayList orderDataBeans = (TradeConfig.getLongRun() ? new ArrayList() : (ArrayList)
tAction.getOrders(userID));
+            ArrayList orderDataBeans = (TradeConfig.getLongRun() ? new ArrayList() : (ArrayList)
tradeServices.getOrders(userID));
             
             req.setAttribute("accountData", accountData);
             req.setAttribute("accountProfileData", accountProfileData);
@@ -145,7 +145,7 @@
             String creditcard, String email)
             throws javax.servlet.ServletException, java.io.IOException {
         String results = "";
-        TradeServices tAction = ServletUtilities.getTradeServices();
+        TradeServices tradeServices = ServletUtilities.getTradeServices();
 
         // First verify input data
         boolean doUpdate = true;
@@ -162,7 +162,7 @@
                 userID, password, fullName, address, email, creditcard);
         try {
             if (doUpdate) {
-                accountProfileData = tAction
+                accountProfileData = tradeServices
                         .updateAccountProfile(accountProfileData);
                 results = "Account profile update successful";
             }
@@ -210,10 +210,10 @@
             String quantity) throws ServletException, IOException {
 
         String results = "";
-        TradeServices tAction = ServletUtilities.getTradeServices();
+        TradeServices tradeServices = ServletUtilities.getTradeServices();
 
         try {
-            OrderDataBean orderData = tAction.buy(userID, symbol, new Double(
+            OrderDataBean orderData = tradeServices.buy(userID, symbol, new Double(
                     quantity).doubleValue(), TradeConfig.orderProcessingMode);
 
             req.setAttribute("orderData", orderData);
@@ -265,18 +265,18 @@
         
         BigDecimal balance;
         String result = "";
-        TradeServices tAction = ServletUtilities.getTradeServices();
+        TradeServices tradeServices = ServletUtilities.getTradeServices();
         
         try {
-            AccountDataBean accountData = tAction.getAccountData(userID);
-            Collection holdingDataBeans = tAction.getHoldings(userID);
+            AccountDataBean accountData = tradeServices.getAccountData(userID);
+            Collection holdingDataBeans = tradeServices.getHoldings(userID);
 
             // Edge Caching:
             // Getting the MarketSummary has been moved to the JSP
             // MarketSummary.jsp. This makes the MarketSummary a
             // standalone "fragment", and thus is a candidate for
             // Edge caching.
-            // marketSummaryData = tAction.getMarketSummary();
+            // marketSummaryData = tradeServices.getMarketSummary();
 
             req.setAttribute("accountData", accountData);
             req.setAttribute("holdingDataBeans", holdingDataBeans);
@@ -328,11 +328,11 @@
             throws javax.servlet.ServletException, java.io.IOException {
 
         String results = "";
-        TradeServices tAction = ServletUtilities.getTradeServices();
+        TradeServices tradeServices = ServletUtilities.getTradeServices();
         try {
             // Got a valid userID and passwd, attempt login
 
-            AccountDataBean accountData = tAction.login(userID, passwd);
+            AccountDataBean accountData = tradeServices.login(userID, passwd);
 
             if (accountData != null) {
                 HttpSession session = req.getSession(true);
@@ -403,10 +403,10 @@
             HttpServletResponse resp, String userID) throws ServletException,
             IOException {
         String results = "";
-        TradeServices tAction = ServletUtilities.getTradeServices();
+        TradeServices tradeServices = ServletUtilities.getTradeServices();
 
         try {
-            tAction.logout(userID);
+            tradeServices.logout(userID);
 
         } catch (java.lang.IllegalArgumentException e) { // this is a user
                                                             // error so I will
@@ -474,12 +474,12 @@
             HttpServletResponse resp, String userID, String results)
             throws ServletException, IOException {
 
-        TradeServices tAction = ServletUtilities.getTradeServices();
+        TradeServices tradeServices = ServletUtilities.getTradeServices();
         try {
             // Get the holdiings for this user
 
             Collection quoteDataBeans = new ArrayList();
-            Collection holdingDataBeans = tAction.getHoldings(userID);
+            Collection holdingDataBeans = tradeServices.getHoldings(userID);
 
             // Walk through the collection of user
             // holdings and creating a list of quotes
@@ -488,7 +488,7 @@
                 Iterator it = holdingDataBeans.iterator();
                 while (it.hasNext()) {
                     HoldingDataBean holdingData = (HoldingDataBean) it.next();
-                    QuoteDataBean quoteData = tAction.getQuote(holdingData
+                    QuoteDataBean quoteData = tradeServices.getQuote(holdingData
                             .getQuoteID());
                     quoteDataBeans.add(quoteData);
                 }
@@ -595,13 +595,13 @@
             String openBalanceString, String email, String address)
             throws ServletException, IOException {
         String results = "";
-        TradeServices tAction = ServletUtilities.getTradeServices();
+        TradeServices tradeServices = ServletUtilities.getTradeServices();
 
         try {
             // Validate user passwords match and are atleast 1 char in length
             if ((passwd.equals(cpasswd)) && (passwd.length() >= 1)) {
 
-                AccountDataBean accountData = tAction.register(userID, passwd,
+                AccountDataBean accountData = tradeServices.register(userID, passwd,
                         fullname, address, email, ccn, new BigDecimal(
                                 openBalanceString));
                 if (accountData == null) {
@@ -660,9 +660,9 @@
             HttpServletResponse resp, String userID, Integer holdingID)
             throws ServletException, IOException {
         String results = "";
-        TradeServices tAction = ServletUtilities.getTradeServices();
+        TradeServices tradeServices = ServletUtilities.getTradeServices();
         try {
-            OrderDataBean orderData = tAction.sell(userID, holdingID,
+            OrderDataBean orderData = tradeServices.sell(userID, holdingID,
                     TradeConfig.orderProcessingMode);
 
             req.setAttribute("orderData", orderData);



Mime
View raw message