Sent from my iPhone
On Nov 10, 2011, at 9:51 AM, "Rüdiger zu Dohna" <ruediger.dohna_at_1und1.de> wrote:
> On 10.11.2011, at 16:31, Clebert Suconic wrote:
>> I guess I'm proposing merging connection, session and producer altogether. And connection, session and consumer.
>
> Maybe I'm oversimplifying. The simple case is, as you suggest:
>
> NewConsumer consumer = connectionFactory.createConsumer(...);
> NewProducer producer = connectionFactory.createProducer(...);
>
> With two "contexts".
>
> But what should these contexts share? I think only the transaction, isn't it? And that's standard JTA: If you have one around those two calls, they share it (which doesn't necessarily mean it's XA), and if you don't have one, they use separate transactions.
Anything as long it won't require a client to perform 4 round trips
calls to server. Two prepares. Two commits.
I'm not sure how we could do it with simple JTA.. I guess I need to
read that spec. If anyone has an hypothetical example?
We need to keep the usage simple for that case as well.
>
> With DI we could just inject those two and annotate everything we need to configure them.
>
> (also just brainstorming)