geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jb...@apache.org
Subject svn commit: r889741 - in /geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules: core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/ entities/src/main/resources/META-INF/
Date Fri, 11 Dec 2009 18:19:22 GMT
Author: jbohn
Date: Fri Dec 11 18:19:22 2009
New Revision: 889741

URL: http://svn.apache.org/viewvc?rev=889741&view=rev
Log:
get this working again and a little clean-up

Modified:
    geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJDBCDirect.java
    geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJPADirect.java
    geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules/entities/src/main/resources/META-INF/persistence.xml

Modified: geronimo/sandbox/jbohn/daytrader-bp-AppEM/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-AppEM/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJDBCDirect.java?rev=889741&r1=889740&r2=889741&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJDBCDirect.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJDBCDirect.java
Fri Dec 11 18:19:22 2009
@@ -72,13 +72,9 @@
      * Zero arg constructor for TradeJDBCDirect
      */
     public TradeJDBCDirect() {
-//      if (initialized == false)
-//          init();
     }
 
     public TradeJDBCDirect(boolean inSession) {
-//      if (initialized == false)
-//          init();
 
         this.inSession = inSession;
     }
@@ -1958,15 +1954,6 @@
             return;
         if (Log.doTrace())
             Log.trace("TradeJDBCDirect:init -- *** initializing");
-//      try {
-//          if (Log.doTrace())
-//              Log.trace("TradeJDBCDirect: init");
-//          context = new InitialContext();
-//          datasource = (DataSource) context.lookup(dsName);
-//      } catch (Exception e) {
-//          Log.error("TradeJDBCDirect:init -- error on JNDI lookups of DataSource -- TradeJDBCDirect
will not work", e);
-//          return;
-//      }
 
         TradeConfig.setPublishQuotePriceChange(false);
 

Modified: geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJPADirect.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJPADirect.java?rev=889741&r1=889740&r2=889741&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJPADirect.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJPADirect.java
Fri Dec 11 18:19:22 2009
@@ -74,6 +74,10 @@
             init();
     }
 
+    public void setEmf (EntityManagerFactory em) { 
+        emf = em;
+    }
+
     public static synchronized void init() {
         if (initialized)
             return;
@@ -577,8 +581,6 @@
         }
         catch (Exception e) {
             Log.error("TradeJPADirect:createQuote -- exception creating Quote", e);
-            System.out
-            .println("TradeJPADirect:createQuote -- exception creating Quote");
             entityManager.close();
             entityManager = null;
             throw new RuntimeException(e);

Modified: geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules/entities/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules/entities/src/main/resources/META-INF/persistence.xml?rev=889741&r1=889740&r2=889741&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules/entities/src/main/resources/META-INF/persistence.xml
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp-AppEM/modules/entities/src/main/resources/META-INF/persistence.xml
Fri Dec 11 18:19:22 2009
@@ -30,7 +30,6 @@
         <exclude-unlisted-classes>true</exclude-unlisted-classes>
        
         <properties>
-            <property name="openjpa.jdbc.DBDictionary" value="derby" />
             <property name="openjpa.BrokerImpl" value="non-finalizing" /> 
             <property name="openjpa.Sequence" value="table(Table=OPENJPASEQ, Increment=100)"/>
             <property name="openjpa.jdbc.UpdateManager" value="org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager"/>
@@ -39,6 +38,7 @@
         
         <!-- 
         <properties>
+        <property name="openjpa.jdbc.DBDictionary" value="derby" />
         <property name="openjpa.ConnectionProperties" value="DriverClassName=com.ibm.db2.jcc.DB2Driver,URL=jdbc:db2://9.12.24.171:50000/TRADE61,MaxActive=50,MaxWait=10000,Username=db2inst1,Password=db2inst1"/>
         <property name="openjpa.ConnectionDriverName" value="org.apache.commons.dbcp.BasicDataSource"/>
         <property name="openjpa.jdbc.DBDictionary" value="db2(batchLimit=600)"/>



Mime
View raw message