geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jb...@apache.org
Subject svn commit: r825388 - in /geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main: java/org/apache/geronimo/samples/daytrader/core/ java/org/apache/geronimo/samples/daytrader/core/direct/ resources/OSGI-INF/blueprint/
Date Thu, 15 Oct 2009 04:36:38 GMT
Author: jbohn
Date: Thu Oct 15 04:36:37 2009
New Revision: 825388

URL: http://svn.apache.org/viewvc?rev=825388&view=rev
Log:
a little better organization to make it easier to switch between reference and reference-list

Modified:
    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/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJDBCDirect.java
    geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/resources/OSGI-INF/blueprint/listener.xml

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=825388&r1=825387&r2=825388&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
Thu Oct 15 04:36:37 2009
@@ -17,6 +17,7 @@
 package org.apache.geronimo.samples.daytrader.core;
 
 import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.geronimo.samples.daytrader.core.TradeServices;
 import org.apache.geronimo.samples.daytrader.core.TradeDBServices;
@@ -29,23 +30,26 @@
   */ 
 public interface TradeServicesManager {
 
-    /**
-      * Set TradeServices reference
-      */
-    public void setTradeServices(TradeServices tradeServices);
-
 
     /**
       * Get CurrentModes that are registered
       */
     public ArrayList<Integer> getCurrentModes();
 
+    /**
+      * Set TradeServicesList reference
+      */
+    public void setTradeServicesList(List tradeList);
 
     /**
-      * Get the currently selected TradeServices
+      * Set TradeDBServicesList reference
       */
+    public void setTradeDBServicesList(List tradeDBList);
 
-    public TradeServices getTradeServices();
+    /**
+      * Set TradeServices reference
+      */
+    public void setTradeServices(TradeServices tradeServices);
 
     /**
       * Set TradeDBServices reference
@@ -53,6 +57,12 @@
     public void setTradeDBServices(TradeDBServices tradeDBServices);
 
     /**
+      * Get the currently selected TradeServices
+      */
+
+    public TradeServices getTradeServices();
+
+    /**
       * Get the currently selected TradeDBServices
       */
     public TradeDBServices getTradeDBServices();

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=825388&r1=825387&r2=825388&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
Thu Oct 15 04:36:37 2009
@@ -18,6 +18,7 @@
 
 import java.util.ArrayList;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 
 import org.apache.geronimo.samples.daytrader.util.Log;
@@ -56,16 +57,14 @@
     /**
       * TradeServicesManagerImpl null constructor
       */
-    public TradeServicesManagerImpl() 
-    {
+    public TradeServicesManagerImpl() {
 //        System.out.println("@JAB TradeServicesManagerImpl() ");
     }
 
     /**
       * init
       */
-    public void init()
-    {
+    public void init() {
 //        System.out.println("@JAB TradeServicesManagerImpl.init - Initialized ");
         if (Log.doTrace())
             Log.trace("TradeServicesManagerImpl:init()");
@@ -75,8 +74,7 @@
     /**
       * Get CurrentModes that are registered
       */
-    public ArrayList<Integer> getCurrentModes()
-    {
+    public ArrayList<Integer> getCurrentModes() {
         if (Log.doTrace())
             Log.trace("TradeServicesManagerImpl:getCurrentModes()");
         ArrayList<Integer> modes = new ArrayList<Integer>();
@@ -90,33 +88,50 @@
     }
 
     /**
-      * Set TradeServices reference
+      * Set TradeServicesList reference
       */
-    public void setTradeServices(TradeServices tradeServices)
-    {
+    public void setTradeServicesList(List tradeList) {
         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 ");
+            Log.trace("TradeServicesManagerImpl:setTradeServicesList()" , tradeList);
+//        System.out.println("@JAB TradeServicesManagerImpl.setTradeServicesList size " +
tradeList.size());
+        Iterator it = tradeList.iterator();
+        while (it.hasNext()) {  
+            TradeServices tradeServices =  (TradeServices) it.next(); 
+//            System.out.println("@JAB TradeServicesManagerImpl.setTradeServicesList adding
" + tradeServices);
+            this.tradeServicesList[tradeServices.getMode()] = tradeServices;
+        }  
+    }
+
+    /**
+      * Set TradeDBServicesList reference
+      */
+    public void setTradeDBServicesList(List tradeDBList) {
+        if (Log.doTrace())
+            Log.trace("TradeServicesManagerImpl:setTradeDBServicesList()" , tradeDBList);
+//        System.out.println("@JAB TradeServicesManagerImpl.setTradeDBServicesList() size
" + tradeDBList.size());
+        Iterator it = tradeDBList.iterator();
+        while (it.hasNext()) {  
+            TradeDBServices tradeDBServices =  (TradeDBServices) it.next(); 
+//            System.out.println("@JAB TradeServicesManagerImpl.setTradeDBServicesList adding
" + tradeDBServices);
+            this.tradeDBServicesList[tradeDBServices.getMode()] = tradeDBServices;
+        }  
     }
 
     /**
       * Set TradeServices reference
       */
-    public void setTradeServicesJPA(TradeServices tradeServicesJPA)
-    {
+    public void setTradeServices(TradeServices tradeServices) {
         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");
+            Log.trace("TradeServicesManagerImpl:setTradeServices()" , tradeServices);
+//        System.out.println("@JAB TradeServicesManagerImpl.setTradeServices adding " + tradeServices);
+        tradeServicesList[tradeServices.getMode()] = tradeServices;
     }
 
 
-    public TradeServices getTradeServices()
-    {
-//        System.out.println("@JAB TradeServicesManagerImpl.getTradeServices");
+    /**
+      * Get TradeServices reference
+      */
+    public TradeServices getTradeServices() {
         if (Log.doTrace()) 
             Log.trace("TradeServicesManagerImpl:getTradeServices()");
 //        System.out.println("@JAB TradeServicesManagerImpl.getTradeServices - returning
" + tradeServicesList[TradeConfig.runTimeMode]);
@@ -126,90 +141,90 @@
     /**
       * Set TradeDBServices reference
       */
-    public void setTradeDBServices(TradeDBServices tradeDBServices)
-    {
+    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");
+    }
+
+    /**
+      * Get TradeDBServices reference
+      */
+    public TradeDBServices getTradeDBServices() {
+        if (Log.doTrace())
+            Log.trace("TradeServicesManagerImpl:getTradeDBServices()");
+//        System.out.println("@JAB TradeServicesManagerImpl.getTradeDBServices - returning
" + tradeServicesList[TradeConfig.runTimeMode]);
+        return tradeDBServicesList[TradeConfig.runTimeMode];
+    }
+
+    /**
+      * Set TradeServicesJPA reference
+      */
+    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;
     }
 
     /**
       * Set TradeDBServicesJPA reference
       */
-    public void setTradeDBServicesJPA(TradeDBServices tradeDBServicesJPA)
-    {
+    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");
     }
 
 
-    public TradeDBServices getTradeDBServices()
-    {
-        if (Log.doTrace())
-            Log.trace("TradeServicesManagerImpl:getTradeDBServicesJPA()");
-//        System.out.println("@JAB TradeServicesManagerImpl.getTradeDBServices - returning
" + tradeServicesList[TradeConfig.runTimeMode]);
-        return tradeDBServicesList[TradeConfig.runTimeMode];
-    }
-
     /**
       * Bind a new TradeServices implementation
       */
-    public void bindService(TradeServices tradeServices, Map props)
-    {
+    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);
+//        System.out.println("@JAB TradeServicesManagerImpl.bindService adding " + tradeServices
+ " Properties " + props);
         if (tradeServices != null) {
             tradeServicesList[tradeServices.getMode()] = tradeServices;
         }
-//        System.out.println("@JAB TradeServicesManagerImpl.bindService added");
     }
 
     /**
       * Unbind a TradeServices implementation
       */
-    public void unbindService(TradeServices tradeServices, Map props)
-    {
+    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);
+//        System.out.println("@JAB TradeServicesManagerImpl.unbindService removing " + tradeServices
+ " Properties " + props);
         if (tradeServices != null) {
             tradeServicesList[tradeServices.getMode()] = null;
         }
-//        System.out.println("@JAB TradeServicesManagerImpl.unbindService removed ");
     }
 
     /**
       * Bind a new TradeDBServices implementation
       */
-    public void bindDBService(TradeDBServices tradeDBServices, Map props)
-    {
+    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);
+//        System.out.println("@JAB TradeServicesManagerImpl.bindDBService adding " + tradeDBServices
+ " Properties " + props);
         if (tradeDBServices != null) {
             tradeDBServicesList[tradeDBServices.getMode()] = tradeDBServices;
         }
-//        System.out.println("@JAB TradeServicesManagerImpl.bindDBService added");
     }
 
     /**
       * Unbind a TradeDBServices implementation
       */
-    public void unbindDBService(TradeServices tradeDBServices, Map props)
-    {
+    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);
+//        System.out.println("@JAB TradeServicesManagerImpl.unbindDBService removing " +
tradeDBServices + " Properties " + props);
         if (tradeDBServices != null) {
             tradeDBServicesList[tradeDBServices.getMode()] = null;
         }
-//        System.out.println("@JAB TradeServicesManagerImpl.unbindDBService removed");
     }
 
     /**

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=825388&r1=825387&r2=825388&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
Thu Oct 15 04:36:37 2009
@@ -1953,6 +1953,7 @@
     private static boolean initialized = false;
 
     public static synchronized void init() {
+//        System.out.println("@JAB TradeJDBCDirect.init() ");
         if (initialized)
             return;
         if (Log.doTrace())

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=825388&r1=825387&r2=825388&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
Thu Oct 15 04:36:37 2009
@@ -1,8 +1,8 @@
 <blueprint>
 
   <bean id="tradeServicesManagerBean" class="org.apache.geronimo.samples.daytrader.core.TradeServicesManagerImpl"
activation="lazy" init-method="init">
-      <!--<property name="tradeServices" ref="tradeServicesList"/>-->
-      <!--<property name="tradeDBServices" ref="tradeDBServicesList"/>-->
+      <!--<property name="tradeServicesList" ref="tradeServicesList"/>-->
+      <!--<property name="tradeDBServicesList" ref="tradeDBServicesList"/>-->
       <property name="tradeServices" ref="tradeServicesRefJDBC"/>
       <property name="tradeDBServices" ref="tradeDBServicesRefJDBC"/>
       <property name="tradeServicesJPA" ref="tradeServicesRefJPA"/>



Mime
View raw message