activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1436831 - in /activemq/trunk: activemq-karaf/ activemq-karaf/src/main/java/org/apache/activemq/karaf/ activemq-karaf/src/main/resources/OSGI-INF/blueprint/ activemq-osgi/ activemq-osgi/src/main/java/org/ activemq-osgi/src/main/java/org/apa...
Date Tue, 22 Jan 2013 10:39:23 GMT
Author: dejanb
Date: Tue Jan 22 10:39:23 2013
New Revision: 1436831

URL: http://svn.apache.org/viewvc?rev=1436831&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-4034 - moving service factory to activemq-osgi module

Added:
    activemq/trunk/activemq-osgi/src/main/java/org/
    activemq/trunk/activemq-osgi/src/main/java/org/apache/
    activemq/trunk/activemq-osgi/src/main/java/org/apache/activemq/
    activemq/trunk/activemq-osgi/src/main/java/org/apache/activemq/osgi/
    activemq/trunk/activemq-osgi/src/main/java/org/apache/activemq/osgi/ActiveMQServiceFactory.java
      - copied, changed from r1436827, activemq/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/ActiveMQServiceFactory.java
Removed:
    activemq/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/ActiveMQServiceFactory.java
Modified:
    activemq/trunk/activemq-karaf/pom.xml
    activemq/trunk/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml
    activemq/trunk/activemq-osgi/pom.xml

Modified: activemq/trunk/activemq-karaf/pom.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-karaf/pom.xml?rev=1436831&r1=1436830&r2=1436831&view=diff
==============================================================================
--- activemq/trunk/activemq-karaf/pom.xml (original)
+++ activemq/trunk/activemq-karaf/pom.xml Tue Jan 22 10:39:23 2013
@@ -55,6 +55,7 @@
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-api</artifactId>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>

Modified: activemq/trunk/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml?rev=1436831&r1=1436830&r2=1436831&view=diff
==============================================================================
--- activemq/trunk/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml
(original)
+++ activemq/trunk/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml
Tue Jan 22 10:39:23 2013
@@ -20,16 +20,6 @@
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
            xmlns:shell="http://karaf.apache.org/xmlns/shell/v1.0.0">
 
-    <bean id="activeMQServiceFactory" class="org.apache.activemq.karaf.ActiveMQServiceFactory"
destroy-method="destroy">
-      <property name="bundleContext" ref="blueprintBundleContext"/>
-    </bean>
-
-    <service ref="activeMQServiceFactory" interface="org.osgi.service.cm.ManagedServiceFactory">
-      <service-properties>
-        <entry key="service.pid" value="org.apache.activemq.server"/>
-      </service-properties>
-    </service>
-
     <shell:command-bundle>
 
         <shell:command name="activemq/create-broker">

Modified: activemq/trunk/activemq-osgi/pom.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-osgi/pom.xml?rev=1436831&r1=1436830&r2=1436831&view=diff
==============================================================================
--- activemq/trunk/activemq-osgi/pom.xml (original)
+++ activemq/trunk/activemq-osgi/pom.xml Tue Jan 22 10:39:23 2013
@@ -113,6 +113,18 @@
         <groupId>${project.groupId}</groupId>
         <artifactId>activemq-spring</artifactId>
       </dependency>
+
+      <dependency>
+          <groupId>org.osgi</groupId>
+          <artifactId>org.osgi.core</artifactId>
+          <scope>provided</scope>
+      </dependency>
+
+      <dependency>
+        <groupId>org.osgi</groupId>
+        <artifactId>org.osgi.compendium</artifactId>
+        <version>4.2.0</version>
+      </dependency>
     
   </dependencies>
 

Copied: activemq/trunk/activemq-osgi/src/main/java/org/apache/activemq/osgi/ActiveMQServiceFactory.java
(from r1436827, activemq/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/ActiveMQServiceFactory.java)
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-osgi/src/main/java/org/apache/activemq/osgi/ActiveMQServiceFactory.java?p2=activemq/trunk/activemq-osgi/src/main/java/org/apache/activemq/osgi/ActiveMQServiceFactory.java&p1=activemq/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/ActiveMQServiceFactory.java&r1=1436827&r2=1436831&rev=1436831&view=diff
==============================================================================
--- activemq/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/ActiveMQServiceFactory.java
(original)
+++ activemq/trunk/activemq-osgi/src/main/java/org/apache/activemq/osgi/ActiveMQServiceFactory.java
Tue Jan 22 10:39:23 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.activemq.karaf;
+package org.apache.activemq.osgi;
 
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.spring.Utils;
@@ -27,10 +27,8 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
 import org.springframework.core.io.Resource;
 
-import java.util.Arrays;
 import java.util.Dictionary;
 import java.util.HashMap;
-import java.util.Map;
 
 public class ActiveMQServiceFactory implements ManagedServiceFactory {
 
@@ -51,9 +49,13 @@ public class ActiveMQServiceFactory impl
             throw new ConfigurationException("config", "Property must be set");
         }
         String name = (String)properties.get("broker-name");
-        if (config == null) {
+        if (name == null) {
             throw new ConfigurationException("broker-name", "Property must be set");
         }
+
+        LOG.info("Starting broker " + name);
+        //TODO properties
+
         try {
             Thread.currentThread().setContextClassLoader(BrokerService.class.getClassLoader());
             Resource resource = Utils.resourceFromString(config);



Mime
View raw message