You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2014/08/23 10:28:51 UTC

svn commit: r1619985 - in /ofbiz/branches/framework-api-cleanup/framework: entity/src/org/ofbiz/entity/jdbc/ entity/src/org/ofbiz/entity/transaction/ entity/src/org/ofbiz/entity/util/ geronimo/src/org/ofbiz/geronimo/ webapp/src/org/ofbiz/webapp/view/

Author: jacopoc
Date: Sat Aug 23 08:28:50 2014
New Revision: 1619985

URL: http://svn.apache.org/r1619985
Log:
Renamed the class org.ofbiz.entity.jdbc.ConnectionFactory into org.ofbiz.entity.jdbc.ConnectionFactoryLoader: this name better describes its purpose.

Added:
    ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/ConnectionFactoryLoader.java
      - copied, changed from r1619984, ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/ConnectionFactory.java
Removed:
    ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/ConnectionFactory.java
Modified:
    ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/SQLProcessor.java
    ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/DumbFactory.java
    ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/JNDIFactory.java
    ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java
    ofbiz/branches/framework-api-cleanup/framework/geronimo/src/org/ofbiz/geronimo/GeronimoTransactionFactory.java
    ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/DataVisionViewHandler.java
    ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsJXlsViewHandler.java
    ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPdfViewHandler.java
    ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPoiXlsViewHandler.java
    ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsXmlViewHandler.java

Copied: ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/ConnectionFactoryLoader.java (from r1619984, ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/ConnectionFactory.java)
URL: http://svn.apache.org/viewvc/ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/ConnectionFactoryLoader.java?p2=ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/ConnectionFactoryLoader.java&p1=ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/ConnectionFactory.java&r1=1619984&r2=1619985&rev=1619985&view=diff
==============================================================================
--- ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/ConnectionFactory.java (original)
+++ ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/ConnectionFactoryLoader.java Sat Aug 23 08:28:50 2014
@@ -23,12 +23,12 @@ import org.ofbiz.entity.config.model.Ent
 import org.ofbiz.entity.connection.ConnectionFactoryInterface;
 
 /**
- * ConnectionFactory - central source for JDBC connections
+ * ConnectionFactoryLoader - utility class that loads the connection manager and provides to client code a reference to it (ConnectionFactoryInterface)
  *
  */
-public class ConnectionFactory {
+public class ConnectionFactoryLoader {
     // Debug module name
-    public static final String module = ConnectionFactory.class.getName();
+    public static final String module = ConnectionFactoryLoader.class.getName();
     private static final ConnectionFactoryInterface connFactory = createConnectionFactoryInterface();
 
     private static ConnectionFactoryInterface createConnectionFactoryInterface() {

Modified: ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/SQLProcessor.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/SQLProcessor.java?rev=1619985&r1=1619984&r2=1619985&view=diff
==============================================================================
--- ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/SQLProcessor.java (original)
+++ ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/SQLProcessor.java Sat Aug 23 08:28:50 2014
@@ -243,7 +243,7 @@ public class SQLProcessor {
     }
 
     /**
-     * Get a connection from the ConnectionFactory
+     * Get a connection from the ConnectionFactoryLoader
      *
      * @return  The connection created
      *

Modified: ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/DumbFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/DumbFactory.java?rev=1619985&r1=1619984&r2=1619985&view=diff
==============================================================================
--- ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/DumbFactory.java (original)
+++ ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/DumbFactory.java Sat Aug 23 08:28:50 2014
@@ -37,7 +37,7 @@ import org.ofbiz.entity.GenericEntityExc
 import org.ofbiz.entity.config.model.Datasource;
 import org.ofbiz.entity.config.model.EntityConfig;
 import org.ofbiz.entity.datasource.GenericHelperInfo;
-import org.ofbiz.entity.jdbc.ConnectionFactory;
+import org.ofbiz.entity.jdbc.ConnectionFactoryLoader;
 
 /**
  * A dumb, non-working transaction manager.
@@ -111,7 +111,7 @@ public class DumbFactory implements Tran
         Datasource datasourceInfo = EntityConfig.getDatasource(helperInfo.getHelperBaseName());
 
         if (datasourceInfo.getInlineJdbc() != null) {
-            Connection otherCon = ConnectionFactory.getInstance().getConnection(helperInfo, datasourceInfo.getInlineJdbc());
+            Connection otherCon = ConnectionFactoryLoader.getInstance().getConnection(helperInfo, datasourceInfo.getInlineJdbc());
             return TransactionUtil.getCursorConnection(helperInfo, otherCon);
         } else {
             Debug.logError("Dumb/Empty is the configured transaction manager but no inline-jdbc element was specified in the " + helperInfo.getHelperBaseName() + " datasource. Please check your configuration", module);

Modified: ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/JNDIFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/JNDIFactory.java?rev=1619985&r1=1619984&r2=1619985&view=diff
==============================================================================
--- ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/JNDIFactory.java (original)
+++ ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/JNDIFactory.java Sat Aug 23 08:28:50 2014
@@ -39,7 +39,7 @@ import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.config.model.*;
 import org.ofbiz.entity.datasource.GenericHelperInfo;
-import org.ofbiz.entity.jdbc.ConnectionFactory;
+import org.ofbiz.entity.jdbc.ConnectionFactoryLoader;
 
 /**
  * Central source for Tyrex JTA objects from JNDI
@@ -145,7 +145,7 @@ public class JNDIFactory implements Tran
         }
 
         if (datasourceInfo.getInlineJdbc() != null) {
-            Connection otherCon = ConnectionFactory.getInstance().getConnection(helperInfo, datasourceInfo.getInlineJdbc());
+            Connection otherCon = ConnectionFactoryLoader.getInstance().getConnection(helperInfo, datasourceInfo.getInlineJdbc());
             return TransactionUtil.getCursorConnection(helperInfo, otherCon);
         } else {
             //no real need to print an error here

Modified: ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java?rev=1619985&r1=1619984&r2=1619985&view=diff
==============================================================================
--- ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java (original)
+++ ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java Sat Aug 23 08:28:50 2014
@@ -32,7 +32,6 @@ import org.ofbiz.base.util.UtilPropertie
 import org.ofbiz.entity.GenericDelegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.datasource.GenericHelperInfo;
-import org.ofbiz.entity.jdbc.ConnectionFactory;
 import org.ofbiz.entity.model.ModelEntity;
 import org.ofbiz.entity.model.ModelField;
 import org.ofbiz.entity.transaction.GenericTransactionException;

Modified: ofbiz/branches/framework-api-cleanup/framework/geronimo/src/org/ofbiz/geronimo/GeronimoTransactionFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/framework-api-cleanup/framework/geronimo/src/org/ofbiz/geronimo/GeronimoTransactionFactory.java?rev=1619985&r1=1619984&r2=1619985&view=diff
==============================================================================
--- ofbiz/branches/framework-api-cleanup/framework/geronimo/src/org/ofbiz/geronimo/GeronimoTransactionFactory.java (original)
+++ ofbiz/branches/framework-api-cleanup/framework/geronimo/src/org/ofbiz/geronimo/GeronimoTransactionFactory.java Sat Aug 23 08:28:50 2014
@@ -34,7 +34,7 @@ import org.ofbiz.entity.GenericEntityExc
 import org.ofbiz.entity.config.model.Datasource;
 import org.ofbiz.entity.config.model.EntityConfig;
 import org.ofbiz.entity.datasource.GenericHelperInfo;
-import org.ofbiz.entity.jdbc.ConnectionFactory;
+import org.ofbiz.entity.jdbc.ConnectionFactoryLoader;
 import org.ofbiz.entity.transaction.TransactionFactoryInterface;
 
 /**
@@ -80,7 +80,7 @@ public class GeronimoTransactionFactory 
         Datasource datasourceInfo = EntityConfig.getDatasource(helperInfo.getHelperBaseName());
 
         if (datasourceInfo != null && datasourceInfo.getInlineJdbc() != null) {
-            return ConnectionFactory.getInstance().getConnection(helperInfo, datasourceInfo.getInlineJdbc());
+            return ConnectionFactoryLoader.getInstance().getConnection(helperInfo, datasourceInfo.getInlineJdbc());
         } else {
             Debug.logError("Geronimo is the configured transaction manager but no inline-jdbc element was specified in the " + helperInfo.getHelperBaseName() + " datasource. Please check your configuration", module);
             return null;
@@ -88,7 +88,7 @@ public class GeronimoTransactionFactory 
     }
 
     public void shutdown() {
-        ConnectionFactory.getInstance().closeAll();
+        ConnectionFactoryLoader.getInstance().closeAll();
         /*
         if (transactionContextManager != null) {
             // TODO: need to do anything for this?

Modified: ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/DataVisionViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/DataVisionViewHandler.java?rev=1619985&r1=1619984&r2=1619985&view=diff
==============================================================================
--- ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/DataVisionViewHandler.java (original)
+++ ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/DataVisionViewHandler.java Sat Aug 23 08:28:50 2014
@@ -34,7 +34,6 @@ import org.ofbiz.entity.datasource.Gener
 import org.ofbiz.entity.transaction.TransactionFactoryLoader;
 import org.ofbiz.webapp.control.ContextFilter;
 import org.ofbiz.entity.Delegator;
-import org.ofbiz.entity.jdbc.ConnectionFactory;
 
 /**
  * Handles DataVision type view rendering

Modified: ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsJXlsViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsJXlsViewHandler.java?rev=1619985&r1=1619984&r2=1619985&view=diff
==============================================================================
--- ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsJXlsViewHandler.java (original)
+++ ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsJXlsViewHandler.java Sat Aug 23 08:28:50 2014
@@ -41,9 +41,7 @@ import org.ofbiz.base.util.cache.UtilCac
 import org.ofbiz.entity.datasource.GenericHelperInfo;
 import org.ofbiz.entity.transaction.TransactionFactoryLoader;
 import org.ofbiz.webapp.control.ContextFilter;
-import org.ofbiz.webapp.view.AbstractViewHandler;
 import org.ofbiz.entity.Delegator;
-import org.ofbiz.entity.jdbc.ConnectionFactory;
 
 
 /**

Modified: ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPdfViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPdfViewHandler.java?rev=1619985&r1=1619984&r2=1619985&view=diff
==============================================================================
--- ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPdfViewHandler.java (original)
+++ ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPdfViewHandler.java Sat Aug 23 08:28:50 2014
@@ -40,9 +40,7 @@ import org.ofbiz.base.util.cache.UtilCac
 import org.ofbiz.entity.datasource.GenericHelperInfo;
 import org.ofbiz.entity.transaction.TransactionFactoryLoader;
 import org.ofbiz.webapp.control.ContextFilter;
-import org.ofbiz.webapp.view.AbstractViewHandler;
 import org.ofbiz.entity.Delegator;
-import org.ofbiz.entity.jdbc.ConnectionFactory;
 
 /**
  * Handles JasperReports PDF view rendering

Modified: ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPoiXlsViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPoiXlsViewHandler.java?rev=1619985&r1=1619984&r2=1619985&view=diff
==============================================================================
--- ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPoiXlsViewHandler.java (original)
+++ ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsPoiXlsViewHandler.java Sat Aug 23 08:28:50 2014
@@ -41,9 +41,7 @@ import org.ofbiz.base.util.cache.UtilCac
 import org.ofbiz.entity.datasource.GenericHelperInfo;
 import org.ofbiz.entity.transaction.TransactionFactoryLoader;
 import org.ofbiz.webapp.control.ContextFilter;
-import org.ofbiz.webapp.view.AbstractViewHandler;
 import org.ofbiz.entity.Delegator;
-import org.ofbiz.entity.jdbc.ConnectionFactory;
 
 
 /**

Modified: ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsXmlViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsXmlViewHandler.java?rev=1619985&r1=1619984&r2=1619985&view=diff
==============================================================================
--- ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsXmlViewHandler.java (original)
+++ ofbiz/branches/framework-api-cleanup/framework/webapp/src/org/ofbiz/webapp/view/JasperReportsXmlViewHandler.java Sat Aug 23 08:28:50 2014
@@ -39,9 +39,7 @@ import org.ofbiz.base.util.UtilHttp;
 import org.ofbiz.entity.datasource.GenericHelperInfo;
 import org.ofbiz.entity.transaction.TransactionFactoryLoader;
 import org.ofbiz.webapp.control.ContextFilter;
-import org.ofbiz.webapp.view.AbstractViewHandler;
 import org.ofbiz.entity.Delegator;
-import org.ofbiz.entity.jdbc.ConnectionFactory;
 
 /**
  * Handles JasperReports PDF view rendering