diff --git a/activemq-karaf/pom.xml b/activemq-karaf/pom.xml
index 72e4704916..8582675bfe 100644
--- a/activemq-karaf/pom.xml
+++ b/activemq-karaf/pom.xml
@@ -55,6 +55,7 @@
org.slf4j
slf4j-api
+ test
org.slf4j
diff --git a/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml b/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml
index de5a2d8df3..f7e66ed342 100644
--- a/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml
+++ b/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml
@@ -20,16 +20,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/activemq-osgi/pom.xml b/activemq-osgi/pom.xml
index adb86c9cdc..33ce47647c 100644
--- a/activemq-osgi/pom.xml
+++ b/activemq-osgi/pom.xml
@@ -113,6 +113,18 @@
${project.groupId}
activemq-spring
+
+
+ org.osgi
+ org.osgi.core
+ provided
+
+
+
+ org.osgi
+ org.osgi.compendium
+ 4.2.0
+
diff --git a/activemq-karaf/src/main/java/org/apache/activemq/karaf/ActiveMQServiceFactory.java b/activemq-osgi/src/main/java/org/apache/activemq/osgi/ActiveMQServiceFactory.java
similarity index 96%
rename from activemq-karaf/src/main/java/org/apache/activemq/karaf/ActiveMQServiceFactory.java
rename to activemq-osgi/src/main/java/org/apache/activemq/osgi/ActiveMQServiceFactory.java
index 8aacc2d363..5a7682dbd0 100644
--- a/activemq-karaf/src/main/java/org/apache/activemq/karaf/ActiveMQServiceFactory.java
+++ b/activemq-osgi/src/main/java/org/apache/activemq/osgi/ActiveMQServiceFactory.java
@@ -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 implements ManagedServiceFactory {
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);