geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jb...@apache.org
Subject svn commit: r832559 - /geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJPADirect.java
Date Tue, 03 Nov 2009 21:14:35 GMT
Author: jbohn
Date: Tue Nov  3 21:14:33 2009
New Revision: 832559

URL: http://svn.apache.org/viewvc?rev=832559&view=rev
Log:
updated TradeJPADirect for container managed entity managers

Modified:
    geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJPADirect.java

Modified: geronimo/sandbox/jbohn/daytrader-bp/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/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJPADirect.java?rev=832559&r1=832558&r2=832559&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJPADirect.java
(original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/core/src/main/java/org/apache/geronimo/samples/daytrader/core/direct/TradeJPADirect.java
Tue Nov  3 21:14:33 2009
@@ -23,9 +23,7 @@
 import java.util.Iterator;
 
 import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.Persistence;
-import javax.persistence.PersistenceUnit;
+import javax.persistence.PersistenceContext;
 import javax.persistence.Query;
 
 import org.apache.geronimo.samples.daytrader.beans.AccountDataBean;
@@ -58,13 +56,17 @@
 
 public class TradeJPADirect implements TradeServices, TradeDBServices {
 
-    @PersistenceUnit(unitName="daytrader")
-    private static EntityManagerFactory emf;
+    private EntityManager entityManager;
 
     private static BigDecimal ZERO = new BigDecimal(0.0);
 
     private static boolean initialized = false;
 
+    @PersistenceContext(unitName="daytrader")
+    public void setEntityManager (EntityManager em) { 
+        entityManager = em;
+    }
+
     /**
      * Zero arg constructor for TradeJPADirect
      */
@@ -103,11 +105,6 @@
     public MarketSummaryDataBean getMarketSummary() {
         MarketSummaryDataBean marketSummaryData;
 
-        /*
-         * Creating entiManager
-         */
-        EntityManager entityManager = emf.createEntityManager();
-
         try {
             if (Log.doTrace())
                 Log.trace("TradeJPADirect:getMarketSummary -- getting market summary");
@@ -155,10 +152,6 @@
             Log.error("TradeJPADirect:getMarketSummary", e);
             throw new RuntimeException("TradeJPADirect:getMarketSummary -- error ", e);
         }
-        /*
-         * closing entitymanager
-         */
-        entityManager.close();
 
         return marketSummaryData;
     }
@@ -166,27 +159,19 @@
     public OrderDataBean buy(String userID, String symbol, double quantity, int orderProcessingMode)
{
         OrderDataBean order = null;
         BigDecimal total;
-        /*
-         * creating entitymanager
-         */
-        EntityManager entityManager = emf.createEntityManager();
 
         try {
             if (Log.doTrace())
                 Log.trace("TradeJPADirect:buy", userID, symbol, quantity, orderProcessingMode);
 
-            entityManager.getTransaction().begin();
-
-            AccountProfileDataBean profile = entityManager.find(
-                                                               AccountProfileDataBean.class,
userID);
+            AccountProfileDataBean profile = entityManager.find(AccountProfileDataBean.class,
userID);
             AccountDataBean account = profile.getAccount();
 
-            QuoteDataBean quote = entityManager.find(QuoteDataBean.class,
-                                                     symbol);
+            QuoteDataBean quote = entityManager.find(QuoteDataBean.class, symbol);
 
             HoldingDataBean holding = null; // The holding will be created by this buy order
 
-            order = createOrder(account, quote, holding, "buy", quantity, entityManager);
+            order = createOrder(account, quote, holding, "buy", quantity);
 
             // order = createOrder(account, quote, holding, "buy", quantity);
             // UPDATE - account should be credited during completeOrder
@@ -197,9 +182,6 @@
             total = (new BigDecimal(quantity).multiply(price)).add(orderFee);
             account.setBalance(balance.subtract(total));
 
-            // commit the transaction before calling completeOrder
-            entityManager.getTransaction().commit();
-
             if (orderProcessingMode == TradeConfig.SYNCH)
                 completeOrder(order.getOrderID(), false);
             else if (orderProcessingMode == TradeConfig.ASYNCH_2PHASE)
@@ -212,15 +194,8 @@
             if (order != null)
                 order.cancel();
 
-            entityManager.getTransaction().rollback();
-
-            // throw new EJBException(e);
             throw new RuntimeException(e);
         }
-        if (entityManager != null) {
-            entityManager.close();
-            entityManager = null;
-        }
 
         // after the purchase or sell of a stock, update the stocks volume and
         // price
@@ -231,21 +206,17 @@
 
     public OrderDataBean sell(String userID, Integer holdingID,
                               int orderProcessingMode) {
-        EntityManager entityManager = emf.createEntityManager();
 
         OrderDataBean order = null;
         BigDecimal total;
         try {
-            entityManager.getTransaction().begin();
             if (Log.doTrace())
                 Log.trace("TradeJPADirect:sell", userID, holdingID, orderProcessingMode);
 
-            AccountProfileDataBean profile = entityManager.find(
-                                                               AccountProfileDataBean.class,
userID);
+            AccountProfileDataBean profile = entityManager.find(AccountProfileDataBean.class,
userID);
 
             AccountDataBean account = profile.getAccount();
-            HoldingDataBean holding = entityManager.find(HoldingDataBean.class,
-                                                         holdingID);
+            HoldingDataBean holding = entityManager.find(HoldingDataBean.class, holdingID);
 
             if (holding == null) {
                 Log.error("TradeJPADirect:sell User " + userID
@@ -257,20 +228,13 @@
 
                 entityManager.persist(orderData);
 
-                if (entityManager != null) {
-                    entityManager.close();
-                    entityManager = null;
-
-                }
-                entityManager.getTransaction().commit();
                 return orderData;
             }
 
             QuoteDataBean quote = holding.getQuote();
             double quantity = holding.getQuantity();
 
-            order = createOrder(account, quote, holding, "sell", quantity,
-                                entityManager);
+            order = createOrder(account, quote, holding, "sell", quantity);
             // UPDATE the holding purchase data to signify this holding is
             // "inflight" to be sold
             // -- could add a new holdingStatus attribute to holdingEJB
@@ -284,9 +248,6 @@
 
             account.setBalance(balance.add(total));
 
-            // commit the transaction before calling completeOrder
-            entityManager.getTransaction().commit();
-
             if (orderProcessingMode == TradeConfig.SYNCH)
                 completeOrder(order.getOrderID(), false);
             else if (orderProcessingMode == TradeConfig.ASYNCH_2PHASE)
@@ -299,16 +260,9 @@
             if (order != null)
                 order.cancel();
 
-            entityManager.getTransaction().rollback();
-
             throw new RuntimeException("TradeJPADirect:sell(" + userID + "," + holdingID
+ ")", e);
         }
 
-        if (entityManager != null) {
-            entityManager.close();
-            entityManager = null;
-        }
-
         if (!(order.getOrderStatus().equalsIgnoreCase("cancelled")))
             //after the purchase or sell of a stock, update the stocks volume and price
             updateQuotePriceVolume(order.getSymbol(), TradeConfig.getRandomPriceChangeFactor(),
order.getQuantity());
@@ -325,7 +279,7 @@
 
     public OrderDataBean completeOrder(Integer orderID, boolean twoPhase)
     throws Exception {
-        EntityManager entityManager = emf.createEntityManager();
+
         OrderDataBean order = null;
 
         if (Log.doTrace())
@@ -364,12 +318,10 @@
              * deduct the Order cost from the Account balance
              */
 
-            newHolding = createHolding(account, quote, quantity, price, entityManager);
+            newHolding = createHolding(account, quote, quantity, price);
         }
 
         try {
-            entityManager.getTransaction().begin();
-
             if (newHolding != null) {
                 order.setHolding(newHolding);
             }
@@ -382,7 +334,6 @@
                 if (holding == null) {
                     Log.error("TradeJPADirect:completeOrder -- Unable to sell order " + order.getOrderID()
+ " holding already sold");
                     order.cancel();
-                    entityManager.getTransaction().commit();
                     return order;
                 }
                 else {
@@ -401,42 +352,21 @@
                           + "\n\t Account info: " + account + "\n\t Quote info: "
                           + quote + "\n\t Holding info: " + holding);
 
-            entityManager.getTransaction().commit();
         }
         catch (Exception e) {
             e.printStackTrace();
-            entityManager.getTransaction().rollback();
-        }
-
-        if (entityManager != null) {
-            entityManager.close();
-            entityManager = null;
         }
 
         return order;
     }
 
     public void cancelOrder(Integer orderID, boolean twoPhase) {
-        EntityManager entityManager = emf.createEntityManager();
 
         if (Log.doTrace())
             Log.trace("TradeJPADirect:cancelOrder", orderID + " twoPhase=" + twoPhase);
 
         OrderDataBean order = entityManager.find(OrderDataBean.class, orderID);
-        /*
-         * managed transaction
-         */
-        try {
-            entityManager.getTransaction().begin();
-            order.cancel();
-            entityManager.getTransaction().commit();
-        }
-        catch (Exception e) {
-            entityManager.getTransaction().rollback();
-            entityManager.close();
-            entityManager = null;
-        }
-        entityManager.close();
+        order.cancel();
     }
 
     public void orderCompleted(String userID, Integer orderID) {
@@ -449,11 +379,8 @@
     public Collection<OrderDataBean> getOrders(String userID) {
         if (Log.doTrace())
             Log.trace("TradeJPADirect:getOrders", userID);
-        EntityManager entityManager = emf.createEntityManager();
-        AccountProfileDataBean profile = entityManager.find(
-                                                           AccountProfileDataBean.class,
userID);
+        AccountProfileDataBean profile = entityManager.find(AccountProfileDataBean.class,
userID);
         AccountDataBean account = profile.getAccount();
-        entityManager.close();
         return account.getOrders();
     }
 
@@ -461,24 +388,16 @@
 
         if (Log.doTrace())
             Log.trace("TradeJPADirect:getClosedOrders", userID);
-        EntityManager entityManager = emf.createEntityManager();
 
         try {
 
             // Get the primary keys for all the closed Orders for this
             // account.
-            /*
-             * managed transaction
-             */
-            entityManager.getTransaction().begin();
-            Query query = entityManager
-                          .createNamedQuery("orderejb.closedOrders");
+            Query query = entityManager.createNamedQuery("orderejb.closedOrders");
             query.setParameter("userID", userID);
 
-            entityManager.getTransaction().commit();
             Collection results = query.getResultList();
             Iterator itr = results.iterator();
-            // entityManager.joinTransaction();
             // Spin through the orders to populate the lazy quote fields
             while (itr.hasNext()) {
                 OrderDataBean thisOrder = (OrderDataBean) itr.next();
@@ -486,23 +405,10 @@
             }
 
             if (TradeConfig.jpaLayer == TradeConfig.OPENJPA) {
-                Query updateStatus = entityManager
-                                     .createNamedQuery("orderejb.completeClosedOrders");
-                /*
-                 * managed transaction
-                 */
-                try {
-                    entityManager.getTransaction().begin();
-                    updateStatus.setParameter("userID", userID);
+                Query updateStatus = entityManager.createNamedQuery("orderejb.completeClosedOrders");
+                updateStatus.setParameter("userID", userID);
 
-                    updateStatus.executeUpdate();
-                    entityManager.getTransaction().commit();
-                }
-                catch (Exception e) {
-                    entityManager.getTransaction().rollback();
-                    entityManager.close();
-                    entityManager = null;
-                }
+                updateStatus.executeUpdate();
             }
             else if (TradeConfig.jpaLayer == TradeConfig.HIBERNATE) {
                 /*
@@ -511,8 +417,7 @@
                  * with annotated query "orderejb.completeClosedOrders" defined
                  * in OrderDatabean
                  */
-                Query findaccountid = entityManager
-                                      .createNativeQuery(
+                Query findaccountid = entityManager.createNativeQuery(
                                                         "select "
                                                         + "a.ACCOUNTID, "
                                                         + "a.LOGINCOUNT, "
@@ -532,16 +437,10 @@
                 updateStatus.setParameter(1, accountid.intValue());
                 updateStatus.executeUpdate();
             }
-            if (entityManager != null) {
-                entityManager.close();
-                entityManager = null;
-            }
             return results;
         }
         catch (Exception e) {
             Log.error("TradeJPADirect.getClosedOrders", e);
-            entityManager.close();
-            entityManager = null;
             throw new RuntimeException(
                                       "TradeJPADirect.getClosedOrders - error", e);
 
@@ -549,38 +448,20 @@
 
     }
 
-    public QuoteDataBean createQuote(String symbol, String companyName,
-                                     BigDecimal price) {
-        EntityManager entityManager = emf.createEntityManager();
+    public QuoteDataBean createQuote(String symbol, String companyName, BigDecimal price)
{
+
         try {
             QuoteDataBean quote = new QuoteDataBean(symbol, companyName, 0, price, price,
price, price, 0);
-            /*
-             * managed transaction
-             */
-            try {
-                entityManager.getTransaction().begin();
-                entityManager.persist(quote);
-                entityManager.getTransaction().commit();
-            }
-            catch (Exception e) {
-                entityManager.getTransaction().rollback();
-            }
+            entityManager.persist(quote);
 
             if (Log.doTrace())
                 Log.trace("TradeJPADirect:createQuote-->" + quote);
 
-            if (entityManager != null) {
-                entityManager.close();
-                entityManager = null;
-            }
             return quote;
         }
         catch (Exception e) {
             Log.error("TradeJPADirect:createQuote -- exception creating Quote", e);
-            System.out
-            .println("TradeJPADirect:createQuote -- exception creating Quote");
-            entityManager.close();
-            entityManager = null;
+            System.out.println("TradeJPADirect:createQuote -- exception creating Quote");
             throw new RuntimeException(e);
         }
     }
@@ -588,29 +469,18 @@
     public QuoteDataBean getQuote(String symbol) {
         if (Log.doTrace())
             Log.trace("TradeJPADirect:getQuote", symbol);
-        EntityManager entityManager = emf.createEntityManager();
 
         QuoteDataBean qdb = entityManager.find(QuoteDataBean.class, symbol);
 
-        if (entityManager != null) {
-            entityManager.close();
-            entityManager = null;
-        }
         return qdb;
     }
 
     public Collection<QuoteDataBean> getAllQuotes() {
         if (Log.doTrace())
             Log.trace("TradeJPADirect:getAllQuotes");
-        EntityManager entityManager = emf.createEntityManager();
 
         Query query = entityManager.createNamedQuery("quoteejb.allQuotes");
 
-        if (entityManager != null) {
-            entityManager.close();
-            entityManager = null;
-
-        }
         return query.getResultList();
     }
 
@@ -627,7 +497,6 @@
          * DB2Dialect and MySQL5Dialect do not work with annotated query
          * "quoteejb.quoteForUpdate" defined in QuoteDatabean
          */
-        EntityManager entityManager = emf.createEntityManager();
         QuoteDataBean quote = null;
         if (TradeConfig.jpaLayer == TradeConfig.HIBERNATE) {
             quote = entityManager.find(QuoteDataBean.class, symbol);
@@ -647,28 +516,11 @@
 
         BigDecimal newPrice = changeFactor.multiply(oldPrice).setScale(2, BigDecimal.ROUND_HALF_UP);
 
-        /*
-         * managed transaction
-         */
-
-        try {
-
-            quote.setPrice(newPrice);
-            quote.setVolume(quote.getVolume() + sharesTraded);
-            quote.setChange((newPrice.subtract(quote.getOpen()).doubleValue()));
-
-            entityManager.getTransaction().begin();
-            entityManager.merge(quote);
-            entityManager.getTransaction().commit();
-        }
-        catch (Exception e) {
-            entityManager.getTransaction().rollback();
-        }
+        quote.setPrice(newPrice);
+        quote.setVolume(quote.getVolume() + sharesTraded);
+        quote.setChange((newPrice.subtract(quote.getOpen()).doubleValue()));
 
-        if (entityManager != null) {
-            entityManager.close();
-            entityManager = null;
-        }
+        entityManager.merge(quote);
 
         this.publishQuotePriceChange(quote, oldPrice, changeFactor, sharesTraded);
 
@@ -678,16 +530,10 @@
     public Collection<HoldingDataBean> getHoldings(String userID) {
         if (Log.doTrace())
             Log.trace("TradeJPADirect:getHoldings", userID);
-        EntityManager entityManager = emf.createEntityManager();
-        /*
-         * managed transaction
-         */
-        entityManager.getTransaction().begin();
 
         Query query = entityManager.createNamedQuery("holdingejb.holdingsByUserID");
         query.setParameter("userID", userID);
 
-        entityManager.getTransaction().commit();
         Collection<HoldingDataBean> holdings = query.getResultList();
         /*
          * Inflate the lazy data memebers
@@ -697,15 +543,12 @@
             ((HoldingDataBean) itr.next()).getQuote();
         }
 
-        entityManager.close();
-        entityManager = null;
         return holdings;
     }
 
     public HoldingDataBean getHolding(Integer holdingID) {
         if (Log.doTrace())
             Log.trace("TradeJPADirect:getHolding", holdingID);
-        EntityManager entityManager = emf.createEntityManager();
         return entityManager.find(HoldingDataBean.class, holdingID);
     }
 
@@ -713,8 +556,6 @@
         if (Log.doTrace())
             Log.trace("TradeJPADirect:getAccountData", userID);
 
-        EntityManager entityManager = emf.createEntityManager();
-
         AccountProfileDataBean profile = entityManager.find(AccountProfileDataBean.class,
userID);
         /*
          * Inflate the lazy data memebers
@@ -724,8 +565,6 @@
 
         // Added to populate transient field for account
         account.setProfileID(profile.getUserID());
-        entityManager.close();
-        entityManager = null;
 
         return account;
     }
@@ -733,17 +572,13 @@
     public AccountProfileDataBean getAccountProfileData(String userID) {
         if (Log.doTrace())
             Log.trace("TradeJPADirect:getProfileData", userID);
-        EntityManager entityManager = emf.createEntityManager();
 
         AccountProfileDataBean apb = entityManager.find(AccountProfileDataBean.class, userID);
-        entityManager.close();
-        entityManager = null;
         return apb;
     }
 
     public AccountProfileDataBean updateAccountProfile(AccountProfileDataBean profileData)
{
 
-        EntityManager entityManager = emf.createEntityManager();
 
         if (Log.doTrace())
             Log.trace("TradeJPADirect:updateAccountProfileData", profileData);
@@ -767,21 +602,7 @@
         temp.setFullName(profileData.getFullName());
         temp.setCreditCard(profileData.getCreditCard());
         temp.setEmail(profileData.getEmail());
-        /*
-         * Managed Transaction
-         */
-        try {
-
-            entityManager.getTransaction().begin();
-            entityManager.merge(temp);
-            entityManager.getTransaction().commit();
-            entityManager.close();
-        }
-        catch (Exception e) {
-            entityManager.getTransaction().rollback();
-            entityManager.close();
-            entityManager = null;
-        }
+        entityManager.merge(temp);
 
         return temp;
     }
@@ -789,17 +610,11 @@
     public AccountDataBean login(String userID, String password)
     throws Exception {
 
-        EntityManager entityManager = emf.createEntityManager();
-
         AccountProfileDataBean profile = entityManager.find(AccountProfileDataBean.class,
userID);
 
         if (profile == null) {
             throw new RuntimeException("No such user: " + userID);
         }
-        /*
-         * Managed Transaction
-         */
-        entityManager.getTransaction().begin();
         entityManager.merge(profile);
 
         AccountDataBean account = profile.getAccount();
@@ -808,35 +623,19 @@
             Log.trace("TradeJPADirect:login", userID, password);
 
         account.login(password);
-        entityManager.getTransaction().commit();
         if (Log.doTrace())
             Log.trace("TradeJPADirect:login(" + userID + "," + password + ") success" + account);
-        entityManager.close();
         return account;
     }
 
     public void logout(String userID) {
         if (Log.doTrace())
             Log.trace("TradeJPADirect:logout", userID);
-        EntityManager entityManager = emf.createEntityManager();
 
         AccountProfileDataBean profile = entityManager.find(AccountProfileDataBean.class,
userID);
         AccountDataBean account = profile.getAccount();
 
-        /*
-         * Managed Transaction
-         */
-        try {
-            entityManager.getTransaction().begin();
-            account.logout();
-            entityManager.getTransaction().commit();
-            entityManager.close();
-        }
-        catch (Exception e) {
-            entityManager.getTransaction().rollback();
-            entityManager.close();
-            entityManager = null;
-        }
+        account.logout();
 
         if (Log.doTrace())
             Log.trace("TradeJPADirect:logout(" + userID + ") success");
@@ -847,7 +646,6 @@
                                     BigDecimal openBalance) {
         AccountDataBean account = null;
         AccountProfileDataBean profile = null;
-        EntityManager entityManager = emf.createEntityManager();
 
         if (Log.doTrace())
             Log.trace("TradeJPADirect:register", userID, password, fullname, address, email,
creditcard, openBalance);
@@ -866,32 +664,18 @@
             account = new AccountDataBean(0, 0, null, new Timestamp(System.currentTimeMillis()),
openBalance, openBalance, userID);
             profile.setAccount(account);
             account.setProfile(profile);
-            /*
-             * managed Transaction
-             */
-            try {
-                entityManager.getTransaction().begin();
-                entityManager.persist(profile);
-                entityManager.persist(account);
-                entityManager.getTransaction().commit();
-            }
-            catch (Exception e) {
-                entityManager.getTransaction().rollback();
-                entityManager.close();
-                entityManager = null;
-            }
-
+            entityManager.persist(profile);
+            entityManager.persist(account);
         }
 
         return account;
     }
 
-    // @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
     public RunStatsDataBean resetTrade(boolean deleteAll) throws Exception {
         if (Log.doTrace())
             Log.trace("TradeJPADirect:resetTrade", deleteAll);
 
-        return(new TradeJDBCDirect(false)).resetTrade(deleteAll);
+        return(new TradeJDBCDirect(true)).resetTrade(deleteAll);
     }
 
     /*
@@ -906,12 +690,9 @@
         throw new UnsupportedOperationException("TradeJPADirect:publishQuotePriceChange -
is not implemented for this runtime mode");
     }
 
-    /*
-     * new Method() that takes EntityManager as a parameter
-     */
     private OrderDataBean createOrder(AccountDataBean account,
                                       QuoteDataBean quote, HoldingDataBean holding, String
orderType,
-                                      double quantity, EntityManager entityManager) {
+                                      double quantity) {
         OrderDataBean order;
         if (Log.doTrace())
             Log.trace("TradeJPADirect:createOrder(orderID=" + " account="
@@ -939,24 +720,11 @@
     }
 
     private HoldingDataBean createHolding(AccountDataBean account,
-                                          QuoteDataBean quote, double quantity, BigDecimal
purchasePrice,
-                                          EntityManager entityManager) throws Exception {
+                                          QuoteDataBean quote, double quantity, BigDecimal
purchasePrice) throws Exception {
         HoldingDataBean newHolding = new HoldingDataBean(quantity,
                                                          purchasePrice, new Timestamp(System.currentTimeMillis()),
                                                          account, quote);
-        try {
-            /*
-             * manage transactions
-             */
-            entityManager.getTransaction().begin();
-            entityManager.persist(newHolding);
-            entityManager.getTransaction().commit();
-        }
-        catch (Exception e) {
-            entityManager.getTransaction().rollback();
-            entityManager.close();
-            entityManager = null;
-        }
+        entityManager.persist(newHolding);
         return newHolding;
     }
 
@@ -990,7 +758,7 @@
     public String checkDBProductName() throws Exception {
         if (Log.doTrace())
             Log.trace("TradeJPADirect:checkDBProductName");
-        return(new TradeJDBCDirect(false)).checkDBProductName();
+        return(new TradeJDBCDirect(true)).checkDBProductName();
     }
 
     /**
@@ -1000,7 +768,7 @@
     throws Exception {
         if (Log.doTrace())
             Log.trace("TradeJPADirect:checkDBProductName");
-        return(new TradeJDBCDirect(false)).recreateDBTables(sqlBuffer, out);
+        return(new TradeJDBCDirect(true)).recreateDBTables(sqlBuffer, out);
     }
 
     /**



Mime
View raw message