aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1656470 - in /aries/trunk/transaction/transaction-manager/src/main/java/org/apache/aries/transaction/internal: Activator.java AriesPlatformTransactionManager.java TransactionManagerService.java
Date Mon, 02 Feb 2015 14:18:15 GMT
Author: cschneider
Date: Mon Feb  2 14:18:14 2015
New Revision: 1656470

URL: http://svn.apache.org/r1656470
Log:
Handle warnings, Documentation

Modified:
    aries/trunk/transaction/transaction-manager/src/main/java/org/apache/aries/transaction/internal/Activator.java
    aries/trunk/transaction/transaction-manager/src/main/java/org/apache/aries/transaction/internal/AriesPlatformTransactionManager.java
    aries/trunk/transaction/transaction-manager/src/main/java/org/apache/aries/transaction/internal/TransactionManagerService.java

Modified: aries/trunk/transaction/transaction-manager/src/main/java/org/apache/aries/transaction/internal/Activator.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-manager/src/main/java/org/apache/aries/transaction/internal/Activator.java?rev=1656470&r1=1656469&r2=1656470&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-manager/src/main/java/org/apache/aries/transaction/internal/Activator.java
(original)
+++ aries/trunk/transaction/transaction-manager/src/main/java/org/apache/aries/transaction/internal/Activator.java
Mon Feb  2 14:18:14 2015
@@ -42,23 +42,25 @@ public class Activator implements Bundle
 
     public void start(BundleContext bundleContext) throws Exception {
         this.bundleContext = bundleContext;
-        Hashtable props = new Hashtable();
+        // Make sure TransactionManager comes up even if no config admin is installed
+        updated(null);
+        bundleContext.registerService(ManagedService.class.getName(), this, getProps());
+    }
+
+    private Dictionary<String, Object> getProps() {
+        Dictionary<String, Object> props = new Hashtable<String, Object>();
         props.put(Constants.SERVICE_PID, PID);
-        updated(props);
-        bundleContext.registerService(ManagedService.class.getName(), this, props);
+        return props;
     }
 
     public void stop(BundleContext context) throws Exception {
         deleted();
     }
 
-    public synchronized void updated(Dictionary properties) throws ConfigurationException
{
-    	if (properties == null)
-    	{
-    		// Use defaults if there's no configuration for us
-    		properties = new Hashtable();
-    		properties.put(Constants.SERVICE_PID, PID);
-    	}
+    public synchronized void updated(@SuppressWarnings("rawtypes") Dictionary properties)
throws ConfigurationException {
+        if (properties == null) {
+            properties = getProps();
+        }
         deleted();
         manager = new TransactionManagerService(PID, properties, bundleContext);
         try {

Modified: aries/trunk/transaction/transaction-manager/src/main/java/org/apache/aries/transaction/internal/AriesPlatformTransactionManager.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-manager/src/main/java/org/apache/aries/transaction/internal/AriesPlatformTransactionManager.java?rev=1656470&r1=1656469&r2=1656470&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-manager/src/main/java/org/apache/aries/transaction/internal/AriesPlatformTransactionManager.java
(original)
+++ aries/trunk/transaction/transaction-manager/src/main/java/org/apache/aries/transaction/internal/AriesPlatformTransactionManager.java
Mon Feb  2 14:18:14 2015
@@ -26,7 +26,6 @@ import javax.transaction.Status;
 import javax.transaction.SystemException;
 import javax.transaction.xa.XAException;
 
-import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
 import org.apache.geronimo.transaction.manager.TransactionLog;
 import org.apache.geronimo.transaction.manager.XidFactory;
 import org.apache.geronimo.transaction.manager.TransactionManagerMonitor;
@@ -150,6 +149,7 @@ public class AriesPlatformTransactionMan
             this.readOnly = readOnly;
         }
 
+        @SuppressWarnings("unused")
         public Object getSuspendedResources() {
             return suspendedResources;
         }

Modified: aries/trunk/transaction/transaction-manager/src/main/java/org/apache/aries/transaction/internal/TransactionManagerService.java
URL: http://svn.apache.org/viewvc/aries/trunk/transaction/transaction-manager/src/main/java/org/apache/aries/transaction/internal/TransactionManagerService.java?rev=1656470&r1=1656469&r2=1656470&view=diff
==============================================================================
--- aries/trunk/transaction/transaction-manager/src/main/java/org/apache/aries/transaction/internal/TransactionManagerService.java
(original)
+++ aries/trunk/transaction/transaction-manager/src/main/java/org/apache/aries/transaction/internal/TransactionManagerService.java
Mon Feb  2 14:18:14 2015
@@ -21,6 +21,7 @@ import java.util.ArrayList;
 import java.util.Dictionary;
 import java.util.List;
 import java.util.Properties;
+
 import javax.transaction.TransactionManager;
 import javax.transaction.TransactionSynchronizationRegistry;
 import javax.transaction.UserTransaction;
@@ -29,7 +30,6 @@ import javax.transaction.xa.XAException;
 import org.apache.aries.transaction.AriesTransactionManager;
 import org.apache.aries.util.AriesFrameworkUtil;
 import org.apache.geronimo.transaction.log.UnrecoverableLog;
-import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
 import org.apache.geronimo.transaction.manager.RecoverableTransactionManager;
 import org.apache.geronimo.transaction.manager.TransactionLog;
 import org.apache.geronimo.transaction.manager.XidFactory;
@@ -64,7 +64,9 @@ public class TransactionManagerService {
 
     private static final String PLATFORM_TRANSACTION_MANAGER_CLASS = "org.springframework.transaction.PlatformTransactionManager";
 
+    @SuppressWarnings("unused")
     private final String pid;
+    @SuppressWarnings("rawtypes")
     private final Dictionary properties;
     private final BundleContext bundleContext;
     private boolean useSpring;
@@ -72,7 +74,7 @@ public class TransactionManagerService {
     private TransactionLog transactionLog;
     private ServiceRegistration serviceRegistration;
 
-    public TransactionManagerService(String pid, Dictionary properties, BundleContext bundleContext)
throws ConfigurationException {
+    public TransactionManagerService(String pid, @SuppressWarnings("rawtypes") Dictionary
properties, BundleContext bundleContext) throws ConfigurationException {
         this.pid = pid;
         this.properties = properties;
         this.bundleContext = bundleContext;



Mime
View raw message