You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by J Aaron Farr <fa...@apache.org> on 2009/09/04 15:17:18 UTC

karaf and activemq

I just got ActiveMQ running on Karaf (lastest svn).  It was not very
easy, so I'm sharing what I did and I'm looking for suggestions.

After checking out and building karaf from scratch, I started with these
instructions:

    http://activemq.apache.org/osgi-integration.html

Of course, they're old and don't help much.  But it did point me to the
service document [1] that let me download most of the bundles by hand:

    osgi:install mvn:org.apache.activemq/activemq-core/5.2.0
    osgi:install mvn:org.apache.activemq/activemq-ra/5.2.0
    ...

I did this for all the bundles in the `activemq` and `connector`
features expect for `org.apache.servicemix.activemq.commands`.

It was the 'transactions' feature that got me stuck.  I installed the
'felix-transaction' [2] plugin and most of the Spring Framework osgi
bundles [3] by hand.  But the place I kept getting stuck was with starting
the felix-transaction bundle.  I kept getting:
 
    java.lang.ClassNotFoundException: javax.transaction.TransactionManager

The problem was the same as described in [4] and [5], namely, I had
these packages in my system that were overriding the geronimo jta bundle
I had:

    System Bundle (0): javax.transaction; version=1.5.0
    System Bundle (0): javax.transaction.xa; version=1.5.0

After hours of wrestling with this, I cracked open the felix framework
jar, deleted all references to `javax.transaction` and then put it back
together again.

Once this was done, I could take a simple activemq configuration file
and drop it in `deploy/localhost-broker.xml` and everything worked.

Surely there must be a better way...

I'm not sure if this info is useful on the felix list, or the activemq
list or the servicemix list or even the geronimo list, so feel free to
forward (me or the message) as necessary.

-- 
   J. Aaron Farr
   馮傑仁
   www.cubiclemuses.com

[1] http://repo2.maven.org/maven2/org/apache/servicemix/apache-servicemix/4.0.0/apache-servicemix-4.0.0-features.xml
[2] https://svn.apache.org/repos/asf/felix/trunk/transaction/org.apache.felix.transaction/
[3] http://www.springsource.org/osgi
[4] http://www.mail-archive.com/dev@geronimo.apache.org/msg70777.html
[5] http://mail-archives.apache.org/mod_mbox/felix-users/200902.mbox/%3C499ED895.20506@ungoverned.org%3E

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: karaf and activemq

Posted by Charles Moulliard <cm...@gmail.com>.
Interesting idea. I will have a look on "
http://paxrunner.ops4j.org/display/paxrunner/Advanced+profiles+topics" to
see How to create a transaction and activemq profiles

When a profile is created, How can I deploy it top of Apache Felix Karaf ?


Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com


On Fri, Sep 4, 2009 at 5:13 PM, Alin Dreghiciu <ad...@gmail.com> wrote:

> Charles,
> Why don't you create Pax Runner profiles for this so people could easy
> start
> it up?
>
> On Fri, Sep 4, 2009 at 4:35 PM, Charles Moulliard <cmoulliard@gmail.com
> >wrote:
>
> > Hi Aaron,
> >
> > All the bundles that you need to run ActiveMq in transaction mode are
> > defined here in my tutorial :
> > http://camel.apache.org/tutorial-osgi-camel-part2c.html
> >
> > Take a look to the feature : transaction, activemq and connector
> >
> > I currently use in SMX4 (now Apache Felix Karaf) activemq with the
> geronimo
> > transaction manager. Everything works fine
> >
> > For Apache Felix Karaf, here is my list of bundle :
> >
> >    <feature name="transaction">
> >
> >
> <bundle>mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
> >
> >
> >
> <bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0</bundle>
> >
> >
> >
> <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.howl/1.0.1-1_1</bundle>
> >
> >
> >
> <bundle>mvn:org.apache.geronimo.components/geronimo-transaction/2.2-r634076</bundle>
> >        <bundle>mvn:org.springframework/spring-tx/2.5.6.SEC01</bundle>
> >
> >
> >
> <bundle>mvn:org.apache.felix/org.apache.felix.transaction/0.9.0-SNAPSHOT</bundle>
> >    </feature>
> >
> >    <feature name="connector">
> >        <feature>transaction</feature>
> >
> >
> >
> <bundle>mvn:org.apache.geronimo.components/geronimo-connector/2.2-r634076</bundle>
> >
> >
> <bundle>mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1</bundle>
> >
> >
> >
> <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jencks/2.1_1</bundle>
> >    </feature>
> >
> >
> >    <feature name="activemq" version="5.2.0">
> >        <feature>connector</feature>
> >
> >
> >
> <bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-management_1.1_spec/1.0.1</bundle>
> >        <bundle>mvn:org.apache.xbean/xbean-spring/3.4.3</bundle>
> >        <bundle>mvn:org.apache.activemq/activemq-core/5.2.0</bundle>
> >        <bundle>mvn:org.apache.activemq/activemq-ra/5.2.0</bundle>
> >        <bundle>mvn:org.apache.activemq/activemq-console/5.2.0</bundle>
> >        <bundle>mvn:org.apache.activemq/activemq-pool/5.2.0</bundle>
> >    </feature>
> >
> > Regards,
> >
> > Charles Moulliard
> > Senior Enterprise Architect
> > Apache Camel Committer
> >
> > *****************************
> > blog : http://cmoulliard.blogspot.com
> >
> >
> > On Fri, Sep 4, 2009 at 3:17 PM, J Aaron Farr <fa...@apache.org> wrote:
> >
> > >
> > > I just got ActiveMQ running on Karaf (lastest svn).  It was not very
> > > easy, so I'm sharing what I did and I'm looking for suggestions.
> > >
> > > After checking out and building karaf from scratch, I started with
> these
> > > instructions:
> > >
> > >    http://activemq.apache.org/osgi-integration.html
> > >
> > > Of course, they're old and don't help much.  But it did point me to the
> > > service document [1] that let me download most of the bundles by hand:
> > >
> > >    osgi:install mvn:org.apache.activemq/activemq-core/5.2.0
> > >    osgi:install mvn:org.apache.activemq/activemq-ra/5.2.0
> > >    ...
> > >
> > > I did this for all the bundles in the `activemq` and `connector`
> > > features expect for `org.apache.servicemix.activemq.commands`.
> > >
> > > It was the 'transactions' feature that got me stuck.  I installed the
> > > 'felix-transaction' [2] plugin and most of the Spring Framework osgi
> > > bundles [3] by hand.  But the place I kept getting stuck was with
> > starting
> > > the felix-transaction bundle.  I kept getting:
> > >
> > >    java.lang.ClassNotFoundException:
> javax.transaction.TransactionManager
> > >
> > > The problem was the same as described in [4] and [5], namely, I had
> > > these packages in my system that were overriding the geronimo jta
> bundle
> > > I had:
> > >
> > >    System Bundle (0): javax.transaction; version=1.5.0
> > >    System Bundle (0): javax.transaction.xa; version=1.5.0
> > >
> > > After hours of wrestling with this, I cracked open the felix framework
> > > jar, deleted all references to `javax.transaction` and then put it back
> > > together again.
> > >
> > > Once this was done, I could take a simple activemq configuration file
> > > and drop it in `deploy/localhost-broker.xml` and everything worked.
> > >
> > > Surely there must be a better way...
> > >
> > > I'm not sure if this info is useful on the felix list, or the activemq
> > > list or the servicemix list or even the geronimo list, so feel free to
> > > forward (me or the message) as necessary.
> > >
> > > --
> > >   J. Aaron Farr
> > >   馮傑仁
> > >   www.cubiclemuses.com
> > >
> > > [1]
> > >
> >
> http://repo2.maven.org/maven2/org/apache/servicemix/apache-servicemix/4.0.0/apache-servicemix-4.0.0-features.xml
> > > [2]
> > >
> >
> https://svn.apache.org/repos/asf/felix/trunk/transaction/org.apache.felix.transaction/
> > > [3] http://www.springsource.org/osgi
> > > [4] http://www.mail-archive.com/dev@geronimo.apache.org/msg70777.html
> > > [5]
> > >
> >
> http://mail-archives.apache.org/mod_mbox/felix-users/200902.mbox/%3C499ED895.20506@ungoverned.org%3E
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > > For additional commands, e-mail: users-help@felix.apache.org
> > >
> > >
> >
>
>
>
> --
> Alin Dreghiciu
> Software Developer
> My profile: http://www.linkedin.com/in/alindreghiciu
> My blog: http://adreghiciu.blogspot.com
> http://www.ops4j.org - New Energy for OSS Communities - Open Participation
> Software.
> http://www.qi4j.org - New Energy for Java - Domain Driven Development.
>

Re: karaf and activemq

Posted by Alin Dreghiciu <ad...@gmail.com>.
Charles,
Why don't you create Pax Runner profiles for this so people could easy start
it up?

On Fri, Sep 4, 2009 at 4:35 PM, Charles Moulliard <cm...@gmail.com>wrote:

> Hi Aaron,
>
> All the bundles that you need to run ActiveMq in transaction mode are
> defined here in my tutorial :
> http://camel.apache.org/tutorial-osgi-camel-part2c.html
>
> Take a look to the feature : transaction, activemq and connector
>
> I currently use in SMX4 (now Apache Felix Karaf) activemq with the geronimo
> transaction manager. Everything works fine
>
> For Apache Felix Karaf, here is my list of bundle :
>
>    <feature name="transaction">
>
> <bundle>mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
>
>
> <bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0</bundle>
>
>
> <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.howl/1.0.1-1_1</bundle>
>
>
> <bundle>mvn:org.apache.geronimo.components/geronimo-transaction/2.2-r634076</bundle>
>        <bundle>mvn:org.springframework/spring-tx/2.5.6.SEC01</bundle>
>
>
> <bundle>mvn:org.apache.felix/org.apache.felix.transaction/0.9.0-SNAPSHOT</bundle>
>    </feature>
>
>    <feature name="connector">
>        <feature>transaction</feature>
>
>
> <bundle>mvn:org.apache.geronimo.components/geronimo-connector/2.2-r634076</bundle>
>
> <bundle>mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1</bundle>
>
>
> <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jencks/2.1_1</bundle>
>    </feature>
>
>
>    <feature name="activemq" version="5.2.0">
>        <feature>connector</feature>
>
>
> <bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-management_1.1_spec/1.0.1</bundle>
>        <bundle>mvn:org.apache.xbean/xbean-spring/3.4.3</bundle>
>        <bundle>mvn:org.apache.activemq/activemq-core/5.2.0</bundle>
>        <bundle>mvn:org.apache.activemq/activemq-ra/5.2.0</bundle>
>        <bundle>mvn:org.apache.activemq/activemq-console/5.2.0</bundle>
>        <bundle>mvn:org.apache.activemq/activemq-pool/5.2.0</bundle>
>    </feature>
>
> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
>
>
> On Fri, Sep 4, 2009 at 3:17 PM, J Aaron Farr <fa...@apache.org> wrote:
>
> >
> > I just got ActiveMQ running on Karaf (lastest svn).  It was not very
> > easy, so I'm sharing what I did and I'm looking for suggestions.
> >
> > After checking out and building karaf from scratch, I started with these
> > instructions:
> >
> >    http://activemq.apache.org/osgi-integration.html
> >
> > Of course, they're old and don't help much.  But it did point me to the
> > service document [1] that let me download most of the bundles by hand:
> >
> >    osgi:install mvn:org.apache.activemq/activemq-core/5.2.0
> >    osgi:install mvn:org.apache.activemq/activemq-ra/5.2.0
> >    ...
> >
> > I did this for all the bundles in the `activemq` and `connector`
> > features expect for `org.apache.servicemix.activemq.commands`.
> >
> > It was the 'transactions' feature that got me stuck.  I installed the
> > 'felix-transaction' [2] plugin and most of the Spring Framework osgi
> > bundles [3] by hand.  But the place I kept getting stuck was with
> starting
> > the felix-transaction bundle.  I kept getting:
> >
> >    java.lang.ClassNotFoundException: javax.transaction.TransactionManager
> >
> > The problem was the same as described in [4] and [5], namely, I had
> > these packages in my system that were overriding the geronimo jta bundle
> > I had:
> >
> >    System Bundle (0): javax.transaction; version=1.5.0
> >    System Bundle (0): javax.transaction.xa; version=1.5.0
> >
> > After hours of wrestling with this, I cracked open the felix framework
> > jar, deleted all references to `javax.transaction` and then put it back
> > together again.
> >
> > Once this was done, I could take a simple activemq configuration file
> > and drop it in `deploy/localhost-broker.xml` and everything worked.
> >
> > Surely there must be a better way...
> >
> > I'm not sure if this info is useful on the felix list, or the activemq
> > list or the servicemix list or even the geronimo list, so feel free to
> > forward (me or the message) as necessary.
> >
> > --
> >   J. Aaron Farr
> >   馮傑仁
> >   www.cubiclemuses.com
> >
> > [1]
> >
> http://repo2.maven.org/maven2/org/apache/servicemix/apache-servicemix/4.0.0/apache-servicemix-4.0.0-features.xml
> > [2]
> >
> https://svn.apache.org/repos/asf/felix/trunk/transaction/org.apache.felix.transaction/
> > [3] http://www.springsource.org/osgi
> > [4] http://www.mail-archive.com/dev@geronimo.apache.org/msg70777.html
> > [5]
> >
> http://mail-archives.apache.org/mod_mbox/felix-users/200902.mbox/%3C499ED895.20506@ungoverned.org%3E
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
> >
>



-- 
Alin Dreghiciu
Software Developer
My profile: http://www.linkedin.com/in/alindreghiciu
My blog: http://adreghiciu.blogspot.com
http://www.ops4j.org - New Energy for OSS Communities - Open Participation
Software.
http://www.qi4j.org - New Energy for Java - Domain Driven Development.

Re: karaf and activemq

Posted by Charles Moulliard <cm...@gmail.com>.
The list of features/bundles that I copy/paste in this email is the one that
I use with Apache Felix Karaf (version builded in june) ;-)

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com


On Fri, Sep 4, 2009 at 4:04 PM, J Aaron Farr <fa...@apache.org> wrote:

>
> On Fri 04 Sep 2009 21:35, Charles Moulliard <cm...@gmail.com> wrote:
>
> > Hi Aaron,
> >
> > All the bundles that you need to run ActiveMq in transaction mode are
> > defined here in my tutorial :
> > http://camel.apache.org/tutorial-osgi-camel-part2c.html
> >
> > Take a look to the feature : transaction, activemq and connector
>
> Thanks, Charles.
>
> I started with something like this, but apparently there are enough
> changes between Karaf and SMX4 that it didn't work for me.
>
> --
>    J. Aaron Farr
>   馮傑仁
>   www.cubiclemuses.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: karaf and activemq

Posted by J Aaron Farr <fa...@apache.org>.
On Fri 04 Sep 2009 21:35, Charles Moulliard <cm...@gmail.com> wrote:

> Hi Aaron,
>
> All the bundles that you need to run ActiveMq in transaction mode are
> defined here in my tutorial :
> http://camel.apache.org/tutorial-osgi-camel-part2c.html
>
> Take a look to the feature : transaction, activemq and connector

Thanks, Charles.

I started with something like this, but apparently there are enough
changes between Karaf and SMX4 that it didn't work for me.

-- 
   J. Aaron Farr
   馮傑仁
   www.cubiclemuses.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: karaf and activemq

Posted by Charles Moulliard <cm...@gmail.com>.
Hi Aaron,

All the bundles that you need to run ActiveMq in transaction mode are
defined here in my tutorial :
http://camel.apache.org/tutorial-osgi-camel-part2c.html

Take a look to the feature : transaction, activemq and connector

I currently use in SMX4 (now Apache Felix Karaf) activemq with the geronimo
transaction manager. Everything works fine

For Apache Felix Karaf, here is my list of bundle :

    <feature name="transaction">

<bundle>mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>

<bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0</bundle>

<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.howl/1.0.1-1_1</bundle>

<bundle>mvn:org.apache.geronimo.components/geronimo-transaction/2.2-r634076</bundle>
        <bundle>mvn:org.springframework/spring-tx/2.5.6.SEC01</bundle>

<bundle>mvn:org.apache.felix/org.apache.felix.transaction/0.9.0-SNAPSHOT</bundle>
    </feature>

    <feature name="connector">
        <feature>transaction</feature>

<bundle>mvn:org.apache.geronimo.components/geronimo-connector/2.2-r634076</bundle>

<bundle>mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1</bundle>

<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jencks/2.1_1</bundle>
    </feature>


    <feature name="activemq" version="5.2.0">
        <feature>connector</feature>

<bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-management_1.1_spec/1.0.1</bundle>
        <bundle>mvn:org.apache.xbean/xbean-spring/3.4.3</bundle>
        <bundle>mvn:org.apache.activemq/activemq-core/5.2.0</bundle>
        <bundle>mvn:org.apache.activemq/activemq-ra/5.2.0</bundle>
        <bundle>mvn:org.apache.activemq/activemq-console/5.2.0</bundle>
        <bundle>mvn:org.apache.activemq/activemq-pool/5.2.0</bundle>
    </feature>

Regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com


On Fri, Sep 4, 2009 at 3:17 PM, J Aaron Farr <fa...@apache.org> wrote:

>
> I just got ActiveMQ running on Karaf (lastest svn).  It was not very
> easy, so I'm sharing what I did and I'm looking for suggestions.
>
> After checking out and building karaf from scratch, I started with these
> instructions:
>
>    http://activemq.apache.org/osgi-integration.html
>
> Of course, they're old and don't help much.  But it did point me to the
> service document [1] that let me download most of the bundles by hand:
>
>    osgi:install mvn:org.apache.activemq/activemq-core/5.2.0
>    osgi:install mvn:org.apache.activemq/activemq-ra/5.2.0
>    ...
>
> I did this for all the bundles in the `activemq` and `connector`
> features expect for `org.apache.servicemix.activemq.commands`.
>
> It was the 'transactions' feature that got me stuck.  I installed the
> 'felix-transaction' [2] plugin and most of the Spring Framework osgi
> bundles [3] by hand.  But the place I kept getting stuck was with starting
> the felix-transaction bundle.  I kept getting:
>
>    java.lang.ClassNotFoundException: javax.transaction.TransactionManager
>
> The problem was the same as described in [4] and [5], namely, I had
> these packages in my system that were overriding the geronimo jta bundle
> I had:
>
>    System Bundle (0): javax.transaction; version=1.5.0
>    System Bundle (0): javax.transaction.xa; version=1.5.0
>
> After hours of wrestling with this, I cracked open the felix framework
> jar, deleted all references to `javax.transaction` and then put it back
> together again.
>
> Once this was done, I could take a simple activemq configuration file
> and drop it in `deploy/localhost-broker.xml` and everything worked.
>
> Surely there must be a better way...
>
> I'm not sure if this info is useful on the felix list, or the activemq
> list or the servicemix list or even the geronimo list, so feel free to
> forward (me or the message) as necessary.
>
> --
>   J. Aaron Farr
>   馮傑仁
>   www.cubiclemuses.com
>
> [1]
> http://repo2.maven.org/maven2/org/apache/servicemix/apache-servicemix/4.0.0/apache-servicemix-4.0.0-features.xml
> [2]
> https://svn.apache.org/repos/asf/felix/trunk/transaction/org.apache.felix.transaction/
> [3] http://www.springsource.org/osgi
> [4] http://www.mail-archive.com/dev@geronimo.apache.org/msg70777.html
> [5]
> http://mail-archives.apache.org/mod_mbox/felix-users/200902.mbox/%3C499ED895.20506@ungoverned.org%3E
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: karaf and activemq

Posted by Guillaume Nodet <gn...@gmail.com>.
Right, at some point in the future, I expect karaf features to be replaced
by applications or subsystems as it will be defined by the OSGi EEG.  THis
should allow leveraging OBR (or whatever the OSGi alliance spec will be
named).

On Fri, Sep 4, 2009 at 16:50, Stuart McCulloch <mc...@gmail.com> wrote:

> 2009/9/4 Guillaume Nodet <gn...@gmail.com>
>
> > Right, and you can do that already.
> > There is obr url handler [1] that can be installed in OSGi, so that you
> > could write a features file with:
> >   <bundle>obr:activemq-core/5.2.0</bundle>
> >
> > There are two real problems I have with OBR.
> > The first one is that those repository descriptors are *huge*.  Here is a
> > list of existing repositories for example:
> > http://www.osgi.org/repository/repository.xml
> > http://www.knopflerfish.org/repo/bindex.xml
> > http://sigil.codecauldron.org/spring-external.obr
> > http://download.eclipse.org/releases/ganymede/repository.zip
> > http://dz.prosyst.com/pdoc/repository.xml
> > http://sigil.codecauldron.org/spring-release.obr
> >
> > The spring-external repository is more than 5Mb to download.   And you
> need
> > to parse this xml !
> >
> > The other problem is that locations in those descriptors are usually
> > absolute locations, thus you need to have access to the internet to be
> able
> > to leverage those (unless you want to rewrite them all).   This means
> that
> > some companies can't use them at all.
>
>
> or you could use a local repository manager (like Nexus) to cache the OBR
> content
> as it's requested and rewrite the descriptors so they use the locally
> cached
> bundles
> - that's what we do in Nexus Pro, and it solves a lot of the performance
> issues
>
>
> >   We therefore usually use maven style
> > urls, where you can actually change the maven repositories list in
> > etc/org.ops4j.pax.url.mvn.cfg, which means you can point to an internal
> > repository easily.
> >
>
> which is actually very similar to OBR, it's just a different form of
> metadata - in fact
> there's no reason why you can't have many small OBR files which are
> referenced
> from a top-level OBR, it's just that most people use a single index file.
>
> Those two things lead me to think that OBR is just unusable at runtime
> > (though it could really help at dev time with the right tools).  This
> lead
> > the path to the so called "features" in karaf.
> >
>
> the OBR spec is being updated so this might improve, but even so I still
> think the
> current OBR format is perfectly usable at runtime if you use a
> local/internal server
> (this is effectively what you're doing with the maven urls and an internal
> repository)
>
> [1] http://wiki.ops4j.org/display/paxurl/Obr+Protocol
> >
> > On Fri, Sep 4, 2009 at 15:58, J Aaron Farr <fa...@apache.org> wrote:
> >
> > >
> > > On Fri 04 Sep 2009 21:38, Guillaume Nodet <gn...@gmail.com> wrote:
> > >
> > > > There are multiple solutions to this problem, but the easiest one is
> to
> > > make
> > > > sure that the system bundle does not export those packages.
> > > > That's what i've done at [2] where you can see that the
> > javax.transaction
> > > > packages are commented, thus not exported.
> > > >
> > > > Hopes this help!
> > >
> > > It does.  I figured someone was working on updating the
> > > features/bundles, but I thought my notes might help.
> > >
> > > Speaking of making this simpler, while I really like the karaf
> > > "features" feature, shouldn't this sort of install be possible via OBR?
> > > That is, I install/activate the activemq bundle and OBR takes care of
> > > the rest?
> > >
> > > I've been out of osgi development for almost 2 years, so I'm still
> > > getting back up to speed on what's changed.
> > >
> > > --
> > >    J. Aaron Farr
> > >   馮傑仁
> > >   www.cubiclemuses.com
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > > For additional commands, e-mail: users-help@felix.apache.org
> > >
> > >
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Blog: http://gnodet.blogspot.com/
> > ------------------------
> > Open Source SOA
> > http://fusesource.com
> >
>
>
>
> --
> Cheers, Stuart
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: karaf and activemq

Posted by Stuart McCulloch <mc...@gmail.com>.
2009/9/4 Guillaume Nodet <gn...@gmail.com>

> Right, and you can do that already.
> There is obr url handler [1] that can be installed in OSGi, so that you
> could write a features file with:
>   <bundle>obr:activemq-core/5.2.0</bundle>
>
> There are two real problems I have with OBR.
> The first one is that those repository descriptors are *huge*.  Here is a
> list of existing repositories for example:
> http://www.osgi.org/repository/repository.xml
> http://www.knopflerfish.org/repo/bindex.xml
> http://sigil.codecauldron.org/spring-external.obr
> http://download.eclipse.org/releases/ganymede/repository.zip
> http://dz.prosyst.com/pdoc/repository.xml
> http://sigil.codecauldron.org/spring-release.obr
>
> The spring-external repository is more than 5Mb to download.   And you need
> to parse this xml !
>
> The other problem is that locations in those descriptors are usually
> absolute locations, thus you need to have access to the internet to be able
> to leverage those (unless you want to rewrite them all).   This means that
> some companies can't use them at all.


or you could use a local repository manager (like Nexus) to cache the OBR
content
as it's requested and rewrite the descriptors so they use the locally cached
bundles
- that's what we do in Nexus Pro, and it solves a lot of the performance
issues


>   We therefore usually use maven style
> urls, where you can actually change the maven repositories list in
> etc/org.ops4j.pax.url.mvn.cfg, which means you can point to an internal
> repository easily.
>

which is actually very similar to OBR, it's just a different form of
metadata - in fact
there's no reason why you can't have many small OBR files which are
referenced
from a top-level OBR, it's just that most people use a single index file.

Those two things lead me to think that OBR is just unusable at runtime
> (though it could really help at dev time with the right tools).  This lead
> the path to the so called "features" in karaf.
>

the OBR spec is being updated so this might improve, but even so I still
think the
current OBR format is perfectly usable at runtime if you use a
local/internal server
(this is effectively what you're doing with the maven urls and an internal
repository)

[1] http://wiki.ops4j.org/display/paxurl/Obr+Protocol
>
> On Fri, Sep 4, 2009 at 15:58, J Aaron Farr <fa...@apache.org> wrote:
>
> >
> > On Fri 04 Sep 2009 21:38, Guillaume Nodet <gn...@gmail.com> wrote:
> >
> > > There are multiple solutions to this problem, but the easiest one is to
> > make
> > > sure that the system bundle does not export those packages.
> > > That's what i've done at [2] where you can see that the
> javax.transaction
> > > packages are commented, thus not exported.
> > >
> > > Hopes this help!
> >
> > It does.  I figured someone was working on updating the
> > features/bundles, but I thought my notes might help.
> >
> > Speaking of making this simpler, while I really like the karaf
> > "features" feature, shouldn't this sort of install be possible via OBR?
> > That is, I install/activate the activemq bundle and OBR takes care of
> > the rest?
> >
> > I've been out of osgi development for almost 2 years, so I'm still
> > getting back up to speed on what's changed.
> >
> > --
> >    J. Aaron Farr
> >   馮傑仁
> >   www.cubiclemuses.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
> >
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
>



-- 
Cheers, Stuart

Re: karaf and activemq

Posted by Alin Dreghiciu <ad...@gmail.com>.
One extra OBR repository url:
http://osgi.sonatype.org/content/groups/osgi-central-obr<http://osgi.sonatype.org/content/groups/osgi-central-obr/>Based
on the new Sonatype Nexus OBR support (made by Stuart) it is the most
comprehensive repo, including the ones bellow and more.

On Fri, Sep 4, 2009 at 5:13 PM, Guillaume Nodet <gn...@gmail.com> wrote:

> Right, and you can do that already.
> There is obr url handler [1] that can be installed in OSGi, so that you
> could write a features file with:
>   <bundle>obr:activemq-core/5.2.0</bundle>
>
> There are two real problems I have with OBR.
> The first one is that those repository descriptors are *huge*.  Here is a
> list of existing repositories for example:
> http://www.osgi.org/repository/repository.xml
> http://www.knopflerfish.org/repo/bindex.xml
> http://sigil.codecauldron.org/spring-external.obr
> http://download.eclipse.org/releases/ganymede/repository.zip
> http://dz.prosyst.com/pdoc/repository.xml
> http://sigil.codecauldron.org/spring-release.obr
>
> The spring-external repository is more than 5Mb to download.   And you need
> to parse this xml !
>
> The other problem is that locations in those descriptors are usually
> absolute locations, thus you need to have access to the internet to be able
> to leverage those (unless you want to rewrite them all).   This means that
> some companies can't use them at all.   We therefore usually use maven
> style
> urls, where you can actually change the maven repositories list in
> etc/org.ops4j.pax.url.mvn.cfg, which means you can point to an internal
> repository easily.
>
> Those two things lead me to think that OBR is just unusable at runtime
> (though it could really help at dev time with the right tools).  This lead
> the path to the so called "features" in karaf.
>
>
> [1] http://wiki.ops4j.org/display/paxurl/Obr+Protocol
>
> On Fri, Sep 4, 2009 at 15:58, J Aaron Farr <fa...@apache.org> wrote:
>
> >
> > On Fri 04 Sep 2009 21:38, Guillaume Nodet <gn...@gmail.com> wrote:
> >
> > > There are multiple solutions to this problem, but the easiest one is to
> > make
> > > sure that the system bundle does not export those packages.
> > > That's what i've done at [2] where you can see that the
> javax.transaction
> > > packages are commented, thus not exported.
> > >
> > > Hopes this help!
> >
> > It does.  I figured someone was working on updating the
> > features/bundles, but I thought my notes might help.
> >
> > Speaking of making this simpler, while I really like the karaf
> > "features" feature, shouldn't this sort of install be possible via OBR?
> > That is, I install/activate the activemq bundle and OBR takes care of
> > the rest?
> >
> > I've been out of osgi development for almost 2 years, so I'm still
> > getting back up to speed on what's changed.
> >
> > --
> >    J. Aaron Farr
> >   馮傑仁
> >   www.cubiclemuses.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
> >
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
>



-- 
Alin Dreghiciu
Software Developer
My profile: http://www.linkedin.com/in/alindreghiciu
My blog: http://adreghiciu.blogspot.com
http://www.ops4j.org - New Energy for OSS Communities - Open Participation
Software.
http://www.qi4j.org - New Energy for Java - Domain Driven Development.

Re: karaf and activemq

Posted by Guillaume Nodet <gn...@gmail.com>.
Right, and you can do that already.
There is obr url handler [1] that can be installed in OSGi, so that you
could write a features file with:
   <bundle>obr:activemq-core/5.2.0</bundle>

There are two real problems I have with OBR.
The first one is that those repository descriptors are *huge*.  Here is a
list of existing repositories for example:
http://www.osgi.org/repository/repository.xml
http://www.knopflerfish.org/repo/bindex.xml
http://sigil.codecauldron.org/spring-external.obr
http://download.eclipse.org/releases/ganymede/repository.zip
http://dz.prosyst.com/pdoc/repository.xml
http://sigil.codecauldron.org/spring-release.obr

The spring-external repository is more than 5Mb to download.   And you need
to parse this xml !

The other problem is that locations in those descriptors are usually
absolute locations, thus you need to have access to the internet to be able
to leverage those (unless you want to rewrite them all).   This means that
some companies can't use them at all.   We therefore usually use maven style
urls, where you can actually change the maven repositories list in
etc/org.ops4j.pax.url.mvn.cfg, which means you can point to an internal
repository easily.

Those two things lead me to think that OBR is just unusable at runtime
(though it could really help at dev time with the right tools).  This lead
the path to the so called "features" in karaf.


[1] http://wiki.ops4j.org/display/paxurl/Obr+Protocol

On Fri, Sep 4, 2009 at 15:58, J Aaron Farr <fa...@apache.org> wrote:

>
> On Fri 04 Sep 2009 21:38, Guillaume Nodet <gn...@gmail.com> wrote:
>
> > There are multiple solutions to this problem, but the easiest one is to
> make
> > sure that the system bundle does not export those packages.
> > That's what i've done at [2] where you can see that the javax.transaction
> > packages are commented, thus not exported.
> >
> > Hopes this help!
>
> It does.  I figured someone was working on updating the
> features/bundles, but I thought my notes might help.
>
> Speaking of making this simpler, while I really like the karaf
> "features" feature, shouldn't this sort of install be possible via OBR?
> That is, I install/activate the activemq bundle and OBR takes care of
> the rest?
>
> I've been out of osgi development for almost 2 years, so I'm still
> getting back up to speed on what's changed.
>
> --
>    J. Aaron Farr
>   馮傑仁
>   www.cubiclemuses.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: karaf and activemq

Posted by J Aaron Farr <fa...@apache.org>.
On Fri 04 Sep 2009 21:38, Guillaume Nodet <gn...@gmail.com> wrote:

> There are multiple solutions to this problem, but the easiest one is to make
> sure that the system bundle does not export those packages.
> That's what i've done at [2] where you can see that the javax.transaction
> packages are commented, thus not exported.
>
> Hopes this help!

It does.  I figured someone was working on updating the
features/bundles, but I thought my notes might help.

Speaking of making this simpler, while I really like the karaf
"features" feature, shouldn't this sort of install be possible via OBR?
That is, I install/activate the activemq bundle and OBR takes care of
the rest?

I've been out of osgi development for almost 2 years, so I'm still
getting back up to speed on what's changed.

-- 
   J. Aaron Farr
   馮傑仁
   www.cubiclemuses.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: karaf and activemq

Posted by Guillaume Nodet <gn...@gmail.com>.
I'm working on upgrading ServiceMix to Karaf right now.
The work is done in a ServiceMix sandbox [1].

The issue you hit is a known issue (at least from me).  The very reason is
that OSGi has this concept of package which can not be easily split.
If you look at the javax.transaction package in the JVM, you'll see it only
includes a few classes, not the full JTA spec as specified by JEE.  This
means that if the system bundle exports this package, everything will be
wired to that one instead of the one from the geronimo jta spec.

There are multiple solutions to this problem, but the easiest one is to make
sure that the system bundle does not export those packages.
That's what i've done at [2] where you can see that the javax.transaction
packages are commented, thus not exported.

Hopes this help!

[1] https://svn.apache.org/repos/asf/servicemix/sandbox/karaf/
[2]
https://svn.apache.org/repos/asf/servicemix/sandbox/karaf/nmr/assembly/src/main/filtered-resources/etc/config.properties

On Fri, Sep 4, 2009 at 15:17, J Aaron Farr <fa...@apache.org> wrote:

>
> I just got ActiveMQ running on Karaf (lastest svn).  It was not very
> easy, so I'm sharing what I did and I'm looking for suggestions.
>
> After checking out and building karaf from scratch, I started with these
> instructions:
>
>    http://activemq.apache.org/osgi-integration.html
>
> Of course, they're old and don't help much.  But it did point me to the
> service document [1] that let me download most of the bundles by hand:
>
>    osgi:install mvn:org.apache.activemq/activemq-core/5.2.0
>    osgi:install mvn:org.apache.activemq/activemq-ra/5.2.0
>    ...
>
> I did this for all the bundles in the `activemq` and `connector`
> features expect for `org.apache.servicemix.activemq.commands`.
>
> It was the 'transactions' feature that got me stuck.  I installed the
> 'felix-transaction' [2] plugin and most of the Spring Framework osgi
> bundles [3] by hand.  But the place I kept getting stuck was with starting
> the felix-transaction bundle.  I kept getting:
>
>    java.lang.ClassNotFoundException: javax.transaction.TransactionManager
>
> The problem was the same as described in [4] and [5], namely, I had
> these packages in my system that were overriding the geronimo jta bundle
> I had:
>
>    System Bundle (0): javax.transaction; version=1.5.0
>    System Bundle (0): javax.transaction.xa; version=1.5.0
>
> After hours of wrestling with this, I cracked open the felix framework
> jar, deleted all references to `javax.transaction` and then put it back
> together again.
>
> Once this was done, I could take a simple activemq configuration file
> and drop it in `deploy/localhost-broker.xml` and everything worked.
>
> Surely there must be a better way...
>
> I'm not sure if this info is useful on the felix list, or the activemq
> list or the servicemix list or even the geronimo list, so feel free to
> forward (me or the message) as necessary.
>
> --
>   J. Aaron Farr
>   馮傑仁
>   www.cubiclemuses.com
>
> [1]
> http://repo2.maven.org/maven2/org/apache/servicemix/apache-servicemix/4.0.0/apache-servicemix-4.0.0-features.xml
> [2]
> https://svn.apache.org/repos/asf/felix/trunk/transaction/org.apache.felix.transaction/
> [3] http://www.springsource.org/osgi
> [4] http://www.mail-archive.com/dev@geronimo.apache.org/msg70777.html
> [5]
> http://mail-archives.apache.org/mod_mbox/felix-users/200902.mbox/%3C499ED895.20506@ungoverned.org%3E
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com