geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jb...@apache.org
Subject svn commit: r825260 - in /geronimo/sandbox/jbohn/daytrader-bp/modules: core/src/main/java/org/apache/geronimo/samples/daytrader/core/ core/src/main/java/org/apache/geronimo/samples/daytrader/core/util/ util/src/main/java/org/apache/geronimo/samples/day...
Date Wed, 14 Oct 2009 20:23:03 GMT
Author: jbohn
Date: Wed Oct 14 20:23:02 2009
New Revision: 825260

URL: http://svn.apache.org/viewvc?rev=825260&view=rev
Log:
add in some log/trace entries for new parts to be consistent with other modules

Modified:
    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/java/org/apache/geronimo/samples/daytrader/core/util/TradeServiceUtilities.java
    geronimo/sandbox/jbohn/daytrader-bp/modules/util/src/main/java/org/apache/geronimo/samples/daytrader/util/ServiceUtilities.java
    geronimo/sandbox/jbohn/daytrader-bp/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/OrdersAlertFilter.java

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=825260&r1=825259&r2=825260&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 20:23:02 2009
@@ -67,6 +67,8 @@
     public void init()
     {
 //        System.out.println("@JAB TradeServicesManagerImpl.init - Initialized ");
+        if (Log.doTrace())
+            Log.trace("TradeServicesManagerImpl:init()");
     }
 
 
@@ -75,6 +77,8 @@
       */
     public ArrayList<Integer> getCurrentModes()
     {
+        if (Log.doTrace())
+            Log.trace("TradeServicesManagerImpl:getCurrentModes()");
         ArrayList<Integer> modes = new ArrayList<Integer>();
         for (int i=0; i<tradeServicesList.length; i++) {
             TradeServices tradeServicesRef = tradeServicesList[i];
@@ -90,6 +94,8 @@
       */
     public void setTradeServices(TradeServices tradeServices)
     {
+        if (Log.doTrace())
+            Log.trace("TradeServicesManagerImpl:setTradeServices()" , tradeServices);
 //        System.out.println("@JAB TradeServicesManagerImpl.setTradeServices adding " + tradeServices);
         tradeServicesList[tradeServices.getMode()] = tradeServices;
 //        System.out.println("@JAB TradeServicesManagerImpl.setTradeServices added ");
@@ -100,6 +106,8 @@
       */
     public void setTradeServicesJPA(TradeServices tradeServicesJPA)
     {
+        if (Log.doTrace())
+            Log.trace("TradeServicesManagerImpl:setTradeServicesJPA()" , tradeServicesJPA);
 //        System.out.println("@JAB TradeServicesManagerImpl.setTradeServicesJPA adding "
+ tradeServicesJPA);
         tradeServicesList[tradeServicesJPA.getMode()] = tradeServicesJPA;
 //        System.out.println("@JAB TradeServicesManagerImpl.setTradeServicesJPA added");
@@ -108,6 +116,9 @@
 
     public TradeServices getTradeServices()
     {
+//        System.out.println("@JAB TradeServicesManagerImpl.getTradeServices");
+        if (Log.doTrace()) 
+            Log.trace("TradeServicesManagerImpl:getTradeServices()");
 //        System.out.println("@JAB TradeServicesManagerImpl.getTradeServices - returning
" + tradeServicesList[TradeConfig.runTimeMode]);
         return tradeServicesList[TradeConfig.runTimeMode];
     }
@@ -117,6 +128,8 @@
       */
     public void setTradeDBServices(TradeDBServices tradeDBServices)
     {
+        if (Log.doTrace())
+            Log.trace("TradeServicesManagerImpl:setTradeDBServices()", tradeDBServices);
 //        System.out.println("@JAB TradeServicesManagerImpl.setTradeDBServices adding " +
tradeDBServices);
         tradeDBServicesList[tradeDBServices.getMode()] = tradeDBServices;
 //        System.out.println("@JAB TradeServicesManagerImpl.setTradeDBServices added");
@@ -127,6 +140,8 @@
       */
     public void setTradeDBServicesJPA(TradeDBServices tradeDBServicesJPA)
     {
+        if (Log.doTrace())
+            Log.trace("TradeServicesManagerImpl:setTradeDBServicesJPA()", tradeDBServicesJPA);
 //        System.out.println("@JAB TradeServicesManagerImpl.setTradeDBServicesJPA adding
" + tradeDBServicesJPA);
         tradeDBServicesList[tradeDBServicesJPA.getMode()] = tradeDBServicesJPA;
 //        System.out.println("@JAB TradeServicesManagerImpl.setTradeDBServicesJPA added");
@@ -135,6 +150,8 @@
 
     public TradeDBServices getTradeDBServices()
     {
+        if (Log.doTrace())
+            Log.trace("TradeServicesManagerImpl:getTradeDBServicesJPA()");
 //        System.out.println("@JAB TradeServicesManagerImpl.getTradeDBServices - returning
" + tradeServicesList[TradeConfig.runTimeMode]);
         return tradeDBServicesList[TradeConfig.runTimeMode];
     }
@@ -144,6 +161,8 @@
       */
     public void bindService(TradeServices tradeServices, Map props)
     {
+        if (Log.doTrace())
+            Log.trace("TradeServicesManagerImpl:bindService()", tradeServices, props);
 //        System.out.println("@JAB TradeServicesManagerImpl.bindService adding " + tradeServices
+ "Properties " + props);
         if (tradeServices != null) {
             tradeServicesList[tradeServices.getMode()] = tradeServices;
@@ -156,6 +175,8 @@
       */
     public void unbindService(TradeServices tradeServices, Map props)
     {
+        if (Log.doTrace())
+            Log.trace("TradeServicesManagerImpl:unbindService()", tradeServices, props);
 //        System.out.println("@JAB TradeServicesManagerImpl.unbindService removing " + tradeServices
+ "Properties " + props);
         if (tradeServices != null) {
             tradeServicesList[tradeServices.getMode()] = null;
@@ -168,6 +189,8 @@
       */
     public void bindDBService(TradeDBServices tradeDBServices, Map props)
     {
+        if (Log.doTrace())
+            Log.trace("TradeServicesManagerImpl:bindDBService()", tradeDBServices, props);
 //        System.out.println("@JAB TradeServicesManagerImpl.bindDBService adding " + tradeDBServices
+ "Properties " + props);
         if (tradeDBServices != null) {
             tradeDBServicesList[tradeDBServices.getMode()] = tradeDBServices;
@@ -180,6 +203,8 @@
       */
     public void unbindDBService(TradeServices tradeDBServices, Map props)
     {
+        if (Log.doTrace())
+            Log.trace("TradeServicesManagerImpl:unbindDBService()", tradeDBServices, props);
 //        System.out.println("@JAB TradeServicesManagerImpl.unbindDBService removing " +
tradeDBServices + "Properties " + props);
         if (tradeDBServices != null) {
             tradeDBServicesList[tradeDBServices.getMode()] = null;
@@ -202,6 +227,9 @@
             Log.trace("TradeAction:getMarketSummary()");
         }
     
+        if (Log.doTrace())
+            Log.trace("TradeServicesManagerImpl:getMarketSummary()");
+
         if (TradeConfig.getMarketSummaryInterval() == 0) return getMarketSummaryInternal();
         if (TradeConfig.getMarketSummaryInterval() < 0) return cachedMSDB;
     

Modified: 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=825260&r1=825259&r2=825260&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/util/TradeServiceUtilities.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/util/TradeServiceUtilities.java
Wed Oct 14 20:23:02 2009
@@ -17,9 +17,10 @@
  */
 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.TradeServices;
 import org.apache.geronimo.samples.daytrader.core.TradeServicesManager;
+import org.apache.geronimo.samples.daytrader.util.Log;
 import org.apache.geronimo.samples.daytrader.util.ServiceUtilities;
 
 
@@ -36,6 +37,8 @@
      * 
      */
     public static final TradeServices getTradeServices() {
+        if (Log.doTrace())
+            Log.trace("TradeServiceUtilities:getTradeServices()");
         return getTradeServices(null);
     }
 
@@ -46,6 +49,8 @@
      * 
      */
     public static final TradeServices getTradeServices(String filter) {
+        if (Log.doTrace())
+            Log.trace("TradeServiceUtilities:getTradeServices()" , filter);
         return (TradeServices) ServiceUtilities.getOSGIService(TradeServices.class.getName(),
filter);
     }
 
@@ -56,6 +61,8 @@
      * 
      */
     public static final TradeDBServices getTradeDBServices() {
+        if (Log.doTrace())
+            Log.trace("TradeServiceUtilities:getTradeDBServices()");
         return getTradeDBServices(null);
     }
 
@@ -67,6 +74,8 @@
      * 
      */
     public static final TradeDBServices getTradeDBServices(String filter) {
+        if (Log.doTrace())
+            Log.trace("TradeServiceUtilities:getTradeDBServices()", filter);
         return (TradeDBServices) ServiceUtilities.getOSGIService(TradeDBServices.class.getName(),
filter);
     }
 
@@ -77,6 +86,8 @@
      * 
      */
     public static final TradeServicesManager getTradeServicesManager() {
+        if (Log.doTrace())
+            Log.trace("TradeServiceUtilities:getTradeServicesManager()");
         return (TradeServicesManager) ServiceUtilities.getOSGIService(TradeServicesManager.class.getName());
     }
 

Modified: geronimo/sandbox/jbohn/daytrader-bp/modules/util/src/main/java/org/apache/geronimo/samples/daytrader/util/ServiceUtilities.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?rev=825260&r1=825259&r2=825260&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/util/src/main/java/org/apache/geronimo/samples/daytrader/util/ServiceUtilities.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/util/src/main/java/org/apache/geronimo/samples/daytrader/util/ServiceUtilities.java
Wed Oct 14 20:23:02 2009
@@ -39,6 +39,8 @@
      * 
      */
     public static final Object getOSGIService(String serviceName) {
+        if (Log.doTrace())
+            Log.trace("ServiceUtilities:getOSGIService()", serviceName);
         return getOSGIService(serviceName, null);
     }
 
@@ -49,6 +51,8 @@
      * 
      */
     public static final Object getOSGIService(String serviceName, String filter) {
+        if (Log.doTrace())
+            Log.trace("ServiceUtilities:getOSGIService()", serviceName, filter);
         String name = prefix + serviceName;
         if (filter != null) {
             name = name + "/" + filter;
@@ -58,9 +62,7 @@
             InitialContext ic = new InitialContext();
             return ic.lookup(name);
         } catch (NamingException e) {
-            Log.error(e,
-                      "ServiceUtilities.getOSGIService(...)",
-                      "NamingException on OSGI service lookup");
+            Log.error("ServiceUtilities:getOSGIService() -- NamingException on OSGI service
lookup", e);
             e.printStackTrace();
             return null;
         }

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=825260&r1=825259&r2=825260&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
Wed Oct 14 20:23:02 2009
@@ -77,7 +77,7 @@
                             req.setAttribute("closedOrders", closedOrders);
                         }
                         if (Log.doTrace()) {
-                            Log.printCollection("OrderAlertFilter: userID="+userID+" closedOrders=",
closedOrders);
+                            Log.printCollection("OrdersAlertFilter: userID="+userID+" closedOrders=",
closedOrders);
                         }
                     }
                 }



Mime
View raw message