Hi,

I just noticed a small error in my advice: the class is not called
ThreadLocal but ThreadContext. The idea is very simple:

try {
  ThreadContext.setApplication(application);
  /* do your thing */
} finally {
  ThreadContext.setApplication(null);
}

The problem with this code is that you might potentially overwrite the
application in ThreadContext, therefore it is better to use the new
method from wicket-atmosphere-0.4-SNAPSHOT: EventBus.get(application).
0.4 is better than 0.3 anyway, because it supports multiple tabs for
the same page, has better cleanup on disconnections and is based on
atmosphere-1.0.0, which fixes many issues.

Best regards,
Emond

On Mon, Sep 10, 2012 at 4:13 PM, esajjkh <programmer.saj...@gmail.com> wrote:
> Hello Emonds,
>
> Thank you for your help.  Will you please enlighten your idea of attaching
> application with ThreadLocal with a code snippet?
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/HazelCast-and-Atmosphere-Integration-with-Wicket-6-tp4651891p4651894.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to