Hi Binod,
The context are generally captured at the time of task submission, ie,
when the Callable/Runnable is submitted to the managed executor, or when
the createContextObject method in ContextService is called to create a
proxy object. The context will then be restored on the execution thread
prior to calling the call() or run() method of the Callable/Runnable, or
just before the proxy object is invoked. The application server would be
responsible for capturing and setting up of the context.
Not sure if I answered your question though.
Regards
Anthony
On 12/16/12 8:05 PM, Binod wrote:
> Hi Anthony,
>
> In case an application server define such a Context, how would
> the Task (Callable/Runnable) obtain the context attribute (eg: session)
> while it is being executed? Is that something application would pass
> in the ContextService properties?
>
> thanks,
> Binod.
>
> On Friday 14 December 2012 11:38 PM, Anthony Lai wrote:
>> Hi Binod,
>>
>> The types of context supported for propagation are determined by each
>> application server. Currently, JSR 236 would require the support of
>> JNDI naming, classloader, and security context. An application server
>> could choose to provide support for propagation of session but that
>> is not required by the JSR 236 spec, thus it may not be supported by
>> some application servers.
>>
>> cc'ing the JSR 236 EG mailing list for more feedback.
>>
>> Regards
>> Anthony
>>
>> On 12/14/12 12:13 AM, Binod wrote:
>>> Hi Anthony,
>>>
>>> At JSR 359 EG, we looked at JSR 236 and how does
>>> it apply to SIP Servlets.
>>>
>>> One important aspect, we were looking at is, associating sessions with
>>> a task. For example, executing runnable/callable in the scope of
>>> a session and retrieve the session from the callable/runnable
>>> implementation. I looked at the ContextService interface, but it was
>>> not clear to me if it supported the ability to attach a session as a
>>> contextual object.
>>>
>>> Could you please clarify?
>>>
>>> thanks,
>>> Binod.
>>>
>>>
>>>
>>
>