ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaco...@apache.org
Subject svn commit: r670160 - in /ofbiz/trunk/framework: base/lib/j2eespecs/ geronimo/lib/ geronimo/src/org/ofbiz/geronimo/
Date Sat, 21 Jun 2008 07:25:14 GMT
Author: jacopoc
Date: Sat Jun 21 00:25:13 2008
New Revision: 670160

URL: http://svn.apache.org/viewvc?rev=670160&view=rev
Log:
Upgrade to the Geronimo TX Manager 2.1.1; removed old Jencks jar.

Added:
    ofbiz/trunk/framework/base/lib/j2eespecs/geronimo-jta_1.1_spec-1.1.1.jar   (with props)
    ofbiz/trunk/framework/geronimo/lib/geronimo-connector-2.1.1.jar   (with props)
    ofbiz/trunk/framework/geronimo/lib/geronimo-transaction-2.1.1.jar   (with props)
Removed:
    ofbiz/trunk/framework/base/lib/j2eespecs/geronimo-jta_1.0.1B_spec-1.0.jar
    ofbiz/trunk/framework/geronimo/lib/geronimo-transaction-1.0.jar
    ofbiz/trunk/framework/geronimo/lib/jencks-1.1.3.jar
Modified:
    ofbiz/trunk/framework/geronimo/src/org/ofbiz/geronimo/GeronimoContainer.java
    ofbiz/trunk/framework/geronimo/src/org/ofbiz/geronimo/GeronimoTransactionFactory.java

Added: ofbiz/trunk/framework/base/lib/j2eespecs/geronimo-jta_1.1_spec-1.1.1.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/j2eespecs/geronimo-jta_1.1_spec-1.1.1.jar?rev=670160&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/base/lib/j2eespecs/geronimo-jta_1.1_spec-1.1.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ofbiz/trunk/framework/geronimo/lib/geronimo-connector-2.1.1.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/geronimo/lib/geronimo-connector-2.1.1.jar?rev=670160&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/geronimo/lib/geronimo-connector-2.1.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ofbiz/trunk/framework/geronimo/lib/geronimo-transaction-2.1.1.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/geronimo/lib/geronimo-transaction-2.1.1.jar?rev=670160&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/geronimo/lib/geronimo-transaction-2.1.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: ofbiz/trunk/framework/geronimo/src/org/ofbiz/geronimo/GeronimoContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/geronimo/src/org/ofbiz/geronimo/GeronimoContainer.java?rev=670160&r1=670159&r2=670160&view=diff
==============================================================================
--- ofbiz/trunk/framework/geronimo/src/org/ofbiz/geronimo/GeronimoContainer.java (original)
+++ ofbiz/trunk/framework/geronimo/src/org/ofbiz/geronimo/GeronimoContainer.java Sat Jun 21
00:25:13 2008
@@ -21,7 +21,7 @@
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 
-import org.apache.geronimo.transaction.context.TransactionContextManager;
+import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
 import org.ofbiz.base.container.Container;
 import org.ofbiz.base.container.ContainerConfig;
 import org.ofbiz.base.container.ContainerException;
@@ -35,7 +35,6 @@
     public static final String module = GeronimoContainer.class.getName();
 
     protected String configFile = null;
-    protected TransactionContextManager geronimoTcm = null;
 
     /**
      * @see org.ofbiz.base.container.Container#init(java.lang.String[], java.lang.String)
@@ -58,15 +57,12 @@
 
         //String carolPropName = ContainerConfig.getPropertyValue(cc, "jndi-config", "iiop.properties");
 
-        // start Geronimo
-        this.geronimoTcm = new TransactionContextManager();
-
         // bind UserTransaction and TransactionManager to JNDI
         try {
             InitialContext ic = new InitialContext();
             // TODO: for some reason this is not working, throwing an error: java.lang.IllegalArgumentException:
RegistryContext: object to bind must be Remote, Reference, or Referenceable
-            ic.rebind("java:comp/UserTransaction", this.geronimoTcm.getTransactionManager());
-        } catch (NamingException e) {
+            ic.rebind("java:comp/UserTransaction", new GeronimoTransactionManager());
+        } catch (Exception e) {
             throw new ContainerException("Unable to bind UserTransaction/TransactionManager
to JNDI", e);
         }
 

Modified: ofbiz/trunk/framework/geronimo/src/org/ofbiz/geronimo/GeronimoTransactionFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/geronimo/src/org/ofbiz/geronimo/GeronimoTransactionFactory.java?rev=670160&r1=670159&r2=670160&view=diff
==============================================================================
--- ofbiz/trunk/framework/geronimo/src/org/ofbiz/geronimo/GeronimoTransactionFactory.java
(original)
+++ ofbiz/trunk/framework/geronimo/src/org/ofbiz/geronimo/GeronimoTransactionFactory.java
Sat Jun 21 00:25:13 2008
@@ -26,13 +26,11 @@
 import javax.transaction.UserTransaction;
 import javax.transaction.xa.XAException;
 
-import org.apache.geronimo.transaction.ExtendedTransactionManager;
-import org.apache.geronimo.transaction.context.GeronimoTransactionManager;
-import org.apache.geronimo.transaction.context.TransactionContextManager;
 import org.apache.geronimo.transaction.log.UnrecoverableLog;
+import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
 import org.apache.geronimo.transaction.manager.TransactionLog;
-import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
-import org.apache.geronimo.transaction.manager.XidImporter;
+import org.apache.geronimo.transaction.manager.XidFactory;
+import org.apache.geronimo.transaction.manager.XidFactoryImpl;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.config.DatasourceInfo;
@@ -47,9 +45,6 @@
 
     public static final String module = GeronimoTransactionFactory.class.getName();     
  
     
-    // just use the transactionManager for this private static XidImporter xidImporter;
-    private static ExtendedTransactionManager transactionManager;
-    private static TransactionContextManager transactionContextManager;
     private static int defaultTransactionTimeoutSeconds = 60;
     private static TransactionLog transactionLog;
     private static Collection resourceManagers = null;
@@ -59,9 +54,7 @@
         // creates an instance of Geronimo transaction context, etc with a local transaction
factory which is not bound to a registry
         try {
             transactionLog = new UnrecoverableLog();
-            transactionManager = new TransactionManagerImpl(defaultTransactionTimeoutSeconds,
transactionLog, resourceManagers);
-            transactionContextManager = new TransactionContextManager(transactionManager,
(XidImporter) transactionManager);
-            geronimoTransactionManager = new GeronimoTransactionManager(transactionContextManager);
+            geronimoTransactionManager = new GeronimoTransactionManager(defaultTransactionTimeoutSeconds,
(XidFactory)new XidFactoryImpl(), transactionLog);
         } catch (XAException e) {
             Debug.logError(e, "Error initializing Geronimo transaction manager: " + e.toString(),
module);
         }
@@ -98,9 +91,11 @@
     
     public void shutdown() {
         ConnectionFactory.closeAllManagedConnections();
+        /*
         if (transactionContextManager != null) {
             // TODO: need to do anything for this?
             transactionContextManager = null;
-        }           
+        }
+        */          
     }
 }



Mime
View raw message