svn commit: r1619995 - in /ofbiz/branches/framework-api-cleanup/framework: entity/src/org/ofbiz/entity/connection/ entity/src/org/ofbiz/entity/jdbc/ entity/src/org/ofbiz/entity/transaction/ geronimo/src/org/ofbiz/geronimo/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1619995 - in /ofbiz/branches/framework-api-cleanup/framework: entity/src/org/ofbiz/entity/connection/ entity/src/org/ofbiz/entity/jdbc/ entity/src/org/ofbiz/entity/transaction/ geronimo/src/org/ofbiz/geronimo/

jacopoc
Author: jacopoc
Date: Sat Aug 23 09:47:22 2014
New Revision: 1619995

URL: http://svn.apache.org/r1619995
Log:
Renamed ConnectionFactoryInterface into ConnectionFactory.
Renamed TransactionFactoryInterface into TransactionFactory.

Added:
    ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/connection/ConnectionFactory.java
      - copied, changed from r1619965, ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/connection/ConnectionFactoryInterface.java
    ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactory.java
      - copied, changed from r1619965, ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactoryInterface.java
Removed:
    ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/connection/ConnectionFactoryInterface.java
    ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactoryInterface.java
Modified:
    ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/connection/DBCPConnectionFactory.java
    ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/ConnectionFactoryLoader.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/transaction/TransactionFactoryLoader.java
    ofbiz/branches/framework-api-cleanup/framework/geronimo/src/org/ofbiz/geronimo/GeronimoTransactionFactory.java

Copied: ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/connection/ConnectionFactory.java (from r1619965, ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/connection/ConnectionFactoryInterface.java)
URL: http://svn.apache.org/viewvc/ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/connection/ConnectionFactory.java?p2=ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/connection/ConnectionFactory.java&p1=ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/connection/ConnectionFactoryInterface.java&r1=1619965&r2=1619995&rev=1619995&view=diff
==============================================================================
--- ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/connection/ConnectionFactoryInterface.java (original)
+++ ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/connection/ConnectionFactory.java Sat Aug 23 09:47:22 2014
@@ -26,9 +26,9 @@ import org.ofbiz.entity.config.model.Jdb
 import org.ofbiz.entity.datasource.GenericHelperInfo;
 
 /**
- * ConnectionFactoryInterface
+ * ConnectionFactory
  */
-public interface ConnectionFactoryInterface {
+public interface ConnectionFactory {
 
     public Connection getConnection(GenericHelperInfo helperInfo, JdbcElement jdbcElement) throws SQLException, GenericEntityException;
     public void closeAll();

Modified: ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/connection/DBCPConnectionFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/connection/DBCPConnectionFactory.java?rev=1619995&r1=1619994&r2=1619995&view=diff
==============================================================================
--- ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/connection/DBCPConnectionFactory.java (original)
+++ ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/connection/DBCPConnectionFactory.java Sat Aug 23 09:47:22 2014
@@ -28,7 +28,6 @@ import java.util.concurrent.ConcurrentHa
 
 import javax.transaction.TransactionManager;
 
-import org.apache.commons.dbcp2.ConnectionFactory;
 import org.apache.commons.dbcp2.DriverConnectionFactory;
 import org.apache.commons.dbcp2.PoolableConnectionFactory;
 import org.apache.commons.dbcp2.managed.LocalXAConnectionFactory;
@@ -52,7 +51,7 @@ import org.ofbiz.entity.transaction.Tran
  *
  * @see <a href="http://commons.apache.org/proper/commons-dbcp/">Apache Commons DBCP</a>
  */
-public class DBCPConnectionFactory implements ConnectionFactoryInterface {
+public class DBCPConnectionFactory implements ConnectionFactory {
 
     public static final String module = DBCPConnectionFactory.class.getName();
     protected static final ConcurrentHashMap<String, ManagedDataSource> dsCache = new ConcurrentHashMap<String, ManagedDataSource>();
@@ -99,7 +98,7 @@ public class DBCPConnectionFactory imple
         cfProps.put("password", jdbcPassword);
 
         // create the connection factory
-        ConnectionFactory cf = new DriverConnectionFactory(jdbcDriver, jdbcUri, cfProps);
+        org.apache.commons.dbcp2.ConnectionFactory cf = new DriverConnectionFactory(jdbcDriver, jdbcUri, cfProps);
 
         // wrap it with a LocalXAConnectionFactory
         XAConnectionFactory xacf = new LocalXAConnectionFactory(txMgr, cf);

Modified: ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/ConnectionFactoryLoader.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/ConnectionFactoryLoader.java?rev=1619995&r1=1619994&r2=1619995&view=diff
==============================================================================
--- ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/ConnectionFactoryLoader.java (original)
+++ ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/jdbc/ConnectionFactoryLoader.java Sat Aug 23 09:47:22 2014
@@ -20,19 +20,19 @@ package org.ofbiz.entity.jdbc;
 
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.entity.config.model.EntityConfig;
-import org.ofbiz.entity.connection.ConnectionFactoryInterface;
+import org.ofbiz.entity.connection.ConnectionFactory;
 
 /**
- * ConnectionFactoryLoader - utility class that loads the connection manager and provides to client code a reference to it (ConnectionFactoryInterface)
+ * ConnectionFactoryLoader - utility class that loads the connection manager and provides to client code a reference to it (ConnectionFactory)
  *
  */
 public class ConnectionFactoryLoader {
     // Debug module name
     public static final String module = ConnectionFactoryLoader.class.getName();
-    private static final ConnectionFactoryInterface connFactory = createConnectionFactoryInterface();
+    private static final ConnectionFactory connFactory = createConnectionFactory();
 
-    private static ConnectionFactoryInterface createConnectionFactoryInterface() {
-        ConnectionFactoryInterface instance = null;
+    private static ConnectionFactory createConnectionFactory() {
+        ConnectionFactory instance = null;
         try {
             String className = EntityConfig.getInstance().getConnectionFactory().getClassName();
             if (className == null) {
@@ -40,7 +40,7 @@ public class ConnectionFactoryLoader {
             }
             ClassLoader loader = Thread.currentThread().getContextClassLoader();
             Class<?> tfClass = loader.loadClass(className);
-            instance = (ConnectionFactoryInterface) tfClass.newInstance();
+            instance = (ConnectionFactory) tfClass.newInstance();
         } catch (ClassNotFoundException cnfe) {
             Debug.logError(cnfe, "Could not find connection factory class", module);
         } catch (Exception e) {
@@ -49,7 +49,7 @@ public class ConnectionFactoryLoader {
         return instance;
     }
 
-    public static ConnectionFactoryInterface getInstance() {
+    public static ConnectionFactory getInstance() {
         if (connFactory == null) {
             throw new IllegalStateException("The Connection Factory is not initialized.");
         }

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=1619995&r1=1619994&r2=1619995&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 09:47:22 2014
@@ -42,7 +42,7 @@ import org.ofbiz.entity.jdbc.ConnectionF
 /**
  * A dumb, non-working transaction manager.
  */
-public class DumbFactory implements TransactionFactoryInterface {
+public class DumbFactory implements TransactionFactory {
 
     public static final String module = DumbFactory.class.getName();
 

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=1619995&r1=1619994&r2=1619995&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 09:47:22 2014
@@ -44,7 +44,7 @@ import org.ofbiz.entity.jdbc.ConnectionF
 /**
  * Central source for Tyrex JTA objects from JNDI
  */
-public class JNDIFactory implements TransactionFactoryInterface {
+public class JNDIFactory implements TransactionFactory {
 
     // Debug module name
     public static final String module = JNDIFactory.class.getName();

Copied: ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactory.java (from r1619965, ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactoryInterface.java)
URL: http://svn.apache.org/viewvc/ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactory.java?p2=ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactory.java&p1=ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactoryInterface.java&r1=1619965&r2=1619995&rev=1619995&view=diff
==============================================================================
--- ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactoryInterface.java (original)
+++ ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactory.java Sat Aug 23 09:47:22 2014
@@ -27,9 +27,9 @@ import org.ofbiz.entity.GenericEntityExc
 import org.ofbiz.entity.datasource.GenericHelperInfo;
 
 /**
- * TransactionFactoryInterface - central source for JTA objects
+ * TransactionFactory - central source for JTA objects
  */
-public interface TransactionFactoryInterface {
+public interface TransactionFactory {
 
     public TransactionManager getTransactionManager();
 

Modified: ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactoryLoader.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactoryLoader.java?rev=1619995&r1=1619994&r2=1619995&view=diff
==============================================================================
--- ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactoryLoader.java (original)
+++ ofbiz/branches/framework-api-cleanup/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactoryLoader.java Sat Aug 23 09:47:22 2014
@@ -23,15 +23,15 @@ import org.ofbiz.entity.GenericEntityCon
 import org.ofbiz.entity.config.model.EntityConfig;
 
 /**
- * TransactionFactoryLoader - utility class that loads the transaction manager and provides to client code a reference to it (TransactionFactoryInterface)
+ * TransactionFactoryLoader - utility class that loads the transaction manager and provides to client code a reference to it (TransactionFactory)
  */
 public class TransactionFactoryLoader {
 
     public static final String module = TransactionFactoryLoader.class.getName();
-    private static final TransactionFactoryInterface txFactory = createTransactionFactoryInterface();
+    private static final TransactionFactory txFactory = createTransactionFactory();
 
-    private static TransactionFactoryInterface createTransactionFactoryInterface() {
-        TransactionFactoryInterface instance = null;
+    private static TransactionFactory createTransactionFactory() {
+        TransactionFactory instance = null;
         try {
             String className = EntityConfig.getInstance().getTransactionFactory().getClassName();
             if (className == null) {
@@ -39,7 +39,7 @@ public class TransactionFactoryLoader {
             }
             ClassLoader loader = Thread.currentThread().getContextClassLoader();
             Class<?> tfClass = loader.loadClass(className);
-            instance = (TransactionFactoryInterface) tfClass.newInstance();
+            instance = (TransactionFactory) tfClass.newInstance();
         } catch (GenericEntityConfException gece) {
             Debug.logError(gece, "Could not find transaction factory class name definition", module);
         } catch (ClassNotFoundException cnfe) {
@@ -50,7 +50,7 @@ public class TransactionFactoryLoader {
         return instance;
     }
 
-    public static TransactionFactoryInterface getInstance() {
+    public static TransactionFactory getInstance() {
         if (txFactory == null) {
             throw new IllegalStateException("The Transaction Factory is not initialized.");
         }

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=1619995&r1=1619994&r2=1619995&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 09:47:22 2014
@@ -35,12 +35,12 @@ import org.ofbiz.entity.config.model.Dat
 import org.ofbiz.entity.config.model.EntityConfig;
 import org.ofbiz.entity.datasource.GenericHelperInfo;
 import org.ofbiz.entity.jdbc.ConnectionFactoryLoader;
-import org.ofbiz.entity.transaction.TransactionFactoryInterface;
+import org.ofbiz.entity.transaction.TransactionFactory;
 
 /**
  * GeronimoTransactionFactory
  */
-public class GeronimoTransactionFactory implements TransactionFactoryInterface {
+public class GeronimoTransactionFactory implements TransactionFactory {
 
     public static final String module = GeronimoTransactionFactory.class.getName();
 
@@ -59,14 +59,14 @@ public class GeronimoTransactionFactory
     }
 
     /*
-     * @see org.ofbiz.entity.transaction.TransactionFactoryInterface#getTransactionManager()
+     * @see org.ofbiz.entity.transaction.TransactionFactory#getTransactionManager()
      */
     public TransactionManager getTransactionManager() {
         return geronimoTransactionManager;
     }
 
     /*
-     * @see org.ofbiz.entity.transaction.TransactionFactoryInterface#getUserTransaction()
+     * @see org.ofbiz.entity.transaction.TransactionFactory#getUserTransaction()
      */
     public UserTransaction getUserTransaction() {
         return geronimoTransactionManager;