Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Two Event Queues. How come?

event queues
0
Posted

Two Event Queues. How come?

0

If you run your app with Web Start, you will end up with two event queues (AWT-EventQueue-0 and AWT-EventQueue-1). Web Start also has its own thread group called javawsApplicationThreadGroup. You will also get two application contexts (one for Web Start and one for your app). If you use RMI and Swing and touch up the GUI in your RMI callbacks than you will face the following threading bug: RMI creates threads for each connection; but in Web Start they’re created within the context of Web Start, not your app. This has the result that if you use SwingUtilities.invokeLater() from an RMI thread, it’ll be dispatched to the Web Start context, which has its own event queue thread. Your application also has an event queue thread, so your code is running in the wrong thread.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123