jsr343-experts@jms-spec.java.net

[jsr343-experts] Re: [jms-spec users] Re: Re: Re: Clarification about JMSContext and setClientID

From: Clebert Suconic <clebert.suconic_at_gmail.com>
Date: Mon, 24 Jun 2013 16:46:24 -0400

nope....


say you set ctx.setClientID("ID1);


on ctx you can create a new context:

JMSContext ctx2 = ctx.createJMSContext();
Now you do:

ctx2.setClientID("ID2);


What would be the outcome of:

System.out.println(ctx.getClientID());
System.out.println(ctx2.getClientiD());



since ctx.createJMSContext() is using the building pattern, some people
would expect it to share a same inner connection, and have
ctx.getClientID()==ctx2.getClientID()



I wanted to clear the interpretation for the state on these two objects.


On Mon, Jun 24, 2013 at 4:37 PM, John D. Ament <john.d.ament_at_gmail.com>wrote:

> I'm confused by this call:
>
> JMSContext ctx2 = ctx.createJMSContext();
>
> Did you mean something else?
>
>
> On Mon, Jun 24, 2013 at 4:27 PM, Clebert Suconic <
> clebert.suconic_at_gmail.com> wrote:
>
>> SE for now...
>>
>>
>> On Mon, Jun 24, 2013 at 4:02 PM, John D. Ament <john.d.ament_at_gmail.com>wrote:
>>
>>> Is this an EE scenario or an SE scenario?
>>> I think the behavior differs in the two environments.
>>>
>>>
>>> On Mon, Jun 24, 2013 at 3:42 PM, Clebert Suconic <
>>> clebert.suconic_at_gmail.com> wrote:
>>>
>>>> My same question also applies to everything else... such as
>>>> setExceptionListener, getMetaData(), etc...
>>>>
>>>>
>>>> Should the state be shared with multiple JMSContexts or each context
>>>> should be totally independent?
>>>>
>>>> We have talked about this before, but I don't see any wording on how
>>>> this sharing of the state should be done.
>>>>
>>>> since this is using the building pattern I would expect a
>>>> jmsContext.createContext() would be sharing the same data.... again.. I
>>>> just want to check if that's everybody's interpretation...
>>>>
>>>>
>>>> Thanks,
>>>>
>>>>
>>>> Clebert
>>>>
>>>>
>>>> On Mon, Jun 24, 2013 at 3:36 PM, Clebert Suconic <
>>>> clebert.suconic_at_gmail.com> wrote:
>>>>
>>>>> say you created a JMSContext, and used setClientID....
>>>>>
>>>>>
>>>>> JMSContext ctx = ...
>>>>> ctx.setClientID("someID");
>>>>>
>>>>>
>>>>> Say, if later we call:
>>>>>
>>>>> JMSContext ctx2 = ctx.createJMSContext();
>>>>>
>>>>>
>>>>>
>>>>> What would be the expected value of ctx2.getClientID() ?
>>>>>
>>>>>
>>>>> I'm assuming there will be some connection reused by the JMSContext
>>>>> and ctx.createJMSContext() would reuse the internal connection as we talked
>>>>> earlier. I'm just double checking if this is everybody's expectations...?
>>>>>
>>>>>
>>>>>
>>>>> Clebert
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Clebert Suconic
>>>> http://community.jboss.org/people/clebert.suconic@jboss.com
>>>> http://clebertsuconic.blogspot.com
>>>>
>>>
>>>
>>
>>
>> --
>> Clebert Suconic
>> http://community.jboss.org/people/clebert.suconic@jboss.com
>> http://clebertsuconic.blogspot.com
>>
>
>


-- 
Clebert Suconic
http://community.jboss.org/people/clebert.suconic@jboss.com
http://clebertsuconic.blogspot.com