I can imagine it is hard. ActiveMQ is not very OSGi friendly. We run it
for a long time in karaf already but there it is easier with the features.
I suggest to try eclipse paho. It is so much easier.
Christian
On 24.02.2017 09:34, Mestiri Meher wrote:
Because I did not succeeded in this, I had lot of issues between
dependencies, so with the maven stuff it did not took me more than 20
minutes to get it working.
2017-02-24 9:31 GMT+01:00 Christian Schneider <ch...@die-schneider.net
<mailto:ch...@die-schneider.net>>:
Why do you create a bundle from activemq? It already provides a
ready to use bundle.
If you want to know how to install it you can look at the apache
karaf feature for activemq below.
If you install these bundles you should be on the safe side.
What is hidden there is that it also needs some spring libs.
Eventually you can also leave out some of the bundles as they
might be optional.
Christian
karaf@root()> feature:info activemq-client
Feature activemq-client 5.14.3
Description:
ActiveMQ client libraries
Feature has no configuration
Feature has no configuration files
Feature depends on:
spring [3.2,4)
Feature contains followed bundles:
mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1
mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
mvn:org.apache.geronimo.specs/geronimo-j2ee-management_1.1_spec/1.0.1
mvn:org.jvnet.jaxb2_commons/jaxb2-basics-runtime/0.6.4
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl/2.2.11_1
mvn:org.apache.commons/commons-pool2/2.4.2
mvn:commons-net/commons-net/3.5
mvn:org.apache.zookeeper/zookeeper/3.4.6
mvn:org.apache.xbean/xbean-spring/4.2
mvn:org.apache.activemq/activemq-osgi/5.14.3
Feature has no conditionals.
On 24.02.2017 09:26, Mestiri Meher wrote:
Hello Randy,
Actually I was able to bundle the activeMq broker, and I suggest
you to do it without the enRoute framework, the easiest way is by
using maven and the maven-bundle-plugin which will allow you to
create a bundle from a maven project.
It's very handy once you want to osgfy an existing project too.
So what you need is bringing up the broker dependencies and run
it as an embedded broker like how it aws explained in the
activeMQ tuto
<http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html>
Regards,
Meher
2017-02-24 9:09 GMT+01:00 Randy Leonard
<randy.leonard....@gmail.com <mailto:randy.leonard....@gmail.com>>:
I am having an issue getting Apache MQ to work with OSGi
enRoute. I’ve stripped it down to just the following bnd.bnd
file:
———————————
Bundle-Version:1.0.0.${tstamp}
Bundle-Description: This is my description
Private-Package: com.xyz.event.mq.producer.provider
-buildpath: \
osgi.enroute.base.api;version=1.0,\
javax.jms-api,\
org.apache.activemq.activemq-osgi,\
com.xyz.event.mq.producer.api;version=latest
-testpath: osgi.enroute.junit.wrapper;version=4.12
-includeresource: {readme.md <http://readme.md>}
-runrequires: \
osgi.identity;filter:='(osgi.identity=org.apache.activemq.ac
<http://org.apache.activemq.ac>tivemq-osgi)',\
osgi.identity;filter:='(osgi.identity=javax.annotation-api)',\
osgi.identity;filter:='(osgi.identity=org.objectweb.asm)',\
osgi.identity;filter:='(&(osgi.identity=org.apache.felix.gogo.runtime)(version>=1.0.0))',\
osgi.identity;filter:='(&(osgi.identity=org.apache.felix.gogo.shell)(version>=1.0.0))',\
osgi.identity;filter:='(&(osgi.identity=org.apache.felix.gogo.command)(version>=1.0.0))',\
osgi.identity;filter:='(osgi.identity=org.apache.felix.scr)',\
osgi.identity;filter:='(&(osgi.identity=org.osgi.service.blueprint)(version>=1.0.2.201505202024))’
osgi.identity;filter:='(osgi.identity=com.xyz.event.mq
<http://com.xyz.event.mq>.producer.provider)'
-runbundles: \
com.xyz.event.mq.producer.provider;version=snapshot,\
org.apache.felix.configadmin;version='[1.8.8,1.8.9)',\
org.apache.felix.log;version='[1.0.1,1.0.2)',\
org.apache.felix.scr;version='[2.0.2,2.0.3)',\
org.eclipse.equinox.metatype;version='[1.4.100,1.4.101)',\
org.osgi.service.metatype;version='[1.3.0,1.3.1)'
Export-Package: \
com.xyz.event.mq.producer.api,\
com.xyz.event.mq.producer.api.dto
———————————
But I am still getting the following resolution errors:
———————————
Unable to resolve <<INITIAL>> version=null:
missing requirement com.xyz.event.mq.producer.provider
-> Unable to resolve com.xyz.event.mq.producer.provider
version=1.0.0.201702240740:
missing requirement org.apache.activemq;
version=[5.14.0,6.0.0)
-> Unable to resolve org.apache.activemq.activemq-osgi
version=5.14.3:
missing requirement org.osgi.service.blueprint;
version=[1.0.0,2.0.0)]]
———————————
This is confusing, as:
- 'org.apache.activemq.activemq-osgi' should resolve
‘ org.apache.activemq; version=[5.14.0,6.0.0)’
- ‘org.osgi.service.blueprint’ should certainly resolve
'org.osgi.service.blueprint; version=[1.0.0,2.0.0)]]'
Curious if anyone has been successful with Apache MQ within
enRoute and could share some ideas?
Thanks,
Randy
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org <mailto:osgi-dev@mail.osgi.org>
https://mail.osgi.org/mailman/listinfo/osgi-dev
<https://mail.osgi.org/mailman/listinfo/osgi-dev>
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org <mailto:osgi-dev@mail.osgi.org>
https://mail.osgi.org/mailman/listinfo/osgi-dev
<https://mail.osgi.org/mailman/listinfo/osgi-dev>
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com
_______________________________________________ OSGi Developer
Mail List osgi-dev@mail.osgi.org <mailto:osgi-dev@mail.osgi.org>
https://mail.osgi.org/mailman/listinfo/osgi-dev
<https://mail.osgi.org/mailman/listinfo/osgi-dev>
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev