You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by hwaastad <he...@waastad.org> on 2015/01/28 13:19:20 UTC
JMS Producers - not strictly TomEE
Hi,
just need to discuss with y'all kind of "best practice" when it comes to JMS
producers.
Right now I'm producing connection/session/Messageproducer as
@Requestscoped.
Is there a reason for NOT doing so?
(Only way to get service availability on remote JMS, if its unavailable).
So, another question, might be dumb, but anyway.
In tomee, factory, adapter and mdcontainer config I get, however queue
resources, are they really needed?
br hw
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/JMS-Producers-not-strictly-TomEE-tp4673587.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: JMS Producers - not strictly TomEE
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Not yet in 2.x, we have several things to deal with before (1) we need
to finish completely CDI integration even if we are almost done, 2)
speak of JPA, 3) JMS: AMQ 5 fork or AMQ6 to be discussed on the list
before doing anything cause AMQ 6 != AMQ 5+1
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2015-01-28 15:47 GMT+01:00 hwaastad <he...@waastad.org>:
> Hi,
> "scope", in this particular case, is started by a @Singleton/@Path.
>
> I'm, playing around with different "fault" scenarios, (asynch threads, AMQ
> unavalability) and If I can generate such an issue I get happy. That means I
> need to change my strategy :-)
>
> JMS2......I guess this is already in 2.0.0.SNAPSHOT?
>
> Thanks again for the dialog :-)
>
> br hw
>
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/JMS-Producers-not-strictly-TomEE-tp4673587p4673601.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
Re: JMS Producers - not strictly TomEE
Posted by hwaastad <he...@waastad.org>.
Hi,
"scope", in this particular case, is started by a @Singleton/@Path.
I'm, playing around with different "fault" scenarios, (asynch threads, AMQ
unavalability) and If I can generate such an issue I get happy. That means I
need to change my strategy :-)
JMS2......I guess this is already in 2.0.0.SNAPSHOT?
Thanks again for the dialog :-)
br hw
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/JMS-Producers-not-strictly-TomEE-tp4673587p4673601.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: JMS Producers - not strictly TomEE
Posted by Romain Manni-Bucau <rm...@gmail.com>.
looks close to JMS 2 yes, issue is RequestScoped only makes sense if
you have a request context which is not always the case and you can
hold the connection too long in some pending requests, depend your app
;)
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2015-01-28 14:46 GMT+01:00 hwaastad <he...@waastad.org>:
> Hi Romain, and thanks for answering.
>
> I've seen the example "injection of connectionfactory"
>
> My though was that a single web request, might produce several messages
> (logging and what have you) and by producing @requestscoped JMS objects i
> could reuse components (still the same request).
> Im not sure what the create/close cost might be (I guess small since factory
> is container managed).
>
> I also like to think it's smart to have CDI manage the lifecycle (close on
> dispose etc)
>
> BTW,
> what I do is (ex)
> @Produces @RequestScoped Connection/Session/MessageProducer(){}
>
> br hw
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/JMS-Producers-not-strictly-TomEE-tp4673587p4673593.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
Re: JMS Producers - not strictly TomEE
Posted by hwaastad <he...@waastad.org>.
Hi Romain, and thanks for answering.
I've seen the example "injection of connectionfactory"
My though was that a single web request, might produce several messages
(logging and what have you) and by producing @requestscoped JMS objects i
could reuse components (still the same request).
Im not sure what the create/close cost might be (I guess small since factory
is container managed).
I also like to think it's smart to have CDI manage the lifecycle (close on
dispose etc)
BTW,
what I do is (ex)
@Produces @RequestScoped Connection/Session/MessageProducer(){}
br hw
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/JMS-Producers-not-strictly-TomEE-tp4673587p4673593.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: JMS Producers - not strictly TomEE
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi
JMS provider itself should be configurable to handle unavailability -
check AMQ doc - so not sure it does worth using a request scoped bean.
Queue/topic are optional and generally you define them only when
default doesnt match
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2015-01-28 13:19 GMT+01:00 hwaastad <he...@waastad.org>:
> Hi,
> just need to discuss with y'all kind of "best practice" when it comes to JMS
> producers.
>
> Right now I'm producing connection/session/Messageproducer as
> @Requestscoped.
> Is there a reason for NOT doing so?
> (Only way to get service availability on remote JMS, if its unavailable).
>
> So, another question, might be dumb, but anyway.
>
> In tomee, factory, adapter and mdcontainer config I get, however queue
> resources, are they really needed?
>
> br hw
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/JMS-Producers-not-strictly-TomEE-tp4673587.html
> Sent from the TomEE Users mailing list archive at Nabble.com.