Need extended running example based on karaf-jms-example in combination of REST Client

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Need extended running example based on karaf-jms-example in combination of REST Client

stefang
Hi,

trying to use karaf-jms-example as a base and extend this with a REST-client
based on karaf-rest-example-whiteboard to send and receive JMS Messages

failed because we get no

@Reference
ConnectionFactory connectionFactory;

Is there anything we need special to get this running?


Stefan






--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: Need extended running example based on karaf-jms-example in combination of REST Client

jbonofre
Hi

Did you create the connection factory to the broker ?

To do that you can use karaf JMS commands or provision in features.xml.

Afair the example readme and features explain this.

Regards
JB



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: Need extended running example based on karaf-jms-example in combination of REST Client

jbonofre
In reply to this post by stefang
So, according to
https://github.com/apache/karaf/blob/master/examples/karaf-jms-example/README.md

You have to install the connection factory feature.

Did you do that ?

Regards
JB



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: Need extended running example based on karaf-jms-example in combination of REST Client

stefang
In reply to this post by jbonofre
Hi JB,

we did it as in your JMS example by config via features. (Absolutely no
change)

ConnectionFactory comes up but our REST ressource based on your
karaf-rest-example-whiteboard can not use it.
We can't find why ...

Stefan
 



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: Need extended running example based on karaf-jms-example in combination of REST Client

jbonofre
Check the JMS version ;)

I'm suspecting your have 2.0 in your import whereas the connection factory
is JMS 1.0.

If you need help, just ping me directly.

Regards
JB



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: Need extended running example based on karaf-jms-example in combination of REST Client

stefang
Hi JB,

all imports are correct and use JMS 1 but bundle still waiting to get
reference to JMS-CF

any other part we can check?

Stefan




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: Need extended running example based on karaf-jms-example in combination of REST Client

stefang
Hi,

we give up to get this working with pax-jms for activemq.
Now switched to pax-jms for Artemis works like a charm without any problems.

Stefan




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: Need extended running example based on karaf-jms-example in combination of REST Client

jbonofre
Hi Stefan,

I'm pretty sure it's because you are using JMS 2.0 import in your
application, and that's why it works with Artemis (as Artemis is JMS 2.0
by default).

By the way, ActiveMQ will support JMS 2.0 soon as well.

Regards
JB

On 16/10/2019 20:31, stefang wrote:

> Hi,
>
> we give up to get this working with pax-jms for activemq.
> Now switched to pax-jms for Artemis works like a charm without any problems.
>
> Stefan
>
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Need extended running example based on karaf-jms-example in combination of REST Client

stefang
Hi JB,

we controlled exactly this.

 <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-jms_1.1_spec</artifactId>
        </dependency>

but without any luck.
Must be something todo with PAX-JMS and scr in combination with activemq

Regards
Stefan




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: Need extended running example based on karaf-jms-example in combination of REST Client

jbonofre
That's the dependency, I'm talking about the import range.

If you can send your application MANIFEST, and SCR component I will take
a look.

Regards
JB

On 17/10/2019 16:10, stefang wrote:

> Hi JB,
>
> we controlled exactly this.
>
>  <dependency>
>             <groupId>org.apache.geronimo.specs</groupId>
>             <artifactId>geronimo-jms_1.1_spec</artifactId>
>         </dependency>
>
> but without any luck.
> Must be something todo with PAX-JMS and scr in combination with activemq
>
> Regards
> Stefan
>
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Need extended running example based on karaf-jms-example in combination of REST Client

stefang
Hi JB,

Import was exactly as in your JMS-Reference Example.
 

<Import-Package>

                            javax.jms*;version="[1,3)",
                            *
                        </Import-Package>
Regards

Stefan




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: Need extended running example based on karaf-jms-example in combination of REST Client

jbonofre
Hi Stefan,

So, you can see here that it can take both jms 1.x and 2.x.

If you have both JMS 1.x and JMS 2.x API deployed, it will take the 2.x.

That's why maybe the @Reference doesn't work: you probably have the two
API deployed and ActiveMQ connection factory is 1.x only.

Anyway, maybe you can provide a test case reproducing your issue to me ?

I would double check the JMS package deployed. Use bundle:tree-show to
see the wiring and then you will see the JMS API bundle used.

Regards
JB

On 20/10/2019 12:38, stefang wrote:

> Hi JB,
>
> Import was exactly as in your JMS-Reference Example.
>  
>
> <Import-Package>
>
>                             javax.jms*;version="[1,3)",
>                             *
>                         </Import-Package>
> Regards
>
> Stefan
>
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Need extended running example based on karaf-jms-example in combination of REST Client

jbonofre
In reply to this post by stefang
By the way, as ActiveMQ is JMS 1.1 (for now, I'm planning to add support
for JMS 2.0 soon), you can import like this:

javax.jms*;version="[1,2)"

It would be a good test ;)

Regards
JB

On 20/10/2019 12:38, stefang wrote:

> Hi JB,
>
> Import was exactly as in your JMS-Reference Example.
>  
>
> <Import-Package>
>
>                             javax.jms*;version="[1,3)",
>                             *
>                         </Import-Package>
> Regards
>
> Stefan
>
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Need extended running example based on karaf-jms-example in combination of REST Client

jbonofre
In reply to this post by stefang
Hi Stefan,

So, you can see here that it can take both jms 1.x and 2.x.

If you have both JMS 1.x and JMS 2.x API deployed, it will take the 2.x.

That's why maybe the @Reference doesn't work: you probably have the two
API deployed and ActiveMQ connection factory is 1.x only.

Anyway, maybe you can provide a test case reproducing your issue to me ?

I would double check the JMS package deployed. Use bundle:tree-show to
see the wiring and then you will see the JMS API bundle used.

Regards
JB

On 20/10/2019 12:38, stefang wrote:

> Hi JB,
>
> Import was exactly as in your JMS-Reference Example.
>  
>
> <Import-Package>
>
>                             javax.jms*;version="[1,3)",
>                             *
>                         </Import-Package>
> Regards
>
> Stefan
>
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com