users@glassfish.java.net

RE: Background threading

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Sun, 23 Aug 2009 10:47:37 -0400

you could annotate @Resource to
inject a TimerService to your bean
when the TimerService signals timeout.. perform some action for the method
annotated @Timeout

http://java.sun.com/javaee/5/docs/tutorial/doc/bnboy.html#bnbpe

does this help?
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Sun, 23 Aug 2009 05:31:33 -0700
> From: marek_karczewski_at_yahoo.com.au
> To: users_at_glassfish.dev.java.net
> Subject: Background threading
>
>
> LS,
>
> I am writing a webapp using jsf on glassfish and have the following problem;
> in the app I want to implement an algorithm that could become time
> intensive. Therefore, I would like the algorithm to run in a background
> thread in order not to hold up the user session. I would like the user to be
> able to continue using the webapp, while the background thread is executing
> the algorithm. What is the best way to implement this ?
>
> Thank you,
> MPK
> --
> View this message in context: http://www.nabble.com/Background-threading-tp25102886p25102886.html
> Sent from the java.net - glassfish users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>

_________________________________________________________________
Windows Live: Keep your friends up to date with what you do online.
http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_online:082009