You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by mauro2java2011 <ma...@gmail.com> on 2013/09/25 11:35:11 UTC
cdi Events and SwingWorker
HI all.
I would use OWB or Weld into a my application SWing SE .
So i would use the simplified management of event of cdi .
I know that into swing application, i have to use the event dispatch Thread
for operation that update the GUI .
And for task long time i have to use the Swingorker and Executor for use a
Thread for the task and the EDT for update the GUI.
But i ask : how i can use a CDI event with SwingWorker?
mauro
--
View this message in context: http://openejb.979440.n4.nabble.com/cdi-Events-and-SwingWorker-tp4665277.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: cdi Events and SwingWorker
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Yep but i still don't see the issue. You can always forward the event to
your worker.
*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*
2013/9/25 mauro2java2011 <ma...@gmail.com>
> http://docs.oracle.com/javase/tutorial/uiswing/concurrency/worker.html
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/cdi-Events-and-SwingWorker-tp4665277p4665279.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Re: cdi Events and SwingWorker
Posted by mauro2java2011 <ma...@gmail.com>.
http://docs.oracle.com/javase/tutorial/uiswing/concurrency/worker.html
--
View this message in context: http://openejb.979440.n4.nabble.com/cdi-Events-and-SwingWorker-tp4665277p4665279.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: cdi Events and SwingWorker
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi
not sure I get you, the events are synchrnous so when fired you just need
to call
http://docs.oracle.com/javase/7/docs/api/javax/swing/SwingUtilities.html#invokeLater(java.lang.Runnable)
If the issue is the fact you are not more synchrnous then maybe use an EJB
@Synchronous to get the result.
*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*
2013/9/25 mauro2java2011 <ma...@gmail.com>
> HI all.
> I would use OWB or Weld into a my application SWing SE .
> So i would use the simplified management of event of cdi .
> I know that into swing application, i have to use the event dispatch Thread
> for operation that update the GUI .
> And for task long time i have to use the Swingorker and Executor for use a
> Thread for the task and the EDT for update the GUI.
> But i ask : how i can use a CDI event with SwingWorker?
> mauro
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/cdi-Events-and-SwingWorker-tp4665277.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>