geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jb...@apache.org
Subject svn commit: r820789 - in /geronimo/sandbox/jbohn/daytrader-bp: assemblies/web/daytrader-web-jdbc/ assemblies/web/daytrader-web-jdbc/src/main/webapp/ modules/core/ modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/util/ modules/util/...
Date Thu, 01 Oct 2009 21:02:41 GMT
Author: jbohn
Date: Thu Oct  1 21:02:40 2009
New Revision: 820789

URL: http://svn.apache.org/viewvc?rev=820789&view=rev
Log:
rework service utilities and move to appropriate packages

Added:
    geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/util/
    geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/util/TradeServiceUtilities.java
  (with props)
    geronimo/sandbox/jbohn/daytrader-bp/modules/util/src/main/java/org/apache/geronimo/samples/daytrader/util/ServiceUtilities.java
      - copied, changed from r820466, geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/util/ServletUtilities.java
Removed:
    geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/util/ServletUtilities.java
Modified:
    geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/pom.xml
    geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/src/main/webapp/displayQuote.jsp
    geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/src/main/webapp/marketSummary.jsp
    geronimo/sandbox/jbohn/daytrader-bp/modules/core/pom.xml
    geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/OrdersAlertFilter.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/TradeAppServlet.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
    geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingJDBCRead.java
    geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingJDBCWrite.java

Modified: geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/pom.xml?rev=820789&r1=820788&r2=820789&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/pom.xml (original)
+++ geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/pom.xml Thu Oct
 1 21:02:40 2009
@@ -146,6 +146,7 @@
                   <Import-Package>
                       org.apache.geronimo.samples.daytrader.beans;version=1.0,
                       org.apache.geronimo.samples.daytrader.core;version=1.0,
+                      org.apache.geronimo.samples.daytrader.core.util;version=1.0,
                       org.apache.geronimo.samples.daytrader.util;version=1.0
                   </Import-Package>
                 </instructions>

Modified: geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/src/main/webapp/displayQuote.jsp
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/src/main/webapp/displayQuote.jsp?rev=820789&r1=820788&r2=820789&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/src/main/webapp/displayQuote.jsp
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/src/main/webapp/displayQuote.jsp
Thu Oct  1 21:02:40 2009
@@ -15,11 +15,11 @@
   limitations under the License.
 -->
 <%@ page
-	import="java.math.BigDecimal, org.apache.geronimo.samples.daytrader.core.*, org.apache.geronimo.samples.daytrader.beans.*,
org.apache.geronimo.samples.daytrader.util.*, org.apache.geronimo.samples.daytrader.web.util.*"
+	import="java.math.BigDecimal, org.apache.geronimo.samples.daytrader.core.*, org.apache.geronimo.samples.daytrader.core.util.*,
org.apache.geronimo.samples.daytrader.beans.*, org.apache.geronimo.samples.daytrader.util.*"
 	session="true" isThreadSafe="true" isErrorPage="false"%>
 <% 
     String symbol = request.getParameter("symbol");
-    TradeServices tradeServices = ServletUtilities.getTradeServices();
+    TradeServices tradeServices = TradeServiceUtilities.getTradeServices();
 	try { 
 		QuoteDataBean quoteData = tradeServices.getQuote(symbol);
 

Modified: geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/src/main/webapp/marketSummary.jsp
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/src/main/webapp/marketSummary.jsp?rev=820789&r1=820788&r2=820789&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/src/main/webapp/marketSummary.jsp
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/assemblies/web/daytrader-web-jdbc/src/main/webapp/marketSummary.jsp
Thu Oct  1 21:02:40 2009
@@ -15,11 +15,11 @@
   limitations under the License.
 -->
 <%@ page
-	import="java.util.Collection, java.util.Iterator, org.apache.geronimo.samples.daytrader.core.*,
org.apache.geronimo.samples.daytrader.beans.*, org.apache.geronimo.samples.daytrader.util.*,
org.apache.geronimo.samples.daytrader.web.util.*"
+	import="java.util.Collection, java.util.Iterator, org.apache.geronimo.samples.daytrader.core.*,
org.apache.geronimo.samples.daytrader.core.util.*, org.apache.geronimo.samples.daytrader.beans.*,
org.apache.geronimo.samples.daytrader.util.*"
 	session="true" isThreadSafe="true" isErrorPage="false"%>
 
 <%
-TradeServices tradeServices = ServletUtilities.getTradeServices();
+TradeServices tradeServices = TradeServiceUtilities.getTradeServices();
 MarketSummaryDataBean marketSummaryData = tradeServices.getMarketSummary();
 %>
 <TABLE border="1" bgcolor="#ffffff" width="100%"

Modified: geronimo/sandbox/jbohn/daytrader-bp/modules/core/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/core/pom.xml?rev=820789&r1=820788&r2=820789&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/core/pom.xml (original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/core/pom.xml Thu Oct  1 21:02:40 2009
@@ -100,12 +100,13 @@
                 <configuration>
                     <instructions>
                         <Export-Package>
-                            org.apache.geronimo.samples.daytrader.core;version=1.0.0
+                            org.apache.geronimo.samples.daytrader.core;version=1.0.0,
+                            org.apache.geronimo.samples.daytrader.core.util;version=1.0.0
                         </Export-Package>
                         <Import-Package>
                             org.apache.geronimo.samples.daytrader.beans;version=1.0,
                             org.apache.geronimo.samples.daytrader.util;version=1.0,
-                            javax.persistence;version=1.0.0,
+                            <!--javax.persistence;version=1.0.0,-->
                             javax.naming,
                             javax.sql
                         </Import-Package>

Added: geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/util/TradeServiceUtilities.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/util/TradeServiceUtilities.java?rev=820789&view=auto
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/util/TradeServiceUtilities.java
(added)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/util/TradeServiceUtilities.java
Thu Oct  1 21:02:40 2009
@@ -0,0 +1,82 @@
+/**
+ *  Licensed to4the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership. The ASF licenses this file to
+ *  You under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the
+ *  License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.samples.daytrader.core.util;
+
+import org.apache.geronimo.samples.daytrader.core.TradeServices;
+import org.apache.geronimo.samples.daytrader.core.TradeDBServices;
+import org.apache.geronimo.samples.daytrader.core.TradeServicesManager;
+import org.apache.geronimo.samples.daytrader.util.ServiceUtilities;
+
+
+/**
+ * TradeServiceUtilities provides servlet specific client side
+ * utility functions.
+ */
+public class TradeServiceUtilities {
+
+    /**
+     * Lookup and return the TradeServices osgi service
+     * 
+     * @return TradeServices
+     * 
+     */
+    public static final TradeServices getTradeServices() {
+        return getTradeServices(null);
+    }
+
+    /**
+     * Lookup and return the TradeServices osgi service
+     * 
+     * @return TradeServices
+     * 
+     */
+    public static final TradeServices getTradeServices(String filter) {
+        return (TradeServices) ServiceUtilities.getOSGIService(TradeServices.class.getName(),
filter);
+    }
+
+    /**
+     * Lookup and return the TradeDBServices osgi service
+     * 
+     * @return TradeDBServices
+     * 
+     */
+    public static final TradeDBServices getTradeDBServices() {
+        return getTradeDBServices(null);
+    }
+
+    /**
+     * Lookup and return the TradeDBServices osgi service
+     * 
+     * @return TradeDBServices
+     * 
+     */
+    public static final TradeDBServices getTradeDBServices(String filter) {
+        return (TradeDBServices) ServiceUtilities.getOSGIService(TradeDBServices.class.getName(),
filter);
+    }
+
+    /**
+     * Lookup and return the TradeServicesManager osgi service
+     * 
+     * @return TradeServicesManager
+     * 
+     */
+    public static final TradeServicesManager getTradeServicesManager() {
+        return (TradeServicesManager) ServiceUtilities.getOSGIService(TradeServicesManager.class.getName());
+    }
+
+}
\ No newline at end of file

Propchange: geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/util/TradeServiceUtilities.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/util/TradeServiceUtilities.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/util/TradeServiceUtilities.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/sandbox/jbohn/daytrader-bp/modules/util/src/main/java/org/apache/geronimo/samples/daytrader/util/ServiceUtilities.java
(from r820466, geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/util/ServletUtilities.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/util/src/main/java/org/apache/geronimo/samples/daytrader/util/ServiceUtilities.java?p2=geronimo/sandbox/jbohn/daytrader-bp/modules/util/src/main/java/org/apache/geronimo/samples/daytrader/util/ServiceUtilities.java&p1=geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/util/ServletUtilities.java&r1=820466&r2=820789&rev=820789&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/util/ServletUtilities.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/util/src/main/java/org/apache/geronimo/samples/daytrader/util/ServiceUtilities.java
Thu Oct  1 21:02:40 2009
@@ -15,75 +15,19 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.samples.daytrader.web.util;
+package org.apache.geronimo.samples.daytrader.util;
 
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 
-import org.apache.geronimo.samples.daytrader.core.TradeServices;
-import org.apache.geronimo.samples.daytrader.core.TradeDBServices;
-import org.apache.geronimo.samples.daytrader.core.TradeServicesManager;
-import org.apache.geronimo.samples.daytrader.util.Log;
-
-
 /**
- * ServletUtilities provides servlet specific client side
+ * ServiceUtilities provides servlet specific client side
  * utility functions.
- * @JAB  Need to move this to util bundle as ServiceUtilities
  */
-public class ServletUtilities {
+public class ServiceUtilities {
 
     private static String prefix = "osgi:services/";
 
-    /**
-     * Lookup and return the TradeServices osgi service
-     * 
-     * @return TradeServices
-     * 
-     */
-    public static final TradeServices getTradeServices() {
-        return getTradeServices(null);
-    }
-
-    /**
-     * Lookup and return the TradeServices osgi service
-     * 
-     * @return TradeServices
-     * 
-     */
-    public static final TradeServices getTradeServices(String filter) {
-        return (TradeServices) getOSGIService(TradeServices.class.getName(), filter);
-    }
-
-    /**
-     * Lookup and return the TradeDBServices osgi service
-     * 
-     * @return TradeDBServices
-     * 
-     */
-    public static final TradeDBServices getTradeDBServices() {
-        return getTradeDBServices(null);
-    }
-
-    /**
-     * Lookup and return the TradeDBServices osgi service
-     * 
-     * @return TradeDBServices
-     * 
-     */
-    public static final TradeDBServices getTradeDBServices(String filter) {
-        return (TradeDBServices) getOSGIService(TradeDBServices.class.getName(), filter);
-    }
-
-    /**
-     * Lookup and return the TradeServicesManager osgi service
-     * 
-     * @return TradeServicesManager
-     * 
-     */
-    public static final TradeServicesManager getTradeServicesManager() {
-        return (TradeServicesManager) getOSGIService(TradeServicesManager.class.getName(),
null);
-    }
 
     /**
      * Lookup and return an osgi service
@@ -104,26 +48,22 @@
      * @return Object
      * 
      */
-    private static final Object getOSGIService(String serviceName, String filter)
-    {
+    public static final Object getOSGIService(String serviceName, String filter) {
         String name = prefix + serviceName;
         if (filter != null) {
-            name = name + filter;
+            name = name + "/" + filter;
         }
 
         try {
             InitialContext ic = new InitialContext();
             return ic.lookup(name);
         } catch (NamingException e) {
-            System.out.println("@JAB ServletUtilities.getOSGIService() exception on lookup
" + e);
+            System.out.println("@JAB ServiceUtilities.getOSGIService() exception on lookup
" + e);
             Log.error(e,
-                      "ServletUtilities.getOSGIService(...)",
+                      "ServiceUtilities.getOSGIService(...)",
                       "NamingException on OSGI service lookup");
             e.printStackTrace();
             return null;
         }
     }
-
-
-
 }
\ No newline at end of file

Modified: geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/OrdersAlertFilter.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/OrdersAlertFilter.java?rev=820789&r1=820788&r2=820789&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/OrdersAlertFilter.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/OrdersAlertFilter.java
Thu Oct  1 21:02:40 2009
@@ -21,8 +21,8 @@
 import javax.servlet.http.*;
 
 import org.apache.geronimo.samples.daytrader.core.TradeServices;
+import org.apache.geronimo.samples.daytrader.core.util.TradeServiceUtilities;
 import org.apache.geronimo.samples.daytrader.util.*;
-import org.apache.geronimo.samples.daytrader.web.util.*;
 
 public class OrdersAlertFilter implements Filter {
 
@@ -64,7 +64,7 @@
                         userID = (String) ((HttpServletRequest) req).getSession().getAttribute("uidBean");
                     if ( (userID != null) && (userID.trim().length()>0) ) {
 
-                        TradeServices tradeServices = ServletUtilities.getTradeServices();
+                        TradeServices tradeServices = TradeServiceUtilities.getTradeServices();
                         java.util.Collection closedOrders = tradeServices.getClosedOrders(userID);
                         if ( (closedOrders!=null) && (closedOrders.size() > 0)
) {
                             req.setAttribute("closedOrders", closedOrders);

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=820789&r1=820788&r2=820789&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
Thu Oct  1 21:02:40 2009
@@ -21,8 +21,8 @@
 
 //import org.apache.geronimo.samples.daytrader.*;
 import org.apache.geronimo.samples.daytrader.core.TradeServices;
+import org.apache.geronimo.samples.daytrader.core.util.TradeServiceUtilities;
 import org.apache.geronimo.samples.daytrader.util.*;
-import org.apache.geronimo.samples.daytrader.web.util.*;
 
 import java.io.IOException;
 import java.math.BigDecimal;
@@ -70,7 +70,7 @@
 		throws ServletException, IOException 
 	{
 		try {
-                    TradeServices tradeServices = ServletUtilities.getTradeServices();
+                    TradeServices tradeServices = TradeServiceUtilities.getTradeServices();
 			Log.debug("Enter TestServlet doGet");
 			TradeConfig.runTimeMode = TradeConfig.DIRECT;
 			for (int i=0; i<10; i++) 

Modified: geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeAppServlet.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeAppServlet.java?rev=820789&r1=820788&r2=820789&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeAppServlet.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeAppServlet.java
Thu Oct  1 21:02:40 2009
@@ -21,9 +21,8 @@
 
 import org.apache.geronimo.samples.daytrader.core.TradeServices;
 import org.apache.geronimo.samples.daytrader.core.TradeServicesManager;
+import org.apache.geronimo.samples.daytrader.core.util.TradeServiceUtilities;
 import org.apache.geronimo.samples.daytrader.util.*;
-//@JAB need to drop this after I move and rename ServletUtilities
-import org.apache.geronimo.samples.daytrader.web.util.*;
 
 import java.io.IOException;
 
@@ -111,7 +110,7 @@
 
         if (tradeServices == null) {
             System.out.println("@JAB TradeAppServlet.performTask() - about to do a lookup
of TradeServicesManager");
-            TradeServicesManager tradeServicesManager = ServletUtilities.getTradeServicesManager();
+            TradeServicesManager tradeServicesManager = TradeServiceUtilities.getTradeServicesManager();
             tradeServices = tradeServicesManager.getTradeServices();
         }
 

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=820789&r1=820788&r2=820789&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
Thu Oct  1 21:02:40 2009
@@ -25,9 +25,9 @@
 
 import org.apache.geronimo.samples.daytrader.core.TradeServices;
 import org.apache.geronimo.samples.daytrader.core.TradeDBServices;
+import org.apache.geronimo.samples.daytrader.core.util.TradeServiceUtilities;
 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 
@@ -58,8 +58,8 @@
         throws Exception {
         String symbol, companyName;
         int errorCount = 0; // Give up gracefully after 10 errors
-        TradeServices tradeServices = ServletUtilities.getTradeServices();
-        TradeDBServices tradeDBServices = ServletUtilities.getTradeDBServices();
+        TradeServices tradeServices = TradeServiceUtilities.getTradeServices();
+        TradeDBServices tradeDBServices = TradeServiceUtilities.getTradeDBServices();
 
         // TradeStatistics.statisticsEnabled=false; // disable statistics
         out.println("<HEAD><BR><EM> TradeBuildDB: Building DayTrader Database...</EM><BR>"

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=820789&r1=820788&r2=820789&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
Thu Oct  1 21:02:40 2009
@@ -22,8 +22,8 @@
 import org.apache.geronimo.samples.daytrader.core.RunStatsDataBean;
 import org.apache.geronimo.samples.daytrader.core.TradeServices;
 import org.apache.geronimo.samples.daytrader.core.TradeServicesManager;
+import org.apache.geronimo.samples.daytrader.core.util.TradeServiceUtilities;
 import org.apache.geronimo.samples.daytrader.util.*;
-import org.apache.geronimo.samples.daytrader.web.util.*;
 
 import java.io.IOException;
 
@@ -76,7 +76,7 @@
 
                 if (tradeServices == null) {
                     System.out.println("@JAB TradeConfigServlet.performTask() - about to
do a lookup of TradeServicesManager");
-                    TradeServicesManager tradeServicesManager = ServletUtilities.getTradeServicesManager();
+                    TradeServicesManager tradeServicesManager = TradeServiceUtilities.getTradeServicesManager();
                     tradeServices = tradeServicesManager.getTradeServices();
                 }
 

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=820789&r1=820788&r2=820789&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
Thu Oct  1 21:02:40 2009
@@ -23,9 +23,9 @@
 import javax.servlet.http.*;
 
 import org.apache.geronimo.samples.daytrader.core.TradeServices;
+import org.apache.geronimo.samples.daytrader.core.util.TradeServiceUtilities;
 import org.apache.geronimo.samples.daytrader.beans.*;
 import org.apache.geronimo.samples.daytrader.util.*;
-import org.apache.geronimo.samples.daytrader.web.util.*;
 
 import java.io.IOException;
 import java.util.Collection;
@@ -77,7 +77,7 @@
     void doAccount(ServletContext ctx, HttpServletRequest req,
             HttpServletResponse resp, String userID, String results)
             throws javax.servlet.ServletException, java.io.IOException {
-//        TradeServices tradeServices = ServletUtilities.getTradeServices();
+//        TradeServices tradeServices = TradeServiceUtilities.getTradeServices();
         try {
 
             AccountDataBean accountData = tradeServices.getAccountData(userID);
@@ -149,7 +149,7 @@
             String creditcard, String email)
             throws javax.servlet.ServletException, java.io.IOException {
         String results = "";
-//        TradeServices tradeServices = ServletUtilities.getTradeServices();
+//        TradeServices tradeServices = TradeServiceUtilities.getTradeServices();
 
         // First verify input data
         boolean doUpdate = true;
@@ -214,7 +214,7 @@
             String quantity) throws ServletException, IOException {
 
         String results = "";
-//        TradeServices tradeServices = ServletUtilities.getTradeServices();
+//        TradeServices tradeServices = TradeServiceUtilities.getTradeServices();
 
         try {
             OrderDataBean orderData = tradeServices.buy(userID, symbol, new Double(
@@ -269,7 +269,7 @@
         
         BigDecimal balance;
         String result = "";
-//        TradeServices tradeServices = ServletUtilities.getTradeServices();
+//        TradeServices tradeServices = TradeServiceUtilities.getTradeServices();
         
         try {
             AccountDataBean accountData = tradeServices.getAccountData(userID);
@@ -332,7 +332,7 @@
             throws javax.servlet.ServletException, java.io.IOException {
 
         String results = "";
-//        TradeServices tradeServices = ServletUtilities.getTradeServices();
+//        TradeServices tradeServices = TradeServiceUtilities.getTradeServices();
         try {
             // Got a valid userID and passwd, attempt login
 
@@ -407,7 +407,7 @@
             HttpServletResponse resp, String userID) throws ServletException,
             IOException {
         String results = "";
-//        TradeServices tradeServices = ServletUtilities.getTradeServices();
+//        TradeServices tradeServices = TradeServiceUtilities.getTradeServices();
 
         try {
             tradeServices.logout(userID);
@@ -478,7 +478,7 @@
             HttpServletResponse resp, String userID, String results)
             throws ServletException, IOException {
 
-//        TradeServices tradeServices = ServletUtilities.getTradeServices();
+//        TradeServices tradeServices = TradeServiceUtilities.getTradeServices();
         try {
             // Get the holdiings for this user
 
@@ -599,7 +599,7 @@
             String openBalanceString, String email, String address)
             throws ServletException, IOException {
         String results = "";
-//        TradeServices tradeServices = ServletUtilities.getTradeServices();
+//        TradeServices tradeServices = TradeServiceUtilities.getTradeServices();
 
         try {
             // Validate user passwords match and are atleast 1 char in length
@@ -664,7 +664,7 @@
             HttpServletResponse resp, String userID, Integer holdingID)
             throws ServletException, IOException {
         String results = "";
-//        TradeServices tradeServices = ServletUtilities.getTradeServices();
+//        TradeServices tradeServices = TradeServiceUtilities.getTradeServices();
         try {
             OrderDataBean orderData = tradeServices.sell(userID, holdingID,
                     TradeConfig.orderProcessingMode);

Modified: geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingJDBCRead.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingJDBCRead.java?rev=820789&r1=820788&r2=820789&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingJDBCRead.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingJDBCRead.java
Thu Oct  1 21:02:40 2009
@@ -21,9 +21,9 @@
 import javax.servlet.http.*;
 
 import org.apache.geronimo.samples.daytrader.core.TradeServices;
+import org.apache.geronimo.samples.daytrader.core.util.TradeServiceUtilities;
 import org.apache.geronimo.samples.daytrader.beans.*;
 import org.apache.geronimo.samples.daytrader.util.*;
-import org.apache.geronimo.samples.daytrader.web.util.*;
 
 /**
  * 
@@ -66,7 +66,7 @@
 		try
 			{
 			//TradeJDBCDirect (via TradeServices) uses prepared statements so I am going to make use
of it's code.
-                        TradeServices tradeServices = ServletUtilities.getTradeServices();
+                        TradeServices tradeServices = TradeServiceUtilities.getTradeServices();
 			symbol = TradeConfig.rndSymbol();
 			
 			QuoteDataBean quoteData = null;

Modified: geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingJDBCWrite.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingJDBCWrite.java?rev=820789&r1=820788&r2=820789&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingJDBCWrite.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingJDBCWrite.java
Thu Oct  1 21:02:40 2009
@@ -22,9 +22,9 @@
 import javax.servlet.http.*;
 
 import org.apache.geronimo.samples.daytrader.core.TradeServices;
+import org.apache.geronimo.samples.daytrader.core.util.TradeServiceUtilities;
 import org.apache.geronimo.samples.daytrader.beans.*;
 import org.apache.geronimo.samples.daytrader.util.*;
-import org.apache.geronimo.samples.daytrader.web.util.ServletUtilities;
 
 /**
  * 
@@ -62,7 +62,7 @@
 		newPrice = TradeConfig.getRandomPriceChangeFactor();
 
 		//TradeJDBCDirect via TradeServices makes use of prepared statements so I am going to reuse
the existing code.
-                TradeServices tradeServices = ServletUtilities.getTradeServices();
+                TradeServices tradeServices = TradeServiceUtilities.getTradeServices();
 
 		//update the price of our symbol
 		QuoteDataBean quoteData = null;



Mime
View raw message