You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2013/08/23 23:27:27 UTC

svn commit: r1517052 - in /activemq/trunk: activemq-broker/src/main/java/org/apache/activemq/broker/ activemq-broker/src/main/java/org/apache/activemq/broker/util/ activemq-camel/src/main/java/org/apache/activemq/camel/component/ activemq-spring/src/ma...

Author: tabish
Date: Fri Aug 23 21:27:27 2013
New Revision: 1517052

URL: http://svn.apache.org/r1517052
Log:
fix for: https://issues.apache.org/jira/browse/AMQ-4676 and https://issues.apache.org/jira/browse/AMQ-4673

Modified:
    activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java
    activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java
    activemq/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/CamelEndpointLoader.java
    activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/pool/PooledConnectionFactoryBean.java
    activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/security/XBeanAuthorizationEntry.java
    activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/security/XBeanAuthorizationMap.java
    activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/spring/ActiveMQConnectionFactory.java
    activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/spring/ActiveMQXAConnectionFactory.java
    activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/spring/SpringSslContext.java
    activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java
    activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/util/ResourceLoadingSslContext.java

Modified: activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java?rev=1517052&r1=1517051&r2=1517052&view=diff
==============================================================================
--- activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java (original)
+++ activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java Fri Aug 23 21:27:27 2013
@@ -50,6 +50,7 @@ import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
+
 import org.apache.activemq.ActiveMQConnectionMetaData;
 import org.apache.activemq.ConfigurationException;
 import org.apache.activemq.Service;
@@ -99,11 +100,10 @@ import org.slf4j.LoggerFactory;
 import org.slf4j.MDC;
 
 /**
- * Manages the lifecycle of an ActiveMQ Broker. A BrokerService consists of a
+ * Manages the life-cycle of an ActiveMQ Broker. A BrokerService consists of a
  * number of transport connectors, network connectors and a bunch of properties
  * which can be used to configure the broker as its lazily created.
  *
- *
  * @org.apache.xbean.XBean
  */
 public class BrokerService implements Service {
@@ -114,7 +114,10 @@ public class BrokerService implements Se
     public static final int DEFAULT_MAX_FILE_LENGTH = 1024 * 1024 * 32;
 
     private static final Logger LOG = LoggerFactory.getLogger(BrokerService.class);
+
+    @SuppressWarnings("unused")
     private static final long serialVersionUID = 7353129142305630237L;
+
     private boolean useJmx = true;
     private boolean enableStatistics = true;
     private boolean persistent = true;
@@ -498,11 +501,24 @@ public class BrokerService implements Se
     }
 
     /**
+     * JSR-250 callback wrapper; converts checked exceptions to runtime exceptions
+     *
+     * delegates to autoStart, done to prevent backwards incompatible signature change
+     */
+    @PostConstruct
+    private void postConstruct() {
+        try {
+            autoStart();
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    /**
      *
      * @throws Exception
      * @org. apache.xbean.InitMethod
      */
-    @PostConstruct
     public void autoStart() throws Exception {
         if(shouldAutostart()) {
             start();
@@ -665,12 +681,25 @@ public class BrokerService implements Se
     }
 
     /**
+     * JSR-250 callback wrapper; converts checked exceptions to runtime exceptions
+     *
+     * delegates to stop, done to prevent backwards incompatible signature change
+     */
+    @PreDestroy
+    private void preDestroy () {
+        try {
+            stop();
+        } catch (Exception ex) {
+            throw new RuntimeException();
+        }
+    }
+
+    /**
      *
      * @throws Exception
      * @org.apache .xbean.DestroyMethod
      */
     @Override
-    @PreDestroy
     public void stop() throws Exception {
         if (!stopping.compareAndSet(false, true)) {
             LOG.trace("Broker already stopping/stopped");

Modified: activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java?rev=1517052&r1=1517051&r2=1517052&view=diff
==============================================================================
--- activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java (original)
+++ activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java Fri Aug 23 21:27:27 2013
@@ -28,21 +28,7 @@ import org.apache.activemq.broker.Produc
 import org.apache.activemq.broker.region.Destination;
 import org.apache.activemq.broker.region.MessageReference;
 import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.BrokerInfo;
-import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.TransactionId;
+import org.apache.activemq.command.*;
 import org.apache.activemq.usage.Usage;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -52,7 +38,6 @@ import org.slf4j.LoggerFactory;
  *
  * @org.apache.xbean.XBean
  */
-
 public class LoggingBrokerPlugin extends BrokerPluginSupport {
 
     private static final Logger LOG = LoggerFactory.getLogger(LoggingBrokerPlugin.class);
@@ -67,10 +52,23 @@ public class LoggingBrokerPlugin extends
     private boolean logInternalEvents = false;
 
     /**
+     * JSR-250 callback wrapper; converts checked exceptions to runtime exceptions
+     *
+     * delegates to afterPropertiesSet, done to prevent backwards incompatible signature change
+     */
+    @PostConstruct
+    private void postConstruct() {
+        try {
+            afterPropertiesSet();
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    /**
      * @throws Exception
      * @org.apache.xbean.InitMethod
      */
-    @PostConstruct
     public void afterPropertiesSet() throws Exception {
         LOG.info("Created LoggingBrokerPlugin: " + this.toString());
     }

Modified: activemq/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/CamelEndpointLoader.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/CamelEndpointLoader.java?rev=1517052&r1=1517051&r2=1517052&view=diff
==============================================================================
--- activemq/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/CamelEndpointLoader.java (original)
+++ activemq/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/component/CamelEndpointLoader.java Fri Aug 23 21:27:27 2013
@@ -20,11 +20,7 @@ package org.apache.activemq.camel.compon
 import java.util.Set;
 
 import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
 
-import org.apache.activemq.EnhancedConnection;
 import org.apache.activemq.advisory.DestinationEvent;
 import org.apache.activemq.advisory.DestinationListener;
 import org.apache.activemq.advisory.DestinationSource;
@@ -36,14 +32,12 @@ import org.apache.camel.CamelContextAwar
 import org.apache.camel.Endpoint;
 import org.apache.camel.component.jms.JmsEndpoint;
 import org.apache.camel.component.jms.JmsQueueEndpoint;
-import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * A helper bean which populates a {@link CamelContext} with ActiveMQ Queue endpoints
  *
- *
  * @org.apache.xbean.XBean
  */
 public class CamelEndpointLoader implements CamelContextAware {
@@ -61,14 +55,30 @@ public class CamelEndpointLoader impleme
     }
 
     /**
+     * JSR-250 callback wrapper; converts checked exceptions to runtime exceptions
+     *
+     * delegates to afterPropertiesSet, done to prevent backwards incompatible signature change
+     *
+     * fix: AMQ-4676
+     */
+    @PostConstruct
+    private void postConstruct() {
+        try {
+            afterPropertiesSet();
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    /**
      *
      * @throws Exception
      * @org.apache.xbean.InitMethod
      */
-    @PostConstruct
     public void afterPropertiesSet() throws Exception {
         if (source != null) {
             source.setDestinationListener(new DestinationListener() {
+                @Override
                 public void onDestinationEvent(DestinationEvent event) {
                     try {
                         ActiveMQDestination destination = event.getDestination();
@@ -107,10 +117,12 @@ public class CamelEndpointLoader impleme
 
     // Properties
     //-------------------------------------------------------------------------
+    @Override
     public CamelContext getCamelContext() {
         return camelContext;
     }
 
+    @Override
     public void setCamelContext(CamelContext camelContext) {
         this.camelContext = camelContext;
     }

Modified: activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/pool/PooledConnectionFactoryBean.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/pool/PooledConnectionFactoryBean.java?rev=1517052&r1=1517051&r2=1517052&view=diff
==============================================================================
--- activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/pool/PooledConnectionFactoryBean.java (original)
+++ activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/pool/PooledConnectionFactoryBean.java Fri Aug 23 21:27:27 2013
@@ -96,11 +96,24 @@ public class PooledConnectionFactoryBean
     }
 
     /**
+     * JSR-250 callback wrapper; converts checked exceptions to runtime exceptions
+     *
+     * delegates to afterPropertiesSet, done to prevent backwards incompatible signature change.
+     */
+    @PostConstruct
+    private void postConstruct() {
+        try {
+            afterPropertiesSet();
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    /**
      *
      * @throws Exception
      * @org.apache.xbean.InitMethod
      */
-    @PostConstruct
     public void afterPropertiesSet() throws Exception {
         if (pooledConnectionFactory == null && transactionManager != null && resourceName != null) {
             try {
@@ -147,11 +160,24 @@ public class PooledConnectionFactoryBean
     }
 
     /**
+     * JSR-250 callback wrapper; converts checked exceptions to runtime exceptions
+     *
+     * delegates to destroy, done to prevent backwards incompatible signature change.
+     */
+    @PreDestroy
+    private void preDestroy() {
+        try {
+            destroy();
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    /**
      *
      * @throws Exception
      * @org.apache.xbean.DestroyMethod
      */
-    @PreDestroy
     public void destroy() throws Exception {
         if (pooledConnectionFactory != null) {
             pooledConnectionFactory.stop();

Modified: activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/security/XBeanAuthorizationEntry.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/security/XBeanAuthorizationEntry.java?rev=1517052&r1=1517051&r2=1517052&view=diff
==============================================================================
--- activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/security/XBeanAuthorizationEntry.java (original)
+++ activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/security/XBeanAuthorizationEntry.java Fri Aug 23 21:27:27 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.activemq.security;
 
-import org.springframework.beans.factory.InitializingBean;
-
 import javax.annotation.PostConstruct;
 
+import org.springframework.beans.factory.InitializingBean;
+
 /**
  * Represents an entry in a {@link DefaultAuthorizationMap} for assigning
  * different operations (read, write, admin) of user roles to a specific
@@ -46,10 +46,24 @@ public class XBeanAuthorizationEntry ext
     }
 
     /**
+     * JSR-250 callback wrapper; converts checked exceptions to runtime exceptions
      *
-     * @org.apache.xbean.InitMethod
+     * delegates to afterPropertiesSet, done to prevent backwards incompatible signature change.
      */
     @PostConstruct
+    private void postConstruct() {
+        try {
+            afterPropertiesSet();
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    /**
+     *
+     * @org.apache.xbean.InitMethod
+     */
+    @Override
     public void afterPropertiesSet() throws Exception {
 
         if (adminRoles != null) {

Modified: activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/security/XBeanAuthorizationMap.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/security/XBeanAuthorizationMap.java?rev=1517052&r1=1517051&r2=1517052&view=diff
==============================================================================
--- activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/security/XBeanAuthorizationMap.java (original)
+++ activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/security/XBeanAuthorizationMap.java Fri Aug 23 21:27:27 2013
@@ -16,11 +16,12 @@
  */
 package org.apache.activemq.security;
 
-import org.apache.activemq.filter.DestinationMapEntry;
-import org.springframework.beans.factory.InitializingBean;
+import java.util.List;
 
 import javax.annotation.PostConstruct;
-import java.util.List;
+
+import org.apache.activemq.filter.DestinationMapEntry;
+import org.springframework.beans.factory.InitializingBean;
 
 
 /**
@@ -31,10 +32,24 @@ public class XBeanAuthorizationMap exten
     protected List<DestinationMapEntry> authorizationEntries;
 
     /**
+     * JSR-250 callback wrapper; converts checked exceptions to runtime exceptions
      *
-     * @org.apache.xbean.InitMethod
+     * delegates to afterPropertiesSet, done to prevent backwards incompatible signature change.
      */
     @PostConstruct
+    private void postConstruct() {
+        try {
+            afterPropertiesSet();
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    /**
+     *
+     * @org.apache.xbean.InitMethod
+     */
+    @Override
     public void afterPropertiesSet() throws Exception {
         for (DestinationMapEntry entry : authorizationEntries) {
             if (((XBeanAuthorizationEntry)entry).getGroupClass() == null) {
@@ -50,6 +65,7 @@ public class XBeanAuthorizationMap exten
      *
      * @org.apache.xbean.ElementType class="org.apache.activemq.security.AuthorizationEntry"
      */
+    @Override
     @SuppressWarnings("rawtypes")
     public void setAuthorizationEntries(List<DestinationMapEntry> entries) {
         this.authorizationEntries = entries;

Modified: activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/spring/ActiveMQConnectionFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/spring/ActiveMQConnectionFactory.java?rev=1517052&r1=1517051&r2=1517052&view=diff
==============================================================================
--- activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/spring/ActiveMQConnectionFactory.java (original)
+++ activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/spring/ActiveMQConnectionFactory.java Fri Aug 23 21:27:27 2013
@@ -17,6 +17,7 @@
 package org.apache.activemq.spring;
 
 import javax.annotation.PostConstruct;
+
 import org.springframework.beans.factory.BeanNameAware;
 
 /**
@@ -24,22 +25,34 @@ import org.springframework.beans.factory
  * factory which will automatically use the Spring bean name as the clientIDPrefix property
  * so that connections created have client IDs related to your Spring.xml file for
  * easier comprehension from <a href="http://activemq.apache.org/jmx.html">JMX</a>.
- * 
+ *
  * @org.apache.xbean.XBean element="connectionFactory"
- * 
- * 
+ *
+ *
  */
 public class ActiveMQConnectionFactory extends org.apache.activemq.ActiveMQConnectionFactory implements BeanNameAware {
 
     private String beanName;
     private boolean useBeanNameAsClientIdPrefix;
-    
+
     /**
+     * JSR-250 callback wrapper; converts checked exceptions to runtime exceptions
      *
+     * delegates to afterPropertiesSet, done to prevent backwards incompatible signature change.
+     */
+    @PostConstruct
+    private void postConstruct() {
+        try {
+            afterPropertiesSet();
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    /**
      * @throws Exception
      * @org.apache.xbean.InitMethod
      */
-    @PostConstruct
     public void afterPropertiesSet() throws Exception {
         if (isUseBeanNameAsClientIdPrefix() && getClientIDPrefix() == null) {
             setClientIDPrefix(getBeanName());
@@ -49,7 +62,8 @@ public class ActiveMQConnectionFactory e
     public String getBeanName() {
         return beanName;
     }
-    
+
+    @Override
     public void setBeanName(String beanName) {
         this.beanName = beanName;
     }

Modified: activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/spring/ActiveMQXAConnectionFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/spring/ActiveMQXAConnectionFactory.java?rev=1517052&r1=1517051&r2=1517052&view=diff
==============================================================================
--- activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/spring/ActiveMQXAConnectionFactory.java (original)
+++ activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/spring/ActiveMQXAConnectionFactory.java Fri Aug 23 21:27:27 2013
@@ -17,6 +17,7 @@
 package org.apache.activemq.spring;
 
 import javax.annotation.PostConstruct;
+
 import org.springframework.beans.factory.BeanNameAware;
 
 /**
@@ -24,22 +25,33 @@ import org.springframework.beans.factory
  * factory which will automatically use the Spring bean name as the clientIDPrefix property
  * so that connections created have client IDs related to your Spring.xml file for
  * easier comprehension from <a href="http://activemq.apache.org/jmx.html">JMX</a>.
- * 
+ *
  * @org.apache.xbean.XBean element="xaConnectionFactory"
- * 
- * 
  */
 public class ActiveMQXAConnectionFactory extends org.apache.activemq.ActiveMQXAConnectionFactory implements BeanNameAware {
 
     private String beanName;
     private boolean useBeanNameAsClientIdPrefix;
-    
+
+    /**
+     * JSR-250 callback wrapper; converts checked exceptions to runtime exceptions
+     *
+     * delegates to afterPropertiesSet, done to prevent backwards incompatible signature change.
+     */
+    @PostConstruct
+    private void postConstruct() {
+        try {
+            afterPropertiesSet();
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
     /**
      *
      * @throws Exception
      * @org.apache.xbean.InitMethod
      */
-    @PostConstruct
     public void afterPropertiesSet() throws Exception {
         if (isUseBeanNameAsClientIdPrefix() && getClientIDPrefix() == null) {
             setClientIDPrefix(getBeanName());
@@ -49,7 +61,8 @@ public class ActiveMQXAConnectionFactory
     public String getBeanName() {
         return beanName;
     }
-    
+
+    @Override
     public void setBeanName(String beanName) {
         this.beanName = beanName;
     }

Modified: activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/spring/SpringSslContext.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/spring/SpringSslContext.java?rev=1517052&r1=1517051&r2=1517052&view=diff
==============================================================================
--- activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/spring/SpringSslContext.java (original)
+++ activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/spring/SpringSslContext.java Fri Aug 23 21:27:27 2013
@@ -30,21 +30,22 @@ import javax.net.ssl.KeyManager;
 import javax.net.ssl.KeyManagerFactory;
 import javax.net.ssl.TrustManager;
 import javax.net.ssl.TrustManagerFactory;
+
 import org.apache.activemq.broker.SslContext;
 
 /**
  * Extends the SslContext so that it's easier to configure from spring.
- * 
+ *
  * @org.apache.xbean.XBean element="sslContext"
- * 
- * 
+ *
+ *
  */
-public class SpringSslContext extends SslContext {    
-    
+public class SpringSslContext extends SslContext {
+
     private String keyStoreType="jks";
     private String trustStoreType="jks";
 
-    private String secureRandomAlgorithm="SHA1PRNG";    
+    private String secureRandomAlgorithm="SHA1PRNG";
     private String keyStoreAlgorithm=KeyManagerFactory.getDefaultAlgorithm();
     private String trustStoreAlgorithm=TrustManagerFactory.getDefaultAlgorithm();
 
@@ -56,11 +57,24 @@ public class SpringSslContext extends Ss
     private String trustStorePassword;
 
     /**
+     * JSR-250 callback wrapper; converts checked exceptions to runtime exceptions
+     *
+     * delegates to afterPropertiesSet, done to prevent backwards incompatible signature change.
+     */
+    @PostConstruct
+    private void postConstruct() {
+        try {
+            afterPropertiesSet();
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    /**
      *
      * @throws Exception
      * @org.apache.xbean.InitMethod
      */
-    @PostConstruct
     public void afterPropertiesSet() throws Exception {
         keyManagers.addAll(createKeyManagers());
         trustManagers.addAll(createTrustManagers());
@@ -74,22 +88,22 @@ public class SpringSslContext extends Ss
     }
 
     private Collection<TrustManager> createTrustManagers() throws Exception {
-        KeyStore ks = createTrustManagerKeyStore(); 
+        KeyStore ks = createTrustManagerKeyStore();
         if( ks ==null ) {
             return new ArrayList<TrustManager>(0);
         }
-        
+
         TrustManagerFactory tmf  = TrustManagerFactory.getInstance(trustStoreAlgorithm);
         tmf.init(ks);
         return Arrays.asList(tmf.getTrustManagers());
     }
 
     private Collection<KeyManager> createKeyManagers() throws Exception {
-        KeyStore ks = createKeyManagerKeyStore(); 
+        KeyStore ks = createKeyManagerKeyStore();
         if( ks ==null ) {
             return new ArrayList<KeyManager>(0);
         }
-        
+
         KeyManagerFactory tmf  = KeyManagerFactory.getInstance(keyStoreAlgorithm);
         tmf.init(ks, keyStoreKeyPassword == null ? (keyStorePassword==null? null : keyStorePassword.toCharArray()) : keyStoreKeyPassword.toCharArray());
         return Arrays.asList(tmf.getKeyManagers());
@@ -99,7 +113,7 @@ public class SpringSslContext extends Ss
         if( trustStore ==null ) {
             return null;
         }
-        
+
         KeyStore ks = KeyStore.getInstance(trustStoreType);
         InputStream is=Utils.resourceFromString(trustStore).getInputStream();
         try {
@@ -109,12 +123,12 @@ public class SpringSslContext extends Ss
         }
         return ks;
     }
-    
+
     private KeyStore createKeyManagerKeyStore() throws Exception {
         if( keyStore ==null ) {
             return null;
         }
-        
+
         KeyStore ks = KeyStore.getInstance(keyStoreType);
         InputStream is=Utils.resourceFromString(keyStore).getInputStream();
         try {

Modified: activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java?rev=1517052&r1=1517051&r2=1517052&view=diff
==============================================================================
--- activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java (original)
+++ activemq/trunk/activemq-spring/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java Fri Aug 23 21:27:27 2013
@@ -49,11 +49,24 @@ public class XBeanBrokerService extends 
     }
 
     /**
+     * JSR-250 callback wrapper; converts checked exceptions to runtime exceptions
+     *
+     * delegates to afterPropertiesSet, done to prevent backwards incompatible signature change.
+     */
+    @PostConstruct
+    private void postConstruct() {
+        try {
+            afterPropertiesSet();
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    /**
      *
      * @throws Exception
      * @org.apache.xbean.InitMethod
      */
-    @PostConstruct
     public void afterPropertiesSet() throws Exception {
         ensureSystemUsageHasStore();
         if (shouldAutostart()) {
@@ -80,11 +93,24 @@ public class XBeanBrokerService extends 
     }
 
     /**
+     * JSR-250 callback wrapper; converts checked exceptions to runtime exceptions
+     *
+     * delegates to destroy, done to prevent backwards incompatible signature change.
+     */
+    @PreDestroy
+    private void preDestroy() {
+        try {
+            destroy();
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    /**
      *
      * @throws Exception
      * @org.apache.xbean.DestroyMethod
      */
-    @PreDestroy
     public void destroy() throws Exception {
         stop();
     }

Modified: activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/util/ResourceLoadingSslContext.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/util/ResourceLoadingSslContext.java?rev=1517052&r1=1517051&r2=1517052&view=diff
==============================================================================
--- activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/util/ResourceLoadingSslContext.java (original)
+++ activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/util/ResourceLoadingSslContext.java Fri Aug 23 21:27:27 2013
@@ -59,11 +59,24 @@ public class ResourceLoadingSslContext e
     private String trustStorePassword;
 
     /**
+     * JSR-250 callback wrapper; converts checked exceptions to runtime exceptions
+     *
+     * delegates to afterPropertiesSet, done to prevent backwards incompatible signature change.
+     */
+    @PostConstruct
+    private void postConstruct() {
+        try {
+            afterPropertiesSet();
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    /**
      *
      * @throws Exception
      * @org.apache.xbean.InitMethod
      */
-    @PostConstruct
     public void afterPropertiesSet() throws Exception {
         keyManagers.addAll(createKeyManagers());
         trustManagers.addAll(createTrustManagers());