Hi Bruno,

Thanks for very important informations.

Anton


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bruno Schaeffer
Sent: Wednesday, November 15, 2006 5:15 PM
To: [email protected]
Subject: Re: [ULC-developer] Long-running asynchnous processes in servlet
container

Hi,

I would like to add the following:
Any newly spawned thread in ULC does not provide access to the ULC  
session, i.e. you cannot call ULCSession.getcurrentSession(). The  
reason is that the current session is held in a ThreadLocal variable  
which does not get propagated to newly created threads.
This might be a problem where the new thread makes a callback to ULC  
code which tries to get access to the current session. If you need  
access to the ULC session you have to provide an implementation of  
ICurrentSessionRegistry which uses an InheritableThreadLocal for the  
current session. In any case, modifications to ULCProxies should only  
be done in the ULC request handler thread or provided to the ULC  
request handler thread via invokeLater.

Regards

--Bruno


On 15.11.2006, at 15:14, Anton Levcik wrote:

> Thanks for advice,
>
> Anton
>
>
> -----Original Message-----
> From: Janak Mulani [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 14, 2006 11:50 AM
> To: Anton Levcik
> Cc: '[EMAIL PROTECTED] Com'
> Subject: RE: [ULC-developer] Long-running asynchnous processes in  
> servlet
> container
>
> Hi Anton,
>
> -          Does the new thread have  the same context as the  
> initial thread
> ULC application?
>
> For asynchronous tasks, new threads are spawned. But you should not be
> accessing ULC widgets from the new thread. In general you cannot  
> manipulate
> ULC components from threads other than the main application thread  
> because
> ULC adheres to the strict request-response model defined by J2EE.  
> All code
> must be executed as part of processing a client request.
>
> -          Is it correct issue, make new application thread in servlet
> container?
>
> Well the specifications  do not encourage. But people do it anyway.  
> However,
> one needs to be careful with the usual side effects of multi  
> threading. You
> can look at the following result from Google search:
>
> http://jguru.com/faq/view.jsp?EID=455215
>
> I hope this helps.
>
> Thanks and regards,
>
> Janak
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Anton Levcik
> Sent: Thursday, November 09, 2006 4:30 PM
> To: '[EMAIL PROTECTED] Com'
> Subject: [ULC-developer] Long-running asynchnous processes in servlet
> container
>
>
> Hi.
>
> I'd like to use model for long-running asynchronous tasks from ulc- 
> community
> Progress Pane extension.
> This model make asynchronous task through making new thread.
> In the connection I have two questions:
> -          Does the new thread have  the same context as the  
> initial thread
> ULC application?
> -          Is it correct issue, make new application thread in servlet
> container?
>
> Thanks and regards
>
>       Anton Levcik
>       CIS Bratislava,  Slovakia
>
>
>
>
>
>
> _______________________________________________
> ULC-developer mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/ulc-developer


------------------------------------------------------------------------
Bruno Schaeffer                                    Tel: +41 61 228 94 44
Canoo                                              Fax: +41 61 228 94 49
Kirschgartenstrasse 7
CH-4051 Basel
http://www.canoo.com                           [EMAIL PROTECTED]

Beyond AJAX - Java Rich Internet Applications   http://www.canoo.com/ulc
------------------------------------------------------------------------


_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer


_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to