geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jb...@apache.org
Subject svn commit: r888065 - in /geronimo/sandbox/jbohn/daytrader-bp-new/modules: core/src/main/java/org/apache/geronimo/samples/daytrader/core/ core/src/main/java/org/apache/geronimo/samples/daytrader/core/spi/ core/src/main/resources/OSGI-INF/blueprint/ per...
Date Mon, 07 Dec 2009 18:16:55 GMT
Author: jbohn
Date: Mon Dec  7 18:16:54 2009
New Revision: 888065

URL: http://svn.apache.org/viewvc?rev=888065&view=rev
Log:
use reference-list rather than direct references and remove some static references

Modified:
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeDBManagerImpl.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManagerImpl.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/spi/TradeServicesManager.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jdbc/src/main/java/org/apache/geronimo/samples/daytrader/persist/jdbc/TradeJDBCDirect.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jdbc/src/main/resources/OSGI-INF/blueprint/blueprint.xml
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jpa/src/main/java/org/apache/geronimo/samples/daytrader/persist/jpa/TradeJPADirect.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jpa/src/main/resources/OSGI-INF/blueprint/blueprint.xml

Modified: geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeDBManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeDBManagerImpl.java?rev=888065&r1=888064&r2=888065&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeDBManagerImpl.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeDBManagerImpl.java
Mon Dec  7 18:16:54 2009
@@ -428,21 +428,19 @@
     }
 
 
-    public static void init() {
+    public void init() {
         if (initialized)
             return;
         if (Log.doTrace())
             Log.trace("TradeDBManagerImpl:init -- *** initializing");
 
-        TradeConfig.setPublishQuotePriceChange(false);
-
         if (Log.doTrace())
             Log.trace("TradeDBManagerImpl:init -- +++ initialized");
 
         initialized = true;
     }
 
-    public static void destroy() {
+    public void destroy() {
         try {
             Log.trace("TradeDBManagerImpl:destroy");
             if (!initialized)

Modified: geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManagerImpl.java?rev=888065&r1=888064&r2=888065&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManagerImpl.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManagerImpl.java
Mon Dec  7 18:16:54 2009
@@ -104,16 +104,6 @@
     }
 
     /**
-      * Set TradeServices reference
-      */
-    public void setTradeServices(TradeServices tradeServices) {
-        if (Log.doTrace())
-            Log.trace("TradeServicesManagerImpl:setTradeServices()" , tradeServices);
-        tradeServicesList[tradeServices.getMode()] = tradeServices;
-    }
-
-
-    /**
       * Get TradeServices reference
       */
     public TradeServices getTradeServices() {
@@ -123,15 +113,6 @@
     }
 
     /**
-      * Set TradeServicesJPA reference
-      */
-    public void setTradeServicesJPA(TradeServices tradeServicesJPA) {
-        if (Log.doTrace())
-            Log.trace("TradeServicesManagerImpl:setTradeServicesJPA()" , tradeServicesJPA);
-        tradeServicesList[tradeServicesJPA.getMode()] = tradeServicesJPA;
-    }
-
-    /**
       * Bind a new TradeServices implementation
       */
     public void bindService(TradeServices tradeServices, Map props) {

Modified: geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/spi/TradeServicesManager.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/spi/TradeServicesManager.java?rev=888065&r1=888064&r2=888065&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/spi/TradeServicesManager.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/spi/TradeServicesManager.java
Mon Dec  7 18:16:54 2009
@@ -38,15 +38,10 @@
       */
     public void setTradeServicesList(List tradeList);
 
-    /**
-      * Set TradeServices reference
-      */
-    public void setTradeServices(TradeServices tradeServices);
 
     /**
       * Get the currently selected TradeServices
       */
-
     public TradeServices getTradeServices();
 
     /**

Modified: geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=888065&r1=888064&r2=888065&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml
Mon Dec  7 18:16:54 2009
@@ -1,34 +1,24 @@
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+<blueprint  default-activation="lazy" 
+            xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0">
 
-  <bean id="tradeServicesManagerBean" class="org.apache.geronimo.samples.daytrader.core.TradeServicesManagerImpl"
activation="lazy" init-method="init">
-      <!--<property name="tradeServicesList" ref="tradeServicesList"/>-->
-      <property name="tradeServices" ref="tradeServicesRefJDBC"/>
-      <property name="tradeServicesJPA" ref="tradeServicesRefJPA"/>
+  <bean id="tradeServicesManagerBean" class="org.apache.geronimo.samples.daytrader.core.TradeServicesManagerImpl"
init-method="init">
+      <property name="tradeServicesList" ref="tradeServicesList"/>
   </bean>
 
   <service id="TradeServicesManager" ref="tradeServicesManagerBean" interface="org.apache.geronimo.samples.daytrader.core.spi.TradeServicesManager"/>
   
-  <bean id="tradeDBManagerBean" class="org.apache.geronimo.samples.daytrader.core.TradeDBManagerImpl"
activation="lazy" init-method="init">
+  <bean id="tradeDBManagerBean" class="org.apache.geronimo.samples.daytrader.core.TradeDBManagerImpl"
init-method="init">
   </bean>
 
   <service id="TradeDBManager" ref="tradeDBManagerBean" interface="org.apache.geronimo.samples.daytrader.core.spi.TradeDBManager">
   </service>
 
-  <reference id="tradeServicesRefJDBC" availability="optional" interface="org.apache.geronimo.samples.daytrader.core.spi.TradeServices"
filter="(mode=jdbc)">
-    <reference-listener ref="tradeServicesManagerBean" bind-method="bindService" unbind-method="unbindService"/>
-  </reference>
-
-  <reference id="tradeServicesRefJPA" availability="optional" interface="org.apache.geronimo.samples.daytrader.core.spi.TradeServices"
filter="(mode=jpa)">
-    <reference-listener ref="tradeServicesManagerBean" bind-method="bindService" unbind-method="unbindService"/>
-  </reference>
-
-<!--
-  <ref-list id="tradeServicesList" availability="optional" interface="org.apache.geronimo.samples.daytrader.core.spi.TradeServices">
+  <reference-list id="tradeServicesList" availability="optional" interface="org.apache.geronimo.samples.daytrader.core.spi.TradeServices">
       <reference-listener ref="tradeServicesManagerBean" bind-method="bindService" unbind-method="unbindService"
/>
-  </ref-list>
--->
+  </reference-list>
+
 
 </blueprint>
 

Modified: geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jdbc/src/main/java/org/apache/geronimo/samples/daytrader/persist/jdbc/TradeJDBCDirect.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jdbc/src/main/java/org/apache/geronimo/samples/daytrader/persist/jdbc/TradeJDBCDirect.java?rev=888065&r1=888064&r2=888065&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jdbc/src/main/java/org/apache/geronimo/samples/daytrader/persist/jdbc/TradeJDBCDirect.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jdbc/src/main/java/org/apache/geronimo/samples/daytrader/persist/jdbc/TradeJDBCDirect.java
Mon Dec  7 18:16:54 2009
@@ -1686,21 +1686,19 @@
     private static final String updateQuotePriceVolumeSQL =
         "update quoteejb set " + "price = ?, change1 = ? - open1, volume = ? " + "where symbol
= ?";
 
-    public static void init() {
+    public void init() {
         if (initialized)
             return;
         if (Log.doTrace())
             Log.trace("TradeJDBCDirect:init -- *** initializing");
 
-        TradeConfig.setPublishQuotePriceChange(false);
-
         if (Log.doTrace())
             Log.trace("TradeJDBCDirect:init -- +++ initialized");
 
         initialized = true;
     }
 
-    public static void destroy() {
+    public void destroy() {
         try {
             if (!initialized)
                 return;

Modified: geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jdbc/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jdbc/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=888065&r1=888064&r2=888065&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jdbc/src/main/resources/OSGI-INF/blueprint/blueprint.xml
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jdbc/src/main/resources/OSGI-INF/blueprint/blueprint.xml
Mon Dec  7 18:16:54 2009
@@ -1,8 +1,9 @@
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+<blueprint  default-activation="lazy" 
+            xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0">
 
-  <bean id="tradeServicesBeanJDBC" class="org.apache.geronimo.samples.daytrader.persist.jdbc.TradeJDBCDirect"
activation="lazy" init-method="init">
+  <bean id="tradeServicesBeanJDBC" class="org.apache.geronimo.samples.daytrader.persist.jdbc.TradeJDBCDirect"
init-method="init">
       <!--<property name="inSession" value="true"/>-->
   </bean>
 

Modified: geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jpa/src/main/java/org/apache/geronimo/samples/daytrader/persist/jpa/TradeJPADirect.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jpa/src/main/java/org/apache/geronimo/samples/daytrader/persist/jpa/TradeJPADirect.java?rev=888065&r1=888064&r2=888065&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jpa/src/main/java/org/apache/geronimo/samples/daytrader/persist/jpa/TradeJPADirect.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jpa/src/main/java/org/apache/geronimo/samples/daytrader/persist/jpa/TradeJPADirect.java
Mon Dec  7 18:16:54 2009
@@ -72,21 +72,19 @@
     public TradeJPADirect() {
     }
 
-    public static void init() {
+    public void init() {
         if (initialized)
             return;
         if (Log.doTrace())
             Log.trace("TradeJPADirect:init -- *** initializing");
 
-        TradeConfig.setPublishQuotePriceChange(false);
-
         if (Log.doTrace())
             Log.trace("TradeJPADirect:init -- +++ initialized");
 
         initialized = true;
     }
 
-    public static void destroy() {
+    public void destroy() {
         try {
             if (!initialized)
                 return;

Modified: geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jpa/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jpa/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=888065&r1=888064&r2=888065&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jpa/src/main/resources/OSGI-INF/blueprint/blueprint.xml
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/persist-jpa/src/main/resources/OSGI-INF/blueprint/blueprint.xml
Mon Dec  7 18:16:54 2009
@@ -1,8 +1,9 @@
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+<blueprint  default-activation="lazy" 
+            xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0">
 
-  <bean id="tradeServicesBeanJPA" class="org.apache.geronimo.samples.daytrader.persist.jpa.TradeJPADirect"
activation="lazy" init-method="init"> 
+  <bean id="tradeServicesBeanJPA" class="org.apache.geronimo.samples.daytrader.persist.jpa.TradeJPADirect"
init-method="init"> 
   </bean>
   
   <service id="tradeServicesJPA" ref="tradeServicesBeanJPA" interface="org.apache.geronimo.samples.daytrader.core.spi.TradeServices">



Mime
View raw message