OK, understand. Shouldn't we have some AOP advice on calling side
which will always insert actual ServiceContext to method call? We need
common pattern. I'm not going to rewrite code when I decide distribute
my application over tiers. Any other idea?

Pavel

On Wed, May 5, 2010 at 9:23 PM, Patrik Nordwall
<patrik.nordw...@gmail.com> wrote:
>
> In remote method invokations you should pass in ServiceContext as parameter
> to the method.
>
> You can't rely on ServiceContextStore (thread local passing) of
> ServiceContext in remote method invokations.
>
> /Patrik
>
>
> PaloT wrote:
>>
>> Hello Patrik,
>> In Advanced tutorial we have:
>> ######################
>> The first parameter of each method in the Services is a ServiceContext
>> parameter. This is generated automatically. In front of the Services
>> there is an advice, which stores this ServiceContext object in a
>> thread local variable, ServiceContextStore, to make sure that it is
>> available everywhere within that request in the tier. When calling
>> remote methods it must be passed as a method parameter.
>> ######################
>>
>> And in ServiceContextStore.java we have:
>> ######################
>> Don't use this to pass ServiceContext in remote method calls.
>> ######################
>>
>> Last sentence from Advanced tutorial is in contradiction to source
>> code comment. What is right? Should I send null or ServiceContext?
>>
>> Pavel
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Fornax-developer mailing list
>> Fornax-developer@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/ServiceContextStore-tp28463325s17564p28466016.html
> Sent from the Fornax-Platform mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Fornax-developer mailing list
> Fornax-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>

------------------------------------------------------------------------------
_______________________________________________
Fornax-developer mailing list
Fornax-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to