I'm not sure I like this next proposal... so, another brain storm...
What if we had 4 basic objects?
NewConnectionFactory
NewConsumer.... created with cf.createConsumer(queue);
NewProducer .... created with cf.createConsumer(queue);
NewRequestResponse... created with cf.createRequestResponse(queueSend,
queueConsume); That would be a Consumer/Producer mixed in a single object
for the case of the request/response.
Anything different than that would have to go through JTA. (Merge on JTA
would take care of placing everything as part of the same TX)
No more need for Contexts on that case.
Just a brain storm..I'm not 100% sure about if I like it or not.