activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r916678 - in /activemq/branches/activemq-5.3: ./ activemq-all/ activemq-camel/ activemq-camel/src/main/java/org/apache/activemq/camel/component/ activemq-core/ activemq-core/src/main/java/org/apache/activemq/broker/ activemq-core/src/main/j...
Date Fri, 26 Feb 2010 13:42:35 GMT
Author: dejanb
Date: Fri Feb 26 13:42:34 2010
New Revision: 916678

URL: http://svn.apache.org/viewvc?rev=916678&view=rev
Log:
merging 908182,908373 - https://issues.apache.org/activemq/browse/AMQ-2601 - Make amq blueprint
friendly

Modified:
    activemq/branches/activemq-5.3/activemq-all/pom.xml
    activemq/branches/activemq-5.3/activemq-camel/pom.xml
    activemq/branches/activemq-5.3/activemq-camel/src/main/java/org/apache/activemq/camel/component/CamelEndpointLoader.java
    activemq/branches/activemq-5.3/activemq-core/pom.xml
    activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
    activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandAgent.java
    activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java
    activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMapEntry.java
    activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/spring/ActiveMQConnectionFactory.java
    activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/spring/ActiveMQXAConnectionFactory.java
    activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/spring/SpringSslContext.java
    activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/util/osgi/Activator.java
    activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java
    activemq/branches/activemq-5.3/activemq-pool/pom.xml
    activemq/branches/activemq-5.3/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnectionFactoryBean.java
    activemq/branches/activemq-5.3/pom.xml

Modified: activemq/branches/activemq-5.3/activemq-all/pom.xml
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-all/pom.xml?rev=916678&r1=916677&r2=916678&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-all/pom.xml (original)
+++ activemq/branches/activemq-5.3/activemq-all/pom.xml Fri Feb 26 13:42:34 2010
@@ -49,6 +49,10 @@
       <groupId>${pom.groupId}</groupId>
       <artifactId>kahadb</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-annotation_1.0_spec</artifactId>
+    </dependency>
   </dependencies>
 
   <build>
@@ -78,6 +82,7 @@
                   <include>org.apache.geronimo.specs:geronimo-jms_1.1_spec</include>
                   <include>org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec</include>
                   <include>org.apache.geronimo.specs:geronimo-j2ee-management_1.0_spec</include>
+                  <include>org.apache.geronimo.specs:geronimo-annotation_1.0_spec</include>
                   <include>commons-logging:commons-logging-api</include>
                 </includes>
               </artifactSet>

Modified: activemq/branches/activemq-5.3/activemq-camel/pom.xml
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-camel/pom.xml?rev=916678&r1=916677&r2=916678&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-camel/pom.xml (original)
+++ activemq/branches/activemq-5.3/activemq-camel/pom.xml Fri Feb 26 13:42:34 2010
@@ -100,6 +100,11 @@
       <groupId>${pom.groupId}</groupId>
       <artifactId>activemq-pool</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-annotation_1.0_spec</artifactId>
+      <optional>true</optional>
+    </dependency>
 
     <!-- testing helpers -->
     <dependency>

Modified: activemq/branches/activemq-5.3/activemq-camel/src/main/java/org/apache/activemq/camel/component/CamelEndpointLoader.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-camel/src/main/java/org/apache/activemq/camel/component/CamelEndpointLoader.java?rev=916678&r1=916677&r2=916678&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-camel/src/main/java/org/apache/activemq/camel/component/CamelEndpointLoader.java
(original)
+++ activemq/branches/activemq-5.3/activemq-camel/src/main/java/org/apache/activemq/camel/component/CamelEndpointLoader.java
Fri Feb 26 13:42:34 2010
@@ -19,6 +19,8 @@
 
 import java.util.Set;
 
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
 
@@ -37,15 +39,14 @@
 import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.springframework.beans.factory.DisposableBean;
-import org.springframework.beans.factory.InitializingBean;
 
 /**
  * A helper bean which populates a {@link CamelContext} with ActiveMQ Queue endpoints
  *
  * @version $Revision: 1.1 $
+ * @org.apache.xbean.XBean
  */
-public class CamelEndpointLoader implements InitializingBean, DisposableBean, CamelContextAware
{
+public class CamelEndpointLoader implements CamelContextAware {
     private static final transient Log LOG = LogFactory.getLog(CamelEndpointLoader.class);
     private CamelContext camelContext;
     private EnhancedConnection connection;
@@ -59,6 +60,12 @@
         this.camelContext = camelContext;
     }
 
+    /**
+     *
+     * @throws Exception
+     * @org.apache.xbean.InitMethod
+     */
+    @PostConstruct
     public void afterPropertiesSet() throws Exception {
         ObjectHelper.notNull(camelContext, "camelContext");
         if (connection == null) {
@@ -112,6 +119,13 @@
         }
     }
 
+
+    /**
+     *
+     * @throws Exception
+     * @org.apache.xbean.DestroyMethod
+     */
+    @PreDestroy
     public void destroy() throws Exception {
         if (connection != null) {
             connection.close();

Modified: activemq/branches/activemq-5.3/activemq-core/pom.xml
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/pom.xml?rev=916678&r1=916677&r2=916678&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/pom.xml (original)
+++ activemq/branches/activemq-5.3/activemq-core/pom.xml Fri Feb 26 13:42:34 2010
@@ -137,6 +137,11 @@
     </dependency>
     <dependency>
       <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-annotation_1.0_spec</artifactId>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
       <artifactId>geronimo-jacc_1.1_spec</artifactId>
       <optional>true</optional>
     </dependency>
@@ -174,11 +179,9 @@
       <optional>true</optional>
     </dependency>
     <dependency>
-    <groupId>commons-net</groupId>
-    <artifactId>commons-net</artifactId>
-    
-</dependency>
-
+      <groupId>commons-net</groupId>
+      <artifactId>commons-net</artifactId>
+    </dependency>
 
     <!-- not really a dependency at all - just added optionally to get the generator working
-->
     <dependency>
@@ -297,7 +300,7 @@
 
   </dependencies>
 
-    <reporting>
+  <reporting>
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
@@ -384,6 +387,28 @@
     
   <build>
     <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <version>${felix-version}</version>
+        <extensions>true</extensions>
+        <configuration>
+          <instructions>
+            <Bundle-Activator>org.apache.activemq.util.osgi.Activator</Bundle-Activator>
+            <Bundle-Name>${artifactId}</Bundle-Name>
+            <Bundle-SymbolicName>${activemq.osgi.symbolic.name}</Bundle-SymbolicName>
+            <Export-Package>${activemq.osgi.export}</Export-Package>
+            <Import-Package>${activemq.osgi.import}</Import-Package>
+            <DynamicImport-Package>${activemq.osgi.dynamic.import}</DynamicImport-Package>
+            <Private-Package>${activemq.osgi.private.pkg}</Private-Package>
+            <Implementation-Title>Apache ActiveMQ</Implementation-Title>
+            <Implementation-Version>${project.version}</Implementation-Version>
+            <_versionpolicy>[$(version;==;$(@)),$(version;=+;$(@)))</_versionpolicy>
+            <_failok>${servicemix.osgi.failok}</_failok>
+          </instructions>
+        </configuration>
+      </plugin>
+      
       <!-- Configure which tests are included/excuded -->
       <plugin>
         <artifactId>maven-surefire-plugin</artifactId>

Modified: activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java?rev=916678&r1=916677&r2=916678&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
(original)
+++ activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Fri Feb 26 13:42:34 2010
@@ -32,6 +32,8 @@
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 
@@ -99,6 +101,7 @@
  * which can be used to configure the broker as its lazily created.
  * 
  * @version $Revision: 1.1 $
+ * @org.apache.xbean.XBean
  */
 public class BrokerService implements Service {
     protected CountDownLatch slaveStartSignal = new CountDownLatch(1);
@@ -430,6 +433,13 @@
 
     // Service interface
     // -------------------------------------------------------------------------
+
+    /**
+     *
+     * @throws Exception
+     * @org. apache.xbean.InitMethod
+     */
+    @PostConstruct
     public void start() throws Exception {
         if (stopped.get() || !started.compareAndSet(false, true)) {
             // lets just ignore redundant start() calls
@@ -505,6 +515,12 @@
         }
     }
 
+    /**
+     *
+     * @throws Exception
+     * @org.apache .xbean.DestroyMethod
+     */
+    @PreDestroy
     public void stop() throws Exception {
         if (!started.get()) {
             return;

Modified: activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandAgent.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandAgent.java?rev=916678&r1=916677&r2=916678&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandAgent.java
(original)
+++ activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/util/CommandAgent.java
Fri Feb 26 13:42:34 2010
@@ -16,6 +16,8 @@
  */
 package org.apache.activemq.broker.util;
 
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
 import javax.jms.Destination;
@@ -23,16 +25,12 @@
 import javax.jms.JMSException;
 import javax.jms.MessageConsumer;
 import javax.jms.Session;
-
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.Service;
 import org.apache.activemq.advisory.AdvisorySupport;
 import org.apache.activemq.util.ServiceStopper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.springframework.beans.factory.DisposableBean;
-import org.springframework.beans.factory.FactoryBean;
-import org.springframework.beans.factory.InitializingBean;
 
 /**
  * An agent which listens to commands on a JMS destination
@@ -40,7 +38,7 @@
  * @version $Revision$
  * @org.apache.xbean.XBean
  */
-public class CommandAgent implements Service, InitializingBean, DisposableBean, FactoryBean,
ExceptionListener {
+public class CommandAgent implements Service, ExceptionListener {
     private static final Log LOG = LogFactory.getLog(CommandAgent.class);
 
     private String brokerUrl = "vm://localhost";
@@ -53,6 +51,12 @@
     private Session session;
     private MessageConsumer consumer;
 
+    /**
+     *
+     * @throws Exception
+     * @org.apache.xbean.InitMethod
+     */
+    @PostConstruct
     public void start() throws Exception {
         session = getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
         listener = new CommandMessageListener(session);
@@ -64,6 +68,12 @@
         consumer.setMessageListener(listener);
     }
 
+    /**
+     *
+     * @throws Exception
+     * @org.apache.xbean.DestroyMethod
+     */
+    @PreDestroy
     public void stop() throws Exception {
         ServiceStopper stopper = new ServiceStopper();
         if (consumer != null) {
@@ -93,29 +103,6 @@
         stopper.throwFirstException();
     }
 
-    // the following methods ensure that we are created on startup and the
-    // lifecycles respected
-    // TODO there must be a simpler way?
-    public void afterPropertiesSet() throws Exception {
-        start();
-    }
-
-    public void destroy() throws Exception {
-        stop();
-    }
-
-    public Object getObject() throws Exception {
-        return this;
-    }
-
-    public Class getObjectType() {
-        return getClass();
-    }
-
-    public boolean isSingleton() {
-        return true;
-    }
-
     // Properties
     // -------------------------------------------------------------------------
     public String getBrokerUrl() {

Modified: activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java?rev=916678&r1=916677&r2=916678&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java
(original)
+++ activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java
Fri Feb 26 13:42:34 2010
@@ -18,7 +18,7 @@
 
 import java.io.IOException;
 import java.util.Set;
-
+import javax.annotation.PostConstruct;
 import org.apache.activemq.broker.BrokerPluginSupport;
 import org.apache.activemq.broker.Connection;
 import org.apache.activemq.broker.ConnectionContext;
@@ -45,7 +45,6 @@
 import org.apache.activemq.usage.Usage;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.springframework.beans.factory.InitializingBean;
 
 /**
  * A simple Broker intercepter which allows you to enable/disable logging.
@@ -53,8 +52,7 @@
  * @org.apache.xbean.XBean
  */
 
-public class LoggingBrokerPlugin extends BrokerPluginSupport implements
-        InitializingBean {
+public class LoggingBrokerPlugin extends BrokerPluginSupport {
 
     private static final Log LOG = LogFactory.getLog(LoggingBrokerPlugin.class);
 
@@ -66,6 +64,12 @@
     private boolean logProducerEvents = false;
     private boolean logInternalEvents = false;
 
+    /**
+     *
+     * @throws Exception
+     * @org.apache.xbean.InitMethod
+     */
+    @PostConstruct
     public void afterPropertiesSet() throws Exception {
         LOG.info("Created LoggingBrokerPlugin: " + this.toString());
     }

Modified: activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMapEntry.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMapEntry.java?rev=916678&r1=916677&r2=916678&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMapEntry.java
(original)
+++ activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/filter/DestinationMapEntry.java
Fri Feb 26 13:42:34 2010
@@ -16,18 +16,19 @@
  */
 package org.apache.activemq.filter;
 
+import javax.annotation.PostConstruct;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.command.ActiveMQTopic;
-import org.springframework.beans.factory.InitializingBean;
 
 /**
  * A base class for entry objects used to construct a destination based policy
  * map.
  * 
  * @version $Revision: 1.1 $
+ * @org.apache.xbean.XBean
  */
-public abstract class DestinationMapEntry implements InitializingBean, Comparable {
+public abstract class DestinationMapEntry implements Comparable {
 
     private ActiveMQDestination destination;
 
@@ -64,6 +65,12 @@
         this.destination = destination;
     }
 
+    /**
+     *
+     * @throws Exception
+     * @org.apache.xbean.InitMethod
+     */
+    @PostConstruct
     public void afterPropertiesSet() throws Exception {
         if (destination == null) {
             throw new IllegalArgumentException("You must specify the 'destination' property");

Modified: activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/spring/ActiveMQConnectionFactory.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/spring/ActiveMQConnectionFactory.java?rev=916678&r1=916677&r2=916678&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/spring/ActiveMQConnectionFactory.java
(original)
+++ activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/spring/ActiveMQConnectionFactory.java
Fri Feb 26 13:42:34 2010
@@ -16,8 +16,8 @@
  */
 package org.apache.activemq.spring;
 
+import javax.annotation.PostConstruct;
 import org.springframework.beans.factory.BeanNameAware;
-import org.springframework.beans.factory.InitializingBean;
 
 /**
  * A <a href="http://www.springframework.org/">Spring</a> enhanced connection
@@ -29,11 +29,17 @@
  * 
  * @version $Revision: $
  */
-public class ActiveMQConnectionFactory extends org.apache.activemq.ActiveMQConnectionFactory
implements InitializingBean, BeanNameAware {
+public class ActiveMQConnectionFactory extends org.apache.activemq.ActiveMQConnectionFactory
implements BeanNameAware {
 
     private String beanName;
     private boolean useBeanNameAsClientIdPrefix;
     
+    /**
+     *
+     * @throws Exception
+     * @org.apache.xbean.InitMethod
+     */
+    @PostConstruct
     public void afterPropertiesSet() throws Exception {
         if (isUseBeanNameAsClientIdPrefix() && getClientIDPrefix() == null) {
             setClientIDPrefix(getBeanName());

Modified: activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/spring/ActiveMQXAConnectionFactory.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/spring/ActiveMQXAConnectionFactory.java?rev=916678&r1=916677&r2=916678&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/spring/ActiveMQXAConnectionFactory.java
(original)
+++ activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/spring/ActiveMQXAConnectionFactory.java
Fri Feb 26 13:42:34 2010
@@ -16,8 +16,8 @@
  */
 package org.apache.activemq.spring;
 
+import javax.annotation.PostConstruct;
 import org.springframework.beans.factory.BeanNameAware;
-import org.springframework.beans.factory.InitializingBean;
 
 /**
  * A <a href="http://www.springframework.org/">Spring</a> enhanced XA connection
@@ -29,11 +29,17 @@
  * 
  * @version $Revision: $
  */
-public class ActiveMQXAConnectionFactory extends org.apache.activemq.ActiveMQXAConnectionFactory
implements InitializingBean, BeanNameAware {
+public class ActiveMQXAConnectionFactory extends org.apache.activemq.ActiveMQXAConnectionFactory
implements BeanNameAware {
 
     private String beanName;
     private boolean useBeanNameAsClientIdPrefix;
     
+    /**
+     *
+     * @throws Exception
+     * @org.apache.xbean.InitMethod
+     */
+    @PostConstruct
     public void afterPropertiesSet() throws Exception {
         if (isUseBeanNameAsClientIdPrefix() && getClientIDPrefix() == null) {
             setClientIDPrefix(getBeanName());

Modified: activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/spring/SpringSslContext.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/spring/SpringSslContext.java?rev=916678&r1=916677&r2=916678&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/spring/SpringSslContext.java
(original)
+++ activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/spring/SpringSslContext.java
Fri Feb 26 13:42:34 2010
@@ -24,13 +24,12 @@
 import java.util.Arrays;
 import java.util.Collection;
 
+import javax.annotation.PostConstruct;
 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;
-import org.springframework.beans.factory.InitializingBean;
 import org.springframework.core.io.Resource;
 
 /**
@@ -40,7 +39,7 @@
  * 
  * @version $Revision$
  */
-public class SpringSslContext extends SslContext implements InitializingBean {    
+public class SpringSslContext extends SslContext {    
     
     private String keyStoreType="jks";
     private String trustStoreType="jks";
@@ -55,6 +54,12 @@
     private String keyStorePassword;
     private String trustStorePassword;
 
+    /**
+     *
+     * @throws Exception
+     * @org.apache.xbean.InitMethod
+     */
+    @PostConstruct
     public void afterPropertiesSet() throws Exception {
         keyManagers.addAll(createKeyManagers());
         trustManagers.addAll(createTrustManagers());

Modified: activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/util/osgi/Activator.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/util/osgi/Activator.java?rev=916678&r1=916677&r2=916678&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/util/osgi/Activator.java
(original)
+++ activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/util/osgi/Activator.java
Fri Feb 26 13:42:34 2010
@@ -39,7 +39,7 @@
 
 /**
  * An OSGi bundle activator for ActiveMQ which adapts the {@link org.apache.activemq.util.FactoryFinder}
- * to the OSGi enviorment.
+ * to the OSGi environment.
  *
  */
 public class Activator implements BundleActivator, SynchronousBundleListener, ObjectFactory
{

Modified: activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java?rev=916678&r1=916677&r2=916678&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java
(original)
+++ activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java
Fri Feb 26 13:42:34 2010
@@ -18,6 +18,8 @@
 
 import java.io.IOException;
 
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.usage.SystemUsage;
 import org.apache.commons.logging.Log;
@@ -45,7 +47,7 @@
  * {code}
  * @version $Revision: 1.1 $
  */
-public class XBeanBrokerService extends BrokerService implements InitializingBean, DisposableBean,
ApplicationContextAware {
+public class XBeanBrokerService extends BrokerService implements ApplicationContextAware
{
     private static final transient Log LOG = LogFactory.getLog(XBeanBrokerService.class);
     
     private boolean start = true;
@@ -55,6 +57,12 @@
     public XBeanBrokerService() {
     }
 
+    /**
+     *
+     * @throws Exception
+     * @org.apache.xbean.InitMethod
+     */
+    @PostConstruct
     public void afterPropertiesSet() throws Exception {
         ensureSystemUsageHasStore();
         if (start) {
@@ -89,6 +97,12 @@
         }
     }
 
+    /**
+     *
+     * @throws Exception
+     * @org.apache.xbean.DestroyMethod
+     */
+    @PreDestroy
     public void destroy() throws Exception {
         stop();
     }

Modified: activemq/branches/activemq-5.3/activemq-pool/pom.xml
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-pool/pom.xml?rev=916678&r1=916677&r2=916678&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-pool/pom.xml (original)
+++ activemq/branches/activemq-5.3/activemq-pool/pom.xml Fri Feb 26 13:42:34 2010
@@ -71,6 +71,11 @@
       <artifactId>geronimo-jta_1.0.1B_spec</artifactId>
     </dependency>
     <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-annotation_1.0_spec</artifactId>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
       <groupId>commons-pool</groupId>
       <artifactId>commons-pool</artifactId>
     </dependency>

Modified: activemq/branches/activemq-5.3/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnectionFactoryBean.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnectionFactoryBean.java?rev=916678&r1=916677&r2=916678&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnectionFactoryBean.java
(original)
+++ activemq/branches/activemq-5.3/activemq-pool/src/main/java/org/apache/activemq/pool/PooledConnectionFactoryBean.java
Fri Feb 26 13:42:34 2010
@@ -16,15 +16,13 @@
  */
 package org.apache.activemq.pool;
 
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
 import javax.jms.ConnectionFactory;
 import javax.transaction.TransactionManager;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.commons.pool.ObjectPoolFactory;
-import org.springframework.beans.factory.FactoryBean;
-import org.springframework.beans.factory.InitializingBean;
-import org.springframework.beans.factory.DisposableBean;
 
 /**
  * Simple factory bean used to create a jencks connection pool.
@@ -43,8 +41,9 @@
  * the same value than its <code>resourceName</code> property. This will make
sure the transaction manager
  * maps correctly the connection factory to the recovery process.
  *
+ * @org.apache.xbean.XBean
  */
-public class PooledConnectionFactoryBean implements FactoryBean, InitializingBean, DisposableBean
{
+public class PooledConnectionFactoryBean {
 
     private static final Log LOGGER = LogFactory.getLog(PooledConnectionFactoryBean.class);
 
@@ -56,18 +55,6 @@
     private String resourceName;
     private ObjectPoolFactory poolFactory;
 
-    public Object getObject() throws Exception {
-        return pooledConnectionFactory;
-    }
-
-    public Class getObjectType() {
-        return ConnectionFactory.class;
-    }
-
-    public boolean isSingleton() {
-        return true;
-    }
-
     public int getMaxConnections() {
         return maxConnections;
     }
@@ -116,6 +103,12 @@
         this.poolFactory = poolFactory;
     }
 
+    /**
+     *
+     * @throws Exception
+     * @org.apache.xbean.InitMethod
+     */
+    @PostConstruct
     public void afterPropertiesSet() throws Exception {
         if (pooledConnectionFactory == null && transactionManager != null &&
resourceName != null) {
             try {
@@ -164,6 +157,12 @@
         }
     }
 
+    /**
+     *
+     * @throws Exception
+     * @org.apache.xbean.DestroyMethod
+     */
+    @PreDestroy
     public void destroy() throws Exception {
         if (pooledConnectionFactory != null) {
             pooledConnectionFactory.stop();

Modified: activemq/branches/activemq-5.3/pom.xml
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/pom.xml?rev=916678&r1=916677&r2=916678&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/pom.xml (original)
+++ activemq/branches/activemq-5.3/pom.xml Fri Feb 26 13:42:34 2010
@@ -379,6 +379,12 @@
         <artifactId>geronimo-servlet_2.5_spec</artifactId>
         <version>1.2</version>
       </dependency>
+      
+      <dependency>
+        <groupId>org.apache.geronimo.specs</groupId>
+        <artifactId>geronimo-annotation_1.0_spec</artifactId>
+        <version>1.1.1</version>
+      </dependency>
 
 
       <!-- =============================== -->



Mime
View raw message