egovconcepts / jacp

Automatically exported from code.google.com/p/jacp
0 stars 0 forks source link

Synchronisation issue in message notify mechanism #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
all message notification run in EventDispatch thread  (Listener->observer); 
when fire two equal and long running messages to same component, the second 
message blocks when handled in observer. Solution: run action handling in 
separate threads.

See ASwingObserver:

@Override
    public synchronized void handle(final IAction<ActionEvent, Object> action) {
        final Map<String, Object> messages = action.getMessageList();
        for (final String targetId : messages.keySet()) {
            log(" handle message to: " + targetId);
            handleMessage(targetId, action);
        }

    }

Original issue reported on code.google.com by amo.a...@gmail.com on 16 Jun 2010 at 9:14

GoogleCodeExporter commented 9 years ago

Original comment by amo.a...@gmail.com on 30 Jun 2010 at 5:34

GoogleCodeExporter commented 9 years ago
changed synchronisation to action object; no deadlock occures anymore

Original comment by amo.a...@gmail.com on 30 Jun 2010 at 5:35

GoogleCodeExporter commented 9 years ago

Original comment by amo.a...@gmail.com on 30 Jun 2010 at 5:35