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 <[email protected]>:
> 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.

Reply via email to