You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Dejan Bosanac <de...@nighttale.net> on 2009/06/10 16:31:38 UTC

OSGi Integration

Hi all,

just put up an article explaining how to deploy and run ActiveMQ broker and
web console in Apache Karaf and ServiceMix.

http://www.nighttale.net/activemq/activemq-osgi-integration.html

Cheers
--
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net

Re: OSGi Integration

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi Joe,

I haven't tried it but I think you should be able to do it. Take a look at
these articles for more information

http://camel.apache.org/how-to-run-camel-in-a-osgi-container.html
http://camel.apache.org/tutorial-osgi-camel-part1.html

Cheers
--
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Wed, Jun 10, 2009 at 6:03 PM, Joe Fernandez <
joe.fernandez@ttmsolutions.com> wrote:

>
> Hi Dejan,
>
> Great article!
>
> I have an ActiveMQ broker with embedded, DSL-based, Camel routes and I
> would
> like to be able to hot-deploy these routes. Would this be possible when
> running AMQ and Camel w/in a Karaf runtime?
>
> Thanks
> Joe
>
>
> Dejan Bosanac wrote:
> >
> > Hi all,
> >
> > just put up an article explaining how to deploy and run ActiveMQ broker
> > and
> > web console in Apache Karaf and ServiceMix.
> >
> > http://www.nighttale.net/activemq/activemq-osgi-integration.html
> >
> > Cheers
> > --
> > Dejan Bosanac
> >
> > Open Source Integration - http://fusesource.com/
> > ActiveMQ in Action - http://www.manning.com/snyder/
> > Blog - http://www.nighttale.net
> >
> >
> > -----
> > Dejan Bosanac
> >
> > Open Source Integration - http://fusesource.com/
> > ActiveMQ in Action - http://www.manning.com/snyder/
> > Blog - http://www.nighttale.net
> >
>
> --
> View this message in context:
> http://www.nabble.com/OSGi-Integration-tp23963943p23965572.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Re: OSGi Integration

Posted by Joe Fernandez <jo...@ttmsolutions.com>.
Hi Dejan,

Great article! 

I have an ActiveMQ broker with embedded, DSL-based, Camel routes and I would
like to be able to hot-deploy these routes. Would this be possible when
running AMQ and Camel w/in a Karaf runtime?

Thanks 
Joe  
 

Dejan Bosanac wrote:
> 
> Hi all,
> 
> just put up an article explaining how to deploy and run ActiveMQ broker
> and
> web console in Apache Karaf and ServiceMix.
> 
> http://www.nighttale.net/activemq/activemq-osgi-integration.html
> 
> Cheers
> --
> Dejan Bosanac
> 
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
> 
> 
> -----
> Dejan Bosanac
> 
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
> 

-- 
View this message in context: http://www.nabble.com/OSGi-Integration-tp23963943p23965572.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: OSGi Integration

Posted by Dejan Bosanac <de...@nighttale.net>.
You can check out new ActiveMQ karaf feature

https://repository.apache.org/content/repositories/snapshots/org/apache/activemq/activemq-karaf/5.4-SNAPSHOT/

it contains everything you need to install and start activemq inside karaf.

Once properly set, you can use

features:install activemq
features:install pax-web
features:install activemq-web-console

Proper documentation is still pending though.

Cheers
--
Dejan Bosanac - http://twitter.com/dejanb

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Wed, Feb 10, 2010 at 2:11 PM, srinidandi <
shrinivas.dandibhotla@corpus.com> wrote:

>
> have already run the command before deploying the application bundle in
> Karaf.. any other feature(s) I need to install to get this working?
>
> Thanks
>
>
>
> gnodet wrote:
> >
> > Could you try to run the following command:
> >    features:install spring-dm
> > then restart (to make sure all optional imports on spring are wired
> > correctly).
> >
> > On Wed, Feb 10, 2010 at 13:40, srinidandi
> > <sh...@corpus.com> wrote:
> >>
> >> Hi,
> >>
> >> I am trying to make ActiveMQ + camel work with Apache Felix Karaf 1.2.0,
> >> and
> >> for this have deployed activemq and its dependencies in Karaf.
> >>
> >> I have set up a simple camel route using spring dsl that reads a queue
> >> and
> >> writes it to a bean as below.
> >>
> >> <route>
> >>      <from uri="activemq:queue:example.A" />
> >>      <to uri="bean:myMessageHandler?method=handleMessage" />
> >> </route>
> >>
> >> and have also defined the activemq bean in the same xml as below
> >>
> >> <bean id="activemq"
> >> class="org.apache.activemq.camel.component.ActiveMQComponent">
> >>  <property name="brokerURL" value="tcp://localhost:61616"/>
> >> </bean>
> >>
> >> On deploying the application bundle (the bundle has the activenmq
> related
> >> package in the import) I get the following exception at run time.
> >>
> >>
> >> karaf@root> Exception in thread "SpringOsgiExtenderThread-4"
> >> org.springframework
> >> .beans.factory.BeanCreationException: Error creating bean with name
> >> 'activemq' d
> >> efined in URL [bundle://384.0:0/META-INF/spring/camelContext.xml]: Error
> >> setting
> >>  property values; nested exception is
> >> org.springframework.beans.PropertyBatchUpd
> >> ateException; nested PropertyAccessExceptions (1) are:
> >> PropertyAccessException 1:
> >> org.springframework.beans.MethodInvocationException:
> >> Property 'brokerURL' threw exception; nested exception is
> >> java.lang.NoClassDefFo
> >> undError: org/springframework/context/Lifecycle
> >>
> >>
> >> Can you please let me know if I am missing anything?
> >>
> >> Thanks
> >>
> >>
> >> Dejan Bosanac wrote:
> >>>
> >>> Hi all,
> >>>
> >>> just put up an article explaining how to deploy and run ActiveMQ broker
> >>> and
> >>> web console in Apache Karaf and ServiceMix.
> >>>
> >>> http://www.nighttale.net/activemq/activemq-osgi-integration.html
> >>>
> >>> Cheers
> >>> --
> >>> Dejan Bosanac
> >>>
> >>> Open Source Integration - http://fusesource.com/
> >>> ActiveMQ in Action - http://www.manning.com/snyder/
> >>> Blog - http://www.nighttale.net
> >>>
> >>>
> >>> -----
> >>> Dejan Bosanac
> >>>
> >>> Open Source Integration - http://fusesource.com/
> >>> ActiveMQ in Action - http://www.manning.com/snyder/
> >>> Blog - http://www.nighttale.net
> >>>
> >>
> >> --
> >> View this message in context:
> >> http://old.nabble.com/OSGi-Integration-tp23963942p27530587.html
> >> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Blog: http://gnodet.blogspot.com/
> > ------------------------
> > Open Source SOA
> > http://fusesource.com
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/OSGi-Integration-tp23963942p27530949.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>
>

Re: OSGi Integration

Posted by srinidandi <sh...@corpus.com>.
have already run the command before deploying the application bundle in
Karaf.. any other feature(s) I need to install to get this working?

Thanks     



gnodet wrote:
> 
> Could you try to run the following command:
>    features:install spring-dm
> then restart (to make sure all optional imports on spring are wired
> correctly).
> 
> On Wed, Feb 10, 2010 at 13:40, srinidandi
> <sh...@corpus.com> wrote:
>>
>> Hi,
>>
>> I am trying to make ActiveMQ + camel work with Apache Felix Karaf 1.2.0,
>> and
>> for this have deployed activemq and its dependencies in Karaf.
>>
>> I have set up a simple camel route using spring dsl that reads a queue
>> and
>> writes it to a bean as below.
>>
>> <route>
>>      <from uri="activemq:queue:example.A" />
>>      <to uri="bean:myMessageHandler?method=handleMessage" />
>> </route>
>>
>> and have also defined the activemq bean in the same xml as below
>>
>> <bean id="activemq"
>> class="org.apache.activemq.camel.component.ActiveMQComponent">
>>  <property name="brokerURL" value="tcp://localhost:61616"/>
>> </bean>
>>
>> On deploying the application bundle (the bundle has the activenmq related
>> package in the import) I get the following exception at run time.
>>
>>
>> karaf@root> Exception in thread "SpringOsgiExtenderThread-4"
>> org.springframework
>> .beans.factory.BeanCreationException: Error creating bean with name
>> 'activemq' d
>> efined in URL [bundle://384.0:0/META-INF/spring/camelContext.xml]: Error
>> setting
>>  property values; nested exception is
>> org.springframework.beans.PropertyBatchUpd
>> ateException; nested PropertyAccessExceptions (1) are:
>> PropertyAccessException 1:
>> org.springframework.beans.MethodInvocationException:
>> Property 'brokerURL' threw exception; nested exception is
>> java.lang.NoClassDefFo
>> undError: org/springframework/context/Lifecycle
>>
>>
>> Can you please let me know if I am missing anything?
>>
>> Thanks
>>
>>
>> Dejan Bosanac wrote:
>>>
>>> Hi all,
>>>
>>> just put up an article explaining how to deploy and run ActiveMQ broker
>>> and
>>> web console in Apache Karaf and ServiceMix.
>>>
>>> http://www.nighttale.net/activemq/activemq-osgi-integration.html
>>>
>>> Cheers
>>> --
>>> Dejan Bosanac
>>>
>>> Open Source Integration - http://fusesource.com/
>>> ActiveMQ in Action - http://www.manning.com/snyder/
>>> Blog - http://www.nighttale.net
>>>
>>>
>>> -----
>>> Dejan Bosanac
>>>
>>> Open Source Integration - http://fusesource.com/
>>> ActiveMQ in Action - http://www.manning.com/snyder/
>>> Blog - http://www.nighttale.net
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/OSGi-Integration-tp23963942p27530587.html
>> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
> 
> 

-- 
View this message in context: http://old.nabble.com/OSGi-Integration-tp23963942p27530949.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: OSGi Integration

Posted by Guillaume Nodet <gn...@gmail.com>.
Could you try to run the following command:
   features:install spring-dm
then restart (to make sure all optional imports on spring are wired correctly).

On Wed, Feb 10, 2010 at 13:40, srinidandi
<sh...@corpus.com> wrote:
>
> Hi,
>
> I am trying to make ActiveMQ + camel work with Apache Felix Karaf 1.2.0, and
> for this have deployed activemq and its dependencies in Karaf.
>
> I have set up a simple camel route using spring dsl that reads a queue and
> writes it to a bean as below.
>
> <route>
>      <from uri="activemq:queue:example.A" />
>      <to uri="bean:myMessageHandler?method=handleMessage" />
> </route>
>
> and have also defined the activemq bean in the same xml as below
>
> <bean id="activemq"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
>  <property name="brokerURL" value="tcp://localhost:61616"/>
> </bean>
>
> On deploying the application bundle (the bundle has the activenmq related
> package in the import) I get the following exception at run time.
>
>
> karaf@root> Exception in thread "SpringOsgiExtenderThread-4"
> org.springframework
> .beans.factory.BeanCreationException: Error creating bean with name
> 'activemq' d
> efined in URL [bundle://384.0:0/META-INF/spring/camelContext.xml]: Error
> setting
>  property values; nested exception is
> org.springframework.beans.PropertyBatchUpd
> ateException; nested PropertyAccessExceptions (1) are:
> PropertyAccessException 1:
> org.springframework.beans.MethodInvocationException:
> Property 'brokerURL' threw exception; nested exception is
> java.lang.NoClassDefFo
> undError: org/springframework/context/Lifecycle
>
>
> Can you please let me know if I am missing anything?
>
> Thanks
>
>
> Dejan Bosanac wrote:
>>
>> Hi all,
>>
>> just put up an article explaining how to deploy and run ActiveMQ broker
>> and
>> web console in Apache Karaf and ServiceMix.
>>
>> http://www.nighttale.net/activemq/activemq-osgi-integration.html
>>
>> Cheers
>> --
>> Dejan Bosanac
>>
>> Open Source Integration - http://fusesource.com/
>> ActiveMQ in Action - http://www.manning.com/snyder/
>> Blog - http://www.nighttale.net
>>
>>
>> -----
>> Dejan Bosanac
>>
>> Open Source Integration - http://fusesource.com/
>> ActiveMQ in Action - http://www.manning.com/snyder/
>> Blog - http://www.nighttale.net
>>
>
> --
> View this message in context: http://old.nabble.com/OSGi-Integration-tp23963942p27530587.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>
>



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

Re: OSGi Integration

Posted by srinidandi <sh...@corpus.com>.
Hi,

I am trying to make ActiveMQ + camel work with Apache Felix Karaf 1.2.0, and
for this have deployed activemq and its dependencies in Karaf.

I have set up a simple camel route using spring dsl that reads a queue and
writes it to a bean as below.

<route>
      <from uri="activemq:queue:example.A" />
      <to uri="bean:myMessageHandler?method=handleMessage" />
</route> 

and have also defined the activemq bean in the same xml as below

<bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
 <property name="brokerURL" value="tcp://localhost:61616"/>
</bean>

On deploying the application bundle (the bundle has the activenmq related
package in the import) I get the following exception at run time.


karaf@root> Exception in thread "SpringOsgiExtenderThread-4"
org.springframework
.beans.factory.BeanCreationException: Error creating bean with name
'activemq' d
efined in URL [bundle://384.0:0/META-INF/spring/camelContext.xml]: Error
setting
 property values; nested exception is
org.springframework.beans.PropertyBatchUpd
ateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException:
Property 'brokerURL' threw exception; nested exception is
java.lang.NoClassDefFo
undError: org/springframework/context/Lifecycle


Can you please let me know if I am missing anything?

Thanks 
    

Dejan Bosanac wrote:
> 
> Hi all,
> 
> just put up an article explaining how to deploy and run ActiveMQ broker
> and
> web console in Apache Karaf and ServiceMix.
> 
> http://www.nighttale.net/activemq/activemq-osgi-integration.html
> 
> Cheers
> --
> Dejan Bosanac
> 
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
> 
> 
> -----
> Dejan Bosanac
> 
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
> 

-- 
View this message in context: http://old.nabble.com/OSGi-Integration-tp23963942p27530587.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.