Additional event queue appearing after RMI callback

Hi,
I am working on a client-server applicaion in which the client passes the server a callback object so it can be notified if shared data is changed so it can refresh.
After receiving the notification from server the processing is moved to a Runnable executed on the dispatch tread with SwingUtilities.invokeLater(Runnable).
But a case arose in which there there seems to appear an additional event queue.
The original event queue (Thread name is AWT-EventQueue-2) is busy. Then in a thread named "RMI TCP Connection(3)-192.168.1.4" a notification comes but it is dispatched on a thread named "AWT-EventQueue-0". But I want the notification processing happen after AWT-EventQueue-2 has finished its current task.
How can I avoid the additonal queue creation and what wrong am I doing so it is created(Swing is single-threaded as I have read everywhere)?
Thanks
Mike

I found a way to solve this but I am not sure it is good.
I save reference to the event queue the application uses on startup and instead of
SwingUtilities.invokeLater(changeRunnable)
use
systemQueue.postEvent(new java.awt.event.InvocationEvent(Toolkit.getDefaultToolkit(), changeRunnable));
Currently that works fine and change events are dispatched synchronously to the other things happening. But I wonder if there is a chance that the system queue is substituted in runtime by another queue and my reference will become invalid.
Mike

Similar Messages

  • Seeing " Warning The event queue appears to be stuck."

    I'm seeing some strange things since I changed to v3.6.1. Could be due to other changes made at roughly the same time but I suspect it's the new jars. I was reading what Patrick wrote here:
    http://blackbeanbag.net/wp/2009/07/20/coherence-3-5-service-guardian-deadlock-detection/...and I'm wondering now if my app is just not keeping up with the flow of events...?
    Thanks,
    Andrew
    2010-12-15 14:34:08.609/26.953 Oracle Coherence GE 3.6.1.0 <Info> (thread=AWT-EventQueue-0, member=34): null
    2010-12-15 14:34:08.609/26.953 Oracle Coherence GE 3.6.1.0 <Info> (thread=AWT-EventQueue-0, member=34): null
    2010-12-15 14:34:08.609/26.953 Oracle Coherence GE 3.6.1.0 <Info> (thread=AWT-EventQueue-0, member=34): null
    2010-12-15 14:34:08.609/26.953 Oracle Coherence GE 3.6.1.0 <Info> (thread=AWT-EventQueue-0, member=34): null
    2010-12-15 14:34:08.984/27.328 Oracle Coherence GE 3.6.1.0 <Warning> (thread=AWT-EventQueue-0, member=34): The event queue appears to be stuck.
    2010-12-15 14:34:08.984/27.328 Oracle Coherence GE 3.6.1.0 <Error> (thread=AWT-EventQueue-0, member=34): Full Thread Dump
    Thread[testASocketToServerThread1,5,main]
         java.lang.Thread.sleep(Native Method)
         testAbook.binary.client.testASocketToServerBinary$1.run(testASocketToServerBinary.java:99)
         java.lang.Thread.run(Thread.java:619)
    Thread[IpMonitor,6,Cluster]
         java.net.Inet4AddressImpl.isReachable0(Native Method)
         java.net.Inet4AddressImpl.isReachable(Inet4AddressImpl.java:52)
         java.net.InetAddress.isReachable(InetAddress.java:419)
         java.net.InetAddress.isReachable(InetAddress.java:378)
         com.tangosol.coherence.component.util.daemon.IpMonitor.onNotify(IpMonitor.CDB:12)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         java.lang.Thread.run(Thread.java:619)
    Thread[threadtestIMsgBase,1,main]
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Object.java:485)
         testIbook2.common.testIOrderRepository$1.run(testIOrderRepository.java:54)
         java.lang.Thread.run(Thread.java:619)
    Thread[AWT-EventQueue-0,6,main]
         java.lang.Thread.dumpThreads(Native Method)
         java.lang.Thread.getAllStackTraces(Thread.java:1487)
         com.tangosol.net.GuardSupport.logStackTraces(GuardSupport.java:810)
         com.tangosol.coherence.component.util.daemon.queueProcessor.Service$EventDispatcher.drainOverflow(Service.CDB:45)
         com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid$EventDispatcher.drainOverflow(Grid.CDB:9)
         com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.post(Grid.CDB:17)
         com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$BinaryMap.sendPartitionedRequest(PartitionedCache.CDB:64)
         com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$BinaryMap.getAll(PartitionedCache.CDB:12)
         com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$BinaryMap$EntryAdvancer.entrySetPage(PartitionedCache.CDB:31)
         com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$BinaryMap$EntryAdvancer.nextPage(PartitionedCache.CDB:18)
         com.tangosol.util.PagedIterator.hasNext(PagedIterator.java:71)
         com.tangosol.util.ConverterCollections$ConverterEntrySet$ConverterIterator.hasNext(ConverterCollections.java:3201)
         quoteclient.QuoteClient.addQuoteListener(QuoteClient.java:263)
         bbo.RediQuotes.<init>(RediQuotes.java:42)
         bbo.RediQuotes.getRediQuotes(RediQuotes.java:18)
         bbo.BBOTableRecord.getValue(BBOTableRecord.java:102)
         bbo.BBORecordsModel.getValueAt(BBORecordsModel.java:78)
         javax.swing.JTable.getValueAt(JTable.java:2685)
         javax.swing.JTable.prepareRenderer(JTable.java:5702)
         javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
         javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
         javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1770)
         javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
         javax.swing.JComponent.paintComponent(JComponent.java:752)
         javax.swing.JComponent.paint(JComponent.java:1029)
         javax.swing.JComponent.paintChildren(JComponent.java:862)
         javax.swing.JComponent.paint(JComponent.java:1038)
         javax.swing.JViewport.paint(JViewport.java:747)
         javax.swing.JComponent.paintChildren(JComponent.java:862)
         javax.swing.JComponent.paint(JComponent.java:1038)
         javax.swing.JComponent.paintToOffscreen(JComponent.java:5124)
         javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:278)
         javax.swing.RepaintManager.paint(RepaintManager.java:1224)
         javax.swing.JComponent._paintImmediately(JComponent.java:5072)
         javax.swing.JComponent.paintImmediately(JComponent.java:4882)
         javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:785)
         javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:713)
         javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:693)
         javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:125)
         java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
         java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Thread[Java2D Disposer,10,system]
         java.lang.Object.wait(Native Method)
         java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
         java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
         sun.java2d.Disposer.run(Disposer.java:125)
         java.lang.Thread.run(Thread.java:619)
    Thread[PacketListener1P,8,Cluster]
         java.net.PlainDatagramSocketImpl.receive0(Native Method)
         java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
         java.net.DatagramSocket.receive(DatagramSocket.java:712)
         com.tangosol.coherence.component.net.socket.UdpSocket.receive(UdpSocket.CDB:22)
         com.tangosol.coherence.component.net.UdpPacket.receive(UdpPacket.CDB:1)
         com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketListener.onNotify(PacketListener.CDB:20)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         java.lang.Thread.run(Thread.java:619)
    Thread[autoRetrieveBtNews,6,main]
         java.lang.Thread.sleep(Native Method)
         testAbook.report.testABookBtNews$1.run(testABookBtNews.java:53)
         java.lang.Thread.run(Thread.java:619)
    Thread[Signal Dispatcher,9,system]
    Thread[D3D Screen Updater,7,system]
         java.lang.Object.wait(Native Method)
         sun.java2d.d3d.D3DScreenUpdateManager.run(D3DScreenUpdateManager.java:421)
         java.lang.Thread.run(Thread.java:619)
    Thread[Invocation:Management,6,Cluster]
         java.lang.Object.wait(Native Method)
         com.tangosol.coherence.component.util.Daemon.onWait(Daemon.CDB:18)
         com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onWait(Grid.CDB:6)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:39)
         java.lang.Thread.run(Thread.java:619)
    Thread[AWT-Windows,6,main]
         sun.awt.windows.WToolkit.eventLoop(Native Method)
         sun.awt.windows.WToolkit.run(WToolkit.java:295)
         java.lang.Thread.run(Thread.java:619)
    Thread[DistributedCache:DistributedStatsCacheService,6,Cluster]
         java.lang.Object.wait(Native Method)
         com.tangosol.coherence.component.util.Daemon.onWait(Daemon.CDB:18)
         com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onWait(Grid.CDB:6)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:39)
         java.lang.Thread.run(Thread.java:619)
    Thread[testASocketToServerThread2,5,main]
         java.net.SocketInputStream.socketRead0(Native Method)
         java.net.SocketInputStream.read(SocketInputStream.java:129)
         sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
         sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
         sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
         java.io.InputStreamReader.read(InputStreamReader.java:167)
         java.io.BufferedReader.fill(BufferedReader.java:136)
         java.io.BufferedReader.read1(BufferedReader.java:187)
         java.io.BufferedReader.read(BufferedReader.java:261)
         testAbook.binary.client.testASocketToServerBinary$2.run(testASocketToServerBinary.java:167)
         java.lang.Thread.run(Thread.java:619)
    Thread[PacketReceiver,7,Cluster]
         java.lang.Object.wait(Native Method)
         com.tangosol.coherence.component.util.Daemon.onWait(Daemon.CDB:18)
         com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketReceiver.onWait(PacketReceiver.CDB:2)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:39)
         java.lang.Thread.run(Thread.java:619)
    Thread[PacketPublisher,6,Cluster]
         java.lang.Object.wait(Native Method)
         com.tangosol.coherence.component.util.Daemon.onWait(Daemon.CDB:18)
         com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketPublisher.onWait(PacketPublisher.CDB:2)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:39)
         java.lang.Thread.run(Thread.java:619)
    Thread[Logger@9254847 3.6.1.0,3,main]
         java.lang.Integer.toString(Integer.java:308)
         java.sql.Timestamp.toString(Timestamp.java:301)
         com.tangosol.coherence.component.util.daemon.queueProcessor.Logger.formatParameter(Logger.CDB:13)
         com.tangosol.coherence.component.application.console.Coherence$Logger.formatParameter(Coherence.CDB:40)
         com.tangosol.coherence.component.util.daemon.queueProcessor.Logger.formatMessage(Logger.CDB:23)
         com.tangosol.coherence.component.util.daemon.queueProcessor.Logger.onNotify(Logger.CDB:57)
         com.tangosol.coherence.component.application.console.Coherence$Logger.onNotify(Coherence.CDB:4)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         java.lang.Thread.run(Thread.java:619)
    Thread[DistributedCache:DistributedQuotesCacheService,6,Cluster]
         java.lang.Object.wait(Native Method)
         com.tangosol.coherence.component.util.Daemon.onWait(Daemon.CDB:18)
         com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onWait(Grid.CDB:6)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:39)
         java.lang.Thread.run(Thread.java:619)
    Thread[EventQueue:ContinuousQueryCache{Cache=stats._1_DAY_PERCENT_CHANGED, Filter=AlwaysFilter},5,EventQueue:ContinuousQueryCache{Cache=stats._1_DAY_PERCENT_CHANGED, Filter=AlwaysFilter}]
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Object.java:485)
         com.tangosol.util.TaskDaemon.takeNextRipeTask(TaskDaemon.java:345)
         com.tangosol.util.TaskDaemon.run(TaskDaemon.java:103)
         com.tangosol.util.Daemon$DaemonWorker.run(Daemon.java:781)
         java.lang.Thread.run(Thread.java:619)
    Thread[PacketListenerN,8,Cluster]
         java.net.PlainDatagramSocketImpl.receive0(Native Method)
         java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
         java.net.DatagramSocket.receive(DatagramSocket.java:712)
         com.tangosol.coherence.component.net.socket.UdpSocket.receive(UdpSocket.CDB:22)
         com.tangosol.coherence.component.net.UdpPacket.receive(UdpPacket.CDB:1)
         com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketListener.onNotify(PacketListener.CDB:20)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         java.lang.Thread.run(Thread.java:619)
    Thread[Cluster|Member(Id=34, Timestamp=2010-12-15 14:34:28.185, Address=192.168.3.26:8088, MachineId=27418, Location=machine:dab1,process:4020,member:s1, Role=BboBBOClientMain),6,Cluster]
         sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
         sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:273)
         sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorImpl.java:255)
         sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:136)
         sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
         sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
         com.tangosol.coherence.component.net.TcpRing.select(TcpRing.CDB:11)
         com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.ClusterService.onWait(ClusterService.CDB:6)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:39)
         java.lang.Thread.run(Thread.java:619)
    Thread[threadAutoRefreshBBO,5,main]
         java.lang.Thread.sleep(Native Method)
         bbo.BBORecordsModel$1.run(BBORecordsModel.java:152)
         java.lang.Thread.run(Thread.java:619)
    Thread[PacketListener1,8,Cluster]
         java.net.PlainDatagramSocketImpl.receive0(Native Method)
         java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
         java.net.DatagramSocket.receive(DatagramSocket.java:712)
         com.tangosol.coherence.component.net.socket.UdpSocket.receive(UdpSocket.CDB:22)
         com.tangosol.coherence.component.net.UdpPacket.receive(UdpPacket.CDB:1)
         com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketListener.onNotify(PacketListener.CDB:20)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         java.lang.Thread.run(Thread.java:619)
    Thread[testAOrderRepositoryBinaryThread,5,main]
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Object.java:485)
         testAbook.binary.common.testAOrderRepositoryBinary$1.run(testAOrderRepositoryBinary.java:47)
         java.lang.Thread.run(Thread.java:619)
    Thread[Reference Handler,10,system]
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Object.java:485)
         java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
    Thread[Thread-16,5,main]
         java.lang.Thread.sleep(Native Method)
         bbo.udp.BBOUDPRecords.refreshBBOUDP(BBOUDPRecords.java:299)
         bbo.udp.BBOUDPRecordsModel.refreshBBOUDP(BBOUDPRecordsModel.java:90)
         bbo.udp.BBOUDPRecordsModel$1.run(BBOUDPRecordsModel.java:107)
         java.lang.Thread.run(Thread.java:619)
    Thread[testASocketToServerThread3,5,main]
         java.net.SocketOutputStream.socketWrite0(Native Method)
         java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
         java.net.SocketOutputStream.write(SocketOutputStream.java:136)
         sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
         sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
         sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
         sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
         java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
         java.io.BufferedWriter.flush(BufferedWriter.java:236)
         testAbook.binary.client.testASocketToServerBinary$3.run(testASocketToServerBinary.java:248)
         java.lang.Thread.run(Thread.java:619)
    Thread[Attach Listener,5,system]
    Thread[DistributedCache:DistributedQuotesCacheService:EventDispatcher,6,Cluster]
         quoteclient.QuoteClient.p(QuoteClient.java:48)
         quoteclient.QuoteClient.entryUpdated(QuoteClient.java:95)
         com.tangosol.util.MapEvent.dispatch(MapEvent.java:270)
         com.tangosol.util.MapEvent.dispatch(MapEvent.java:226)
         com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:556)
         com.tangosol.coherence.component.util.SafeNamedCache.translateMapEvent(SafeNamedCache.CDB:7)
         com.tangosol.coherence.component.util.SafeNamedCache.entryUpdated(SafeNamedCache.CDB:1)
         com.tangosol.util.MapEvent.dispatch(MapEvent.java:270)
         com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ViewMap$ProxyListener.dispatch(PartitionedCache.CDB:22)
         com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ViewMap$ProxyListener.entryUpdated(PartitionedCache.CDB:1)
         com.tangosol.util.MapEvent.dispatch(MapEvent.java:270)
         com.tangosol.coherence.component.util.CacheEvent.run(CacheEvent.CDB:18)
         com.tangosol.coherence.component.util.daemon.queueProcessor.Service$EventDispatcher.onNotify(Service.CDB:26)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         java.lang.Thread.run(Thread.java:619)
    Thread[DistributedCache:DistributedStatsCacheService:EventDispatcher,6,Cluster]
         java.lang.Object.wait(Native Method)
         com.tangosol.coherence.component.util.Daemon.onWait(Daemon.CDB:18)
         com.tangosol.coherence.component.util.daemon.queueProcessor.Service$EventDispatcher.onWait(Service.CDB:7)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:39)
         java.lang.Thread.run(Thread.java:619)
    Thread[AWT-Shutdown,5,main]
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Object.java:485)
         sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:265)
         java.lang.Thread.run(Thread.java:619)
    Thread[EventQueue:ContinuousQueryCache{Cache=stats.OPEN_PRICE, Filter=AlwaysFilter},5,EventQueue:ContinuousQueryCache{Cache=stats.OPEN_PRICE, Filter=AlwaysFilter}]
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Object.java:485)
         com.tangosol.util.TaskDaemon.takeNextRipeTask(TaskDaemon.java:345)
         com.tangosol.util.TaskDaemon.run(TaskDaemon.java:103)
         com.tangosol.util.Daemon$DaemonWorker.run(Daemon.java:781)
         java.lang.Thread.run(Thread.java:619)
    Thread[readerThread,6,main]
         java.lang.Object.wait(Native Method)
         java.util.TimerThread.mainLoop(Timer.java:509)
         java.util.TimerThread.run(Timer.java:462)
    Thread[Thread-11,5,main]
         java.lang.Thread.sleep(Native Method)
         testIbook2.client.testIBBOSocketToServer$1.run(testIBBOSocketToServer.java:82)
         java.lang.Thread.run(Thread.java:619)
    Thread[threadReceive,5,main]
         java.net.SocketInputStream.socketRead0(Native Method)
         java.net.SocketInputStream.read(SocketInputStream.java:129)
         sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
         sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
         sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
         java.io.InputStreamReader.read(InputStreamReader.java:167)
         java.io.BufferedReader.fill(BufferedReader.java:136)
         java.io.BufferedReader.readLine(BufferedReader.java:299)
         java.io.BufferedReader.readLine(BufferedReader.java:362)
         testIbook2.client.testIBBOSocketToServer$2.run(testIBBOSocketToServer.java:171)
         java.lang.Thread.run(Thread.java:619)
    Thread[main,5,main]
         java.awt.Component.resize(Component.java:2045)
         java.awt.Component.setSize(Component.java:2035)
         java.awt.Window.setSize(Window.java:791)
         strategies.layout.LayoutViewer.openLayout(LayoutViewer.java:319)
         bbo.BBOClientMain.main(BBOClientMain.java:74)
    Thread[TimerQueue,5,system]
         java.lang.Object.wait(Native Method)
         javax.swing.TimerQueue.run(TimerQueue.java:232)
         java.lang.Thread.run(Thread.java:619)
    Thread[PacketSpeaker,8,Cluster]
         java.lang.Object.wait(Native Method)
         com.tangosol.coherence.component.util.queue.ConcurrentQueue.waitForEntry(ConcurrentQueue.CDB:16)
         com.tangosol.coherence.component.util.queue.ConcurrentQueue.remove(ConcurrentQueue.CDB:7)
         com.tangosol.coherence.component.util.Queue.remove(Queue.CDB:1)
         com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketSpeaker.onNotify(PacketSpeaker.CDB:21)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         java.lang.Thread.run(Thread.java:619)
    Thread[Invocation:Management:EventDispatcher,6,Cluster]
         java.lang.Object.wait(Native Method)
         com.tangosol.coherence.component.util.Daemon.onWait(Daemon.CDB:18)
         com.tangosol.coherence.component.util.daemon.queueProcessor.Service$EventDispatcher.onWait(Service.CDB:7)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:39)
         java.lang.Thread.run(Thread.java:619)
    Thread[Finalizer,8,system]
         java.lang.Object.wait(Native Method)
         java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
         java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
         java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
    2010-12-15 14:34:09.000/27.344 Oracle Coherence GE 3.6.1.0 <Info> (thread=AWT-EventQueue-0, member=34): null
    2010-12-15 14:34:09.015/27.359 Oracle Coherence GE 3.6.1.0 <Info> (thread=AWT-EventQueue-0, member=34): null
    2010-12-15 14:34:09.015/27.359 Oracle Coherence GE 3.6.1.0 <Info> (thread=AWT-EventQueue-0, member=34): null
    2010-12-15 14:34:09.015/27.359 Oracle Coherence GE 3.6.1.0 <Info> (thread=AWT-EventQueue-0, member=34): null
    2010-12-15 14:34:09.031/27.375 Oracle Coherence GE 3.6.1.0 <Info> (thread=AWT-EventQueue-0, member=34): null
    2010-12-15 14:34:09.046/27.390 Oracle Coherence GE 3.6.1.0 <Info> (thread=AWT-EventQueue-0, member=34): null
    2010-12-15 14:34:09.046/27.390 Oracle Coherence GE 3.6.1.0 <Info> (thread=AWT-EventQueue-0, member=34): null
    2010-12-15 14:34:12.203/30.547 Oracle Coherence GE 3.6.1.0 <Info> (thread=AWT-EventQueue-0, member=34): null
    2010-12-15 14:34:12.218/30.562 Oracle Coherence GE 3.6.1.0 <Info> (thread=AWT-EventQueue-0, member=34): null
    2010-12-15 14:34:12.218/30.562 Oracle Coherence GE 3.6.1.0 <Info> (thread=AWT-EventQueue-0, member=34): null
    2010-12-15 14:34:12.218/30.562 Oracle Coherence GE 3.6.1.0 <Info> (thread=AWT-EventQueue-0, member=34): null
    2010-12-15 14:34:12.218/30.562 Oracle Coherence GE 3.6.1.0 <Info> (thread=AWT-EventQueue-0, member=34): null
    2010-12-15 14:34:12.296/30.640 Oracle Coherence GE 3.6.1.0 <Info> (thread=DistributedCache:DistributedQuotesCacheService:EventDispatcher, member=34): null
    2010-12-15 14:34:12.296/30.640 Oracle Coherence GE 3.6.1.0 <Info> (thread=DistributedCache:DistributedQuotesCacheService:EventDispatcher, member=34): null
    2010-12-15 14:34:12.296/30.640 Oracle Coherence GE 3.6.1.0 <Info> (thread=DistributedCache:DistributedQuotesCacheService:EventDispatcher, member=34): null
    2010-12-15 14:34:12.312/30.656 Oracle Coherence GE 3.6.1.0 <Info> (thread=DistributedCache:DistributedQuotesCacheService:EventDispatcher, member=34): null

    Hi Tarun
    Please see the discussion in this thread GuardSupport logging thread dumps without giving a reason
    Paul

  • The event queue appears to be stuck.

    Hi,
    I am getting the below erros
    2010-05-06 11:25:19.046/5.281 Oracle Coherence GE 3.5.3/465 <Warning> (thread=ExtendTcpCacheService:TcpInitiator:TcpReader, member=n/a): The event queue appears to be stuck.
    2010-05-06 11:25:19.046/5.281 Oracle Coherence GE 3.5.3/465 <Error> (thread=ExtendTcpCacheService:TcpInitiator:TcpReader, member=n/a): Full Thread Dump
    I am getting all cache events back to my client application.
    is there any way to tune the event queue or something like that ?
    Regards
    S

    Hi Gene,
    The below is the thread dump.
    2010-05-06 15:50:33.952/7.625 Oracle Coherence GE 3.5.3/465 <Warning> (thread=ExtendTcpCacheService:TcpInitiator:TcpReader, member=n/a): The event queue appears to be stuck.
    2010-05-06 15:50:33.968/7.641 Oracle Coherence GE 3.5.3/465 <Error> (thread=ExtendTcpCacheService:TcpInitiator:TcpReader, member=n/a): Full Thread Dump
    Thread[Reference Handler,10,system]
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Object.java:485)
         java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
    Thread[Attach Listener,5,system]
    Thread[ExtendTcpCacheService:TcpInitiator:EventDispatcher,5,main]
         java.io.FileOutputStream.writeBytes(Native Method)
         java.io.FileOutputStream.write(FileOutputStream.java:260)
         java.io.BufferedOutputStream.write(BufferedOutputStream.java:105)
         java.io.PrintStream.write(PrintStream.java:430)
         sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
         sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
         sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:85)
         java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:168)
         java.io.PrintStream.write(PrintStream.java:477)
         java.io.PrintStream.print(PrintStream.java:619)
         java.io.PrintStream.println(PrintStream.java:773)
         com.test.coherence.samples.SimpleListener.onMapEvent(SimpleListener.java:11)
         com.tangosol.util.MultiplexingMapListener.entryInserted(MultiplexingMapListener.java:33)
         com.tangosol.util.MapEvent.dispatch(MapEvent.java:266)
         com.tangosol.util.MapEvent.dispatch(MapEvent.java:226)
         com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:556)
         com.tangosol.coherence.component.util.SafeNamedCache.translateMapEvent(SafeNamedCache.CDB:7)
         com.tangosol.coherence.component.util.SafeNamedCache.entryInserted(SafeNamedCache.CDB:1)
         com.tangosol.util.MapEvent.dispatch(MapEvent.java:266)
         com.tangosol.coherence.component.net.extend.RemoteNamedCache$ConverterListener.dispatch(RemoteNamedCache.CDB:5)
         com.tangosol.coherence.component.net.extend.RemoteNamedCache$ConverterListener.entryInserted(RemoteNamedCache.CDB:1)
         com.tangosol.util.MapEvent.dispatch(MapEvent.java:266)
         com.tangosol.coherence.component.util.CacheEvent.run(CacheEvent.CDB:18)
         com.tangosol.coherence.component.util.daemon.queueProcessor.Service$EventDispatcher.onNotify(Service.CDB:26)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         java.lang.Thread.run(Thread.java:619)
    Thread[ExtendTcpCacheService:TcpInitiator:TcpReader,5,main]
         java.lang.Thread.dumpThreads(Native Method)
         java.lang.Thread.getAllStackTraces(Thread.java:1477)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:597)
         com.tangosol.net.GuardSupport.logStackTraces(GuardSupport.java:791)
         com.tangosol.coherence.component.util.daemon.queueProcessor.Service$EventDispatcher.drainOverflow(Service.CDB:45)
         com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.post(Peer.CDB:9)
         com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.receive(Peer.CDB:26)
         com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.initiator.TcpInitiator$TcpConnection$TcpReader.onNotify(TcpInitiator.CDB:39)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         java.lang.Thread.run(Thread.java:619)
    Thread[Logger@27602911 3.5.3/465,3,main]
         java.lang.Object.wait(Native Method)
         com.tangosol.coherence.component.util.Daemon.onWait(Daemon.CDB:18)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:39)
         java.lang.Thread.run(Thread.java:619)
    Thread[main,5,main]
         java.lang.Object.wait(Native Method)
         com.tangosol.coherence.component.net.extend.message.Request$Status.waitForResponse(Request.CDB:43)
         com.tangosol.coherence.component.net.extend.Channel.request(Channel.CDB:20)
         com.tangosol.coherence.component.net.extend.Channel.request(Channel.CDB:1)
         com.tangosol.coherence.component.net.extend.RemoteNamedCache$BinaryCache.putAll(RemoteNamedCache.CDB:10)
         com.tangosol.util.ConverterCollections$ConverterMap.putAll(ConverterCollections.java:1595)
         com.tangosol.coherence.component.net.extend.RemoteNamedCache.putAll(RemoteNamedCache.CDB:1)
         com.tangosol.coherence.component.util.SafeNamedCache.putAll(SafeNamedCache.CDB:1)
         SimpleCacheTest.main(SimpleCacheTest.java:29)
    Thread[Signal Dispatcher,9,system]
    Thread[ExtendTcpCacheService:TcpInitiator,5,main]
         java.lang.Object.wait(Native Method)
         com.tangosol.coherence.component.util.Daemon.onWait(Daemon.CDB:18)
         com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:39)
         java.lang.Thread.run(Thread.java:619)
    Thread[Finalizer,8,system]
         java.lang.Object.wait(Native Method)
         java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
         java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
         java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

  • Additional 2 zeroes appear after flat file upload for New Taiwan Dollar

    Hi,
    Appreciate if anyone has encountered this issue when loading up flat file for New Taiwan Dollar currency. Example.
    Flat File Data
    0CHRT_ACCTS - SSG1
    0COMP_CODE - TW80
    0FISCYEAR - 2007
    0FISCPER     
    0FISCPER3     
    0VERSION - 1
    0VTYPE - 10
    0CURTYPE - 10
    0GL_ACCOUNT - 100050
    ZBDGT_USD -
    ZBDGT_LC     
    0LOC_CURRCY - TWD
    ZAUDIT_LC - 815,537
    After data is loaded into cube
    0CHRT_ACCTS - SSG1
    0COMP_CODE - TW80
    0FISCYEAR - 2007
    0FISCPER     
    0FISCPER3     
    0VERSION - 1
    0VTYPE - 10
    0CURTYPE - 10
    0GL_ACCOUNT - 100050
    ZBDGT_USD -
    ZBDGT_LC     
    0LOC_CURRCY - TWD
    ZAUDIT_LC - 81,553,700
    Appreciate any assistance. Points will be rewarded if solution can resolve issue.
    Best regards,
    Eric Tang

    Hi Simon,
    Ok, this is the a line from the flat file
    0CHRT_ACCTS - SSG1
    0COMP_CODE - TW80
    0FISCYEAR - 2007
    0FISCPER
    0FISCPER3
    0VERSION - 1
    0VTYPE - 10
    0CURTYPE - 10
    0GL_ACCOUNT - 100050
    ZBDGT_USD -
    ZBDGT_LC
    0LOC_CURRCY - TWD
    ZAUDIT_LC - 815,537
    and this is what is shown in the listcube
    0CHRT_ACCTS - SSG1
    0COMP_CODE - TW80
    0FISCYEAR - 2007
    0FISCPER
    0FISCPER3
    0VERSION - 1
    0VTYPE - 10
    0CURTYPE - 10
    0GL_ACCOUNT - 100050
    ZBDGT_USD -
    ZBDGT_LC
    0LOC_CURRCY - TWD
    ZAUDIT_LC - 81,553,700

  • "DEADLOCK" when showing dialog from RMI-callback.

    Hi!
    Today is the 10th day (full time) that I've been searching for a solution in Java Forums and Internet, but I couldn't find anything that helps me. Help is extremely appreciated, otherwise I'll go crazy! :-)
    The problem is that RMI-callback thread "somehow blocks" the Event Dispatch Thread.
    I want to do following:
    1) I push the button in the client (btDoSomething)
    (MOUSE_RELEASED,(39,14),button=1,modifiers=Button1,clickCount=1 is automatically pushed onto EventQueue)
    2) btDoSomethingActionPerformed is invoked
    3) inside of it I make a call to RMI-server (server.doSomething())
    4) from this server method I invoke RMI-callback back to the client (client.askUser())
    5) in the callback I want to display a question to the user (JOptionPane.showConfirmDialog)
    6) user should answers the question
    7) callback returns to server
    8) client call to the server returns
    9) btDoSomethingActionPerformed returns and everybody is happy :-)
    This works normally in normal Client, that means, while a button is pushed, you can show Dialogs, but with RMI callback I get problems.
    I just made a small client-server sample to simulate real project. What I want to achieve is that client invokes server method, server method does something, but if server method doesn't have enough information to make the decision it needs to do call back to the client and wait for input, so the user gets an JOptionPane.
    Here is my callback method:
        /** this is the remote callback method, which is invoked from the sevrer */
        public synchronized String askUser() throws java.rmi.RemoteException {
            System.out.println("askUser() thread group: " + Thread.currentThread().getThreadGroup());
            System.out.println("callback started...");
            try {
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        System.out.println("My event started...");
                        JOptionPane.showConfirmDialog(parentFrame, "Are you OK?", "Question", JOptionPane.YES_NO_OPTION);
                        System.out.println("My event finished.");
            }catch (Exception e) {
                e.printStackTrace();
            try {
                Thread.currentThread().sleep(10000);
            }catch (Exception e) {
                e.printStackTrace();
            System.out.println("callback finished.");
            return "Yo!"; // just return anything
        }Here in this sample I let the callback thread sleep for 10 seconds, but in real project I let it sleep infinitely and I want to wake it up after the user has answered JOptionPane. But I have the DEADLOCK, because event queue is waiting for callback to finish and doesn't schedule the "showing dialog" event which contains the command for waking up the callback thread.
    I looked very precisely when the event queue starts again to process events: it is precisely then when btDoSomethingActionPerformed is finished.
    When I'm not accessing GUI inside of the callback, this callback mechanism works perfectly, but as soon as I want to show the dialog from inside of the RMI-callback method, the "AWT Event Dispatch Queue" is somehow frozen until RMI-callback thread is finished (and in turn btDoSomethingActionPerformed terminates) . I cannot explain this weird behaviour!!!
    If I don't use SwingUtilities.invokeLater (I know this shoudn't be done outside of Event Dispatch Thread), but access the GUI directy, my JOptionPane is shown, but is not painted (it is blank gray) until callback thread returns.
    Why showing (or painting) of dialog is not done until btDoSomethingActionPerformed is finished?
    I also tried to spawn a new Thread inside of main RMI-callback thread, but nothing changed.
    I also tried the workaround from some older posting to use myInvokeLater:
        private final static ThreadGroup _applicationThreadGroup = Thread.currentThread().getThreadGroup();
        public void myInvokeLater(final Runnable code) {
            (new Thread(_applicationThreadGroup, new Runnable() {
                public void run() { SwingUtilities.invokeLater(code); }
            ).start();
        }but this didn't help either.
    Then I tried to spawn a new Thread directly from the Client's constructor, so that I'm sure that it belongs to the main appplication thread group. I even started that thread there in the constructor and made it wait for the callback. When callback came in, it would wake up that sleeping thread which should then show the dialog. But this did't help either.
    Now I think that it is IMPOSSIBLE to solve this problem this way.
    Spawning a new Process could work I think, but I'm not really sure if I want do to that.
    I know I could make a solution where server method is invoked and if some information is missing I can raise custom exception, provide the input on client side and call the same server mathod again with this additional data, but for that I need to change server RMI interfaces, etc... to fit in this concept. I thought callback would much easier, but after almost 10 days of trying the callback...I almost regreted it :-(
    Is anyone able to help?
    Thank you very much!
    Please scroll down for the complete sample (with build and run batch files), in case someone wants to try it. Or for the time being for your convenience you can download the whole sample from
    http://www.onlineloop.com/~tornado/download/rmi_callback_blocks_gui.zip
    ######### BEGIN CODE ####################################
    package callbackdialog;
    public interface ICallback extends java.rmi.Remote {
        public String askUser() throws java.rmi.RemoteException;
    package callbackdialog;
    public interface IServer extends java.rmi.Remote {
        public void doSomething() throws java.rmi.RemoteException;
    package callbackdialog;
    import java.rmi.Naming;
    public class Server {
        public Server() {
            try {
                IServer s = new ServerImpl();
                Naming.rebind("rmi://localhost:1099/ServerService", s);
            } catch (Exception e) {
                System.out.println("Trouble: " + e);
        public static void main(String args[]) {
            new Server();
    package callbackdialog;
    import java.rmi.Naming;
    public class ServerImpl extends java.rmi.server.UnicastRemoteObject implements IServer {
        // Implementations must have an explicit constructor
        // in order to declare the RemoteException exception
        public ServerImpl() throws java.rmi.RemoteException {
            super();
        public void doSomething() throws java.rmi.RemoteException {
            System.out.println("doSomething started...");
            try {
                // ask the client for the "missing" value via RMI callback
                ICallback client = (ICallback)Naming.lookup("rmi://localhost/ICallback");
                String clientValue = client.askUser();
                System.out.println("Got value from callback: " + clientValue);
            }catch (Exception e) {
                e.printStackTrace();
            System.out.println("doSomething finished.");
    package callbackdialog;
    import java.rmi.server.RemoteStub;
    import java.rmi.server.UnicastRemoteObject;
    import java.rmi.registry.Registry;
    import java.rmi.registry.LocateRegistry;
    import java.rmi.Naming;
    import javax.swing.JOptionPane;
    import javax.swing.SwingUtilities;
    import javax.swing.JFrame;
    public class Client extends javax.swing.JFrame implements ICallback {
        private final JFrame parentFrame = this;
        private Registry mRegistry = null;
        private RemoteStub remoteStub = null;
        private IServer server = null;
        private final static ThreadGroup _applicationThreadGroup = Thread.currentThread().getThreadGroup();
        /** Creates new form Client */
        public Client() {
            initComponents();
            System.out.println("Client constructor thread group: " + Thread.currentThread().getThreadGroup());
            try {
                server = (IServer)Naming.lookup("rmi://localhost/ServerService");
                // register client to the registry, so the server can invoke callback on it
                mRegistry = LocateRegistry.getRegistry("localhost", 1099);
                remoteStub = (RemoteStub)UnicastRemoteObject.exportObject((ICallback)this);
                Registry mRegistry = LocateRegistry.getRegistry("localhost", 1099);
                mRegistry.bind("ICallback", remoteStub);
            }catch (java.rmi.AlreadyBoundException e) {
                try {
                    mRegistry.unbind("ICallback");
                    mRegistry.bind("ICallback", remoteStub);
                }catch (Exception ex) {
                    // ignore it
            }catch (Exception e) {
                e.printStackTrace();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {
            java.awt.GridBagConstraints gridBagConstraints;
            secondTestPanel = new javax.swing.JPanel();
            btDoSomething = new javax.swing.JButton();
            getContentPane().setLayout(new java.awt.GridBagLayout());
            setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
            setTitle("RMI-Callback-GUI-problem sample");
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    formWindowClosing(evt);
            secondTestPanel.setLayout(new java.awt.GridBagLayout());
            btDoSomething.setText("show dialog");
            btDoSomething.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    btDoSomethingActionPerformed(evt);
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 0;
            gridBagConstraints.gridy = 3;
            gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
            secondTestPanel.add(btDoSomething, gridBagConstraints);
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 0;
            gridBagConstraints.gridy = 1;
            gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
            gridBagConstraints.weightx = 1.0;
            gridBagConstraints.weighty = 1.0;
            getContentPane().add(secondTestPanel, gridBagConstraints);
            pack();
        private void btDoSomethingActionPerformed(java.awt.event.ActionEvent evt) {                                             
            System.out.println(java.awt.EventQueue.getCurrentEvent().paramString());
            try {
                server.doSomething(); // invoke server RMI method, which will do the client RMI-Callback
                                      // in order to show the dialog
            }catch (Exception e) {
                e.printStackTrace();
        private void formWindowClosing(java.awt.event.WindowEvent evt) {                                  
            try {
                mRegistry.unbind("ICallback");
            }catch (Exception e) {
                e.printStackTrace();
            setVisible(false);
            dispose();
            System.exit(0);
        /** this is the remote callback method, which is invoked from the sevrer */
        public synchronized String askUser() throws java.rmi.RemoteException {
            System.out.println("askUser() thread group: " + Thread.currentThread().getThreadGroup());
            System.out.println("callback started...");
            try {
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        System.out.println("My event started...");
                        JOptionPane.showConfirmDialog(parentFrame, "Are you OK?", "Question", JOptionPane.YES_NO_OPTION);
                        System.out.println("My event finished.");
            }catch (Exception e) {
                e.printStackTrace();
            try {
                Thread.currentThread().sleep(10000);
            }catch (Exception e) {
                e.printStackTrace();
            System.out.println("callback finished.");
            return "Yo!"; // just return anything
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    Client client = new Client();
                    client.setSize(500,300);
                    client.setVisible(true);
        // Variables declaration - do not modify
        private javax.swing.JButton btDoSomething;
        private javax.swing.JPanel secondTestPanel;
        // End of variables declaration
    1_build.bat
    javac -cp . -d . *.java
    rmic callbackdialog.ServerImpl
    rmic callbackdialog.Client
    pause
    2_RunRmiRegistry.bat
    rmiregistry
    pause
    3_RunServer.bat
    rem java -classpath .\ Server
    java callbackdialog.Server
    pause
    4_RunClient.bat
    java callbackdialog.Client
    pause
    ######### END CODE ####################################

    I can understand that only partially, because SwingUtilities.invokeLater puts(redirects) my runnable object directly into AWT thread. The only conclusion I can draw from all things that I have tried until now , is that SwingUtilities.invokeLater(<showing the dialog>) invoked from a RMI thread somehow have lower "priority" than events coming directly from the AWT-thread and therefore it is held back until normal awt event completes (in this case BUTTON_RELEASED).
    But what I don't understand is the fact that the dialog is not shown even If I create and start a new thread from the client's constructor. This thread has nothing to do with RMI as it is in the main thread group:
        private BlockingObject dialogBlocker = new BlockingObject();
        private BlockingObject blocker = new BlockingObject();
        public Client() {
            initComponents();
            (new Thread() {
                public void run() {
                    try {
                        dialogBlocker.sleep(0);
                        System.out.println("My event started...");
                        JOptionPane.showConfirmDialog(parentFrame, "Are you OK?", "Question", JOptionPane.YES_NO_OPTION);
                        blocker.wake();
                        System.out.println("My event finished.");
                    }catch (Exception e) {
                        e.printStackTrace();
            }).start();
            ...Callback is then only used to wake up this thread which should display the dialog:
        public Object askUser() throws java.rmi.RemoteException {
            System.out.println("callback started...");
            dialogBlocker.wake();
            blocker.sleep(0);
            System.out.println("callback finished.");
            return userChoice; // return anything I don't care for now
    class BlockingObject {
        public void sleep(long timeout) {
            synchronized(this){
                try {
                    wait(timeout);
                }catch (InterruptedException e) {}
        public void wake() {
            synchronized(this){
                notifyAll();
        }In this case the dialog is shown, but it is NOT painted, so I have deadlock again. Why it is not painted?!?
    Haven't I uncouple it from RMI-Thread?
    But perhaps I'm looking at the wrong side of the whole thing.
    If I invoke server.doSomething (as ejp proposed) in a separate thread, then everything is fine (except that I cannot use this solution in my project :-( ).
    It seems that the whole problem is NOT AT ALL related to callback itself, but rather to the fact that if client invokes remote call, even dialogs can't be shown until the rmi call returns to the client.
    Thank you, Drindilica

  • After all event queue be empty

    Hello everyone,
    I know events are added to event queue from application thread or background thread (using Platfrom.runlater() ) . but I find out when some events add to event queue , UI dosent upadate until the event queue be empty (all events be handled ). My question is what object update UI after all event handled and more information about it .
    thanks

    Hi,
    QUEUE_NOT_EMPTY--> There are incompletely processed OCS requests in the tp buffer.
    Use the following tp command to display these requests-->
    tp SHOWBUFFER <SID> -D SOURCESYSTEMS= TAG=SPAM
    You can continue processing the queue as soon as these requests have been processed completely, or deleted from the tp buffer.
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/c6c2ad98a711d2b429006094b9ea64/content.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCUPGOCSSPAM/BCUPGOCSSPAM.pdf
    you probably forgot to confirm last SPAM or SAINT application.
    go into SPAM and choose CONFIRM
    go into SAINT, and choose FINISH
    OR
    It appears that already some support pack update is in process. So check tcode SPAM or SAINT and see whether anything is running.If it is running wait for it or see whether it is asking for confirmation.. then u need to confirm the queue.
    Also you can go to tcode SPAM and see display/define tab and see whether anything is available over there..if you are sure u dont want to import the ones in the queue,then just delete the queue using trash icon over there..
    Regards,
    Srini Nookala

  • [Windows8&8.1] Print queues-Root Print Queue device will appear after idle

    Hi All,
    I found the device Print queues will auto appear after idle on windows 8 or 8.1 OS.
    Does anybody know why? or any Hotfix can reference, thanks.

    Hi,
    For end user issue about OS, please consult on this forum:
    http://answers.microsoft.com/en-us/windows
    Regards,
    Barry Wang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Suggestions for debugging the event queue

    Hello,
    I have an issue where an exception is thrown inside the AWT-EventQueue-0 and I can't quite figure out where it's coming from. I can replicate it relatively easily, but the action that I do to replicate it actually does all kinds of stuff behind the scenes so it's not so easy to sort out what's going on. I'm debugging with eclipse if it matters. The stack trace mentions none of my code and only mentions java library code. I tried overriding dispatchEventImpl in the components I wrote that are involved in the aforementioned action that causes it to happen, with hope of catching the exception in there and putting a breakpoint or something to give me a clue, but apparently dispatchEventImpl cannot be overridden (not sure why). Ofcourse, once the EventQueue dies from this exception so does the rest of the GUI so that's no help either. I tried adding a break on uncaught ClassCastExceptions and make the break suspend the whole VM instead of just the one thread, and then I look at the two processor threads involved with the action above and that wasn't too much help, they were sitting waiting to read something from the queue, meaning it whatever is happening in the EventQueue is delayed enough that I can't rely on catching it that way. Any and all suggestions/hints/etc are highly appreciated.
    The components in question have a panel that's a Box (vertical) that contains subpanels, each with a title and a table (and those subpanels can be expanded/contracted to show/not show the table), the tables are sorted by one of their columns, the panels are sorted by the title, and panels/table rows are added and/or removed by messages coming in from a remote server. The user can click a button to "accept" a table row (which may appear in several of the subpanel tables) at which point the server is alerted to this, and any place this row is shown is removed).
    Here is the stack trace (i hope there are no typos, I had to retype it since machine code is on can't be networked to internet):
    Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException
    at javax.swing.LayoutComparator.compare(Unknown Source)
    at java.util.Arrays.mergeSort(Unknown Source)
    at java.util.Arrays.mergeSort(Unknown Source)
    at java.util.Arrays.mergeSort(Unknown Source)
    at java.util.Arrays.mergeSort(Unknown Source)
    at java.util.Arrays.mergeSort(Unknown Source)
    at java.util.Arrays.mergeSort(Unknown Source)
    at java.util.Arrays.mergeSort(Unknown Source)
    at java.util.Arrays.mergeSort(Unknown Source)
    at java.util.Arrays.sort(Unknown Source)
    at java.util.Collections.sort(Unknown Source)
    at javax.swing.SortingFocusTraversalPolicy.enumerateAndSortCycle(Unknown Source)
    at javax.swing.SortingFocusTraversalPolicy.getFirstComponent(Unknown Source)
    at javax.swing.LayoutFocusTraversalPolicy.getFirstComponent(Unknown Source)
    at javax.swing.SortingFocusTraversalPolicy.getDefaultComponent(Unknown Source)
    at java.awt.FocusTraversalPolicy.getInitialComponent(Unknown Source)
    at java.awt.Window.getMostRecentFocusOwner(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.SequencedEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

    I believe I maaaay have figured out what's going on, though I'm not sure how to go about fixing it, heh.
    Ok, so the Box that contains all the subpanels, I'm trying to keep sorted by title of the subpanels. For this reason (and other cross-referencing reasons) I keep a Vector of the object from which the title is constructed in the panel containing the box, as well as a Vector of the subpanels. When I wish to add a new panel I first add it to the Vector (and the title object to its Vector), then I sort those Vectors, then I do a removeAll() on the Box, then re-add the subpanels to the Box while stepping through the subpanel Vector, that way I'm guaranteed they are in order (actually it's probably unnecessary to keep the title vector in addition to the other one, I just haven't gotten around to trimming that kind of stuff out since I've been dealing with this issue). And it works fine.. seemingly.
    constructor()
      anEntry = new Vector<MySubpanel>();
      myTitlesVector = new Vector<TitleObject>();
      boxPanel = new Box(BoxLayout.Y_AXIS);
    //this function is called from a protected one that constructs the anEntry, makes sure it should be added, and does a synchronize on panelVector
    private void addEntry(MySubpanel anEntry)
      if(anEntry != null)
        try
          if(panelVector.add(anEntry))
            Collections.sort(panelVector);
            myTitlesVector.add(anEntry.title);
            Collections.sort(myTitlesVector);
            boxPanel.removeAll();
            for(int i = 0; i < panelVector.size(); i++)
              boxPanel.add(panelVector.get(i));
        catch (IllegalStateException isex)
          //couldn't add it
    }So what's the problem?
    Well, clicking the "accept" button I mentioned in the first post pops up a dialogue frame, which when the user OKs tells the server and other places in client that it was accepted. But when that dialogue box goes away the focus comes back to the main client frame. Well, that kicks off that sequence of calls in the event queue I put in the first post. If it just so happens that that topmost call is being performed on this panel containing the Box after the Box has gotten the removeAll() call, but before it's been filled back up to full, one or more of the MySubpanels will have a null for a parent, which causes the LayoutComparator to throw a ClassCastException.
    So, I guess my question would be, is there a better way to maintain order in the Box (one in which the components stay in there, but are just moved around)? I can't pass the Box itself to Collections. Is there a way to move components around what order they are in right on the Box?
    Thanks!

  • RMI Callback messages can not be sent to all clients

    we I send a message to all clients using RMI Callback the message dont arrive to all clients when one or more clients is disconnected without removing themselves from the hashtable at the server side .
    how i can know if the client is disconnected before sending the message to him using RMI callback taking into account that the client dosnt tell the server when he has disconnected.
    please i want a solution to this problem.
    thanks

    You seem to be making this a little complicated. During the login (or sometime) have one of the parms that are passed back to the server be a remote object on the client. It can have a nice interface like
    public void callMe(Object obj) throws .... or you could get cute and add
    pubic void shutDown() throws.... but this could be handled in the other method.
    During the call the client becomes the server and the server the client. The callMe method has no clue as to what thread it is on so it should just quickly queue up whatever it has gotten and return. It should not be doing work that will effect the Awt thread. If the client is no longer there then you should be able to catch this on the server, and continue posting other clients.
    Howie
    Your question is very similar to what I'm currently
    researching. I've got the additional complication of
    detecting when clients crash without unregistering (in
    my case unlocking) a resource. I haven't written any
    test code yet, so don't shoot me if I'm wrong, but
    here is my general strategy.
    In order to implementing RMI callbacks, it looks like
    you must make both the clients and the server register
    themselves in the RMI Registry. Parameters sent
    through RMI method calls are done by value so
    you can't simply add a listener as you normally do.
    The server will put itself in the registry using a
    well known ID. The clients will get this reference
    and ask the server for a unique ID. They will then
    register themselves in the RMI registry using this
    value. The client will then tell the server that it
    is registered. I believe if the client object is
    wrapped in a WeakReference, then when the client dies
    or ends, the reference contained in the WeakReference
    will be null. The server will perform this check on
    all registered clients to determine which clients are
    still alive.
    ,Marcus

  • How can I stop Exchange calendar event copies appearing in drafts?

    I use Outlook 2010 on a Windows machine at work. On my MacBook I use Outlook 2011 and have the Exchange calendar configured for iCal. Sync'ing works fine, except this one annoyance.
    Since upgrading to Mountain Lion copies of existing, repeating calendar events keep appearing in my Outlook drafts folder. Every few days I have to empty it, sometimes from 50 event copies or more.

    I too, was experiencing this. There seems to be no indication of a solution anywhere on the web. HOWEVER, I figured it out.
    Here's the solution: Strangely, it's not really an exchange issue, but rather an issue with calendaring on the OSX side.
    So you understand, here's the configuration that can cause problems:
    you are using an exchange server to connect your email/calendar/notes/tasks...
    You use a PC (or VM PC) for some/most of your exchange/outlook activities
    You may or may not have MS Office 2011 (Mac) installed.
    You have one or more Apple devices connected to your exchange account (iPhone, iPad, any Mac)
    After installing Mountain lion, you start noticing events being magically duplicated every few minutes in your outlook draft folder. If you delete an event, another one takes its place.
    HERE IS THE FIX:
    Short answer: Sync all calendars on all devices
    On the apple side (OSX, IOS) you MUST turn on calendar sync in all the exchange accounts on all your devices. I thought I had, then discovered that my MS Office Outlook on my Mac was missing that sync. It doesn't seem to matter which apple device is missing the sync, it only takes one of them. Once you set calendar sync to "on" for all the apple devices that access that calendar, just like magic, the phantom multi event creation stops.
    You should check all MS products on the OSX/IOS devices AND all apple devices that allow syncing. I haven't turned on notes sync through the cloud, so that isn't one of the items that cause problems.
    If you do this and the multi still appears, you missed something on one of your apple devices.
    Sweet!

  • Error while deleting events from the integration event queue

    I am trying to delete all the events from the integration event queue after reading it, like this (this is in Java):
            IntegrationEventWS_DeleteEvents_Input input = new IntegrationEventWS_DeleteEvents_Input();
            input.setDateTime("");
            input.setLastEventId("");
            try {
                 ((Default_Binding_IntegrationEventWS)onDemandStub).deleteEvents(input);
            } catch (Exception e) {
                 log.error("Deleting events from integration queue failed: ", e);
            }Alas, I get the following error message:
    Invalid method parameter(s): 'File Id'(SBL-ODS-50007)What does this mean? What is this mysterious "File Id" it supposedly gets? I don't see it anywhere in the SOAP message I'm sending and it isn't mentioned anywhere in the docs.
    Thanks in advance for any input.

    Dont keep this attributes null
    input.setDateTime(""); //Put a Default Time way in
    the past. Ex:"1/1/2000"
    input.setLastEventId(""); //pass the eventIdThe documentation states that those two are optional (although they are not nillable, for some reason). I tried to set the date to today, but I got the same result. Since setting a date is supposed to delete all events older than that date, I don't think setting it in the past will delete anything.

  • Flush Event Queue doesn't work with "Key up"

    Hi,
    probably just a simple thing I am missing here. See the attached VI (including SubVI). In case 1 I fetch the Key Up event for ENTER and issue a Value Change on the Stop Button. This results in a check for the string length and in case it is too short brings up a dialog telling you the ID string is too short and brings you back to the ID entry. Unfortunately - when confirming the dialog with ENTER instead of using the mouse on the button theKey Up event fired again and therefore fetched by the Event Structure.
    So I thought I just flush all events in the queue. To be sure, I put a time value on the flush function which proceeds AFTER the dialog is completed, so the ENTER Key Up should be deleted as well. Bummer is - it doesn't work. Anyone know why?
    I tried as well with the dynamic event, which I unregistered right after the Stop Event is issued in the Key Up case. I then "re"register for the Key Up event at the same time/position as the flush event queue function is positioned now in the VI below. Still no joy.
    What is my mistake? Thanks a lot.
    Solved!
    Go to Solution.
    Attachments:
    Manual_ID_Entry.llb ‏47 KB

    comrade wrote:
    I don't understand 2 things:
    a) Why is the Key up event even fired? It doesn't come from the VI where the event structure resides and to which "Instance" the event is bound (VI->Key up), but from the dialog box (which is a different VI). Unless a calling VI inherits all events from its SubVIs or something like that.
    b) Why isn't the event fired by the button in the dialog box discarded as the flush event queue function is supposed to perform?
    Because you are slow.  Not you personally.  But compared to the computer, you just don't stand a chance.  So you hit the Enter button on the dialog.  That dialog's OK button activates on the key down.  So the dialog is long gone by the time you manage to get your finger off of the Enter key.  In fact, you loop should be back around to be waiting for an event first.  So it is waiting for an event when you finally get your finger off of the button.  Hey, we have a Key Up event!
    Your current checking for the validity of the id is just flat out annoying.  Use the Key Down? event to check for a valid character being entered.  Notice the '?' in my choice of event there?  That means it is a filter event.  This means you can throw away (discard) the character being pressed before the control even sees it.  You could also discard if there are already enough characters (Greater Or Equal, not Equal).
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • NAPT Firewall, RMI Callbacks and JRMP MultiplexProtocol

    Hi All,
    I am looking at having an RMI client behind a Network Address Port Translation firewall receive RMI calls back from an RMI server. NAPT makes it impossible for the client to listen for connection coming from the server through the NAPT firewall.
    This is discussed at http://www.rmiproxy.com and http://cssassociates.com/rmifirewall.html but the proposed solutions do not appear to use the MultiplexProtocol protocol defined by JRMP (http://java.sun.com/j2se/1.4.2/docs/guide/rmi/spec/rmi-protocol3.html).
    The RMI FAQ
    "How can I receive incoming RMI calls through a local firewall"?
    (http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html#firewallIn) had a section for JSSE 1.3 that explained how to use the multiplex protocol (option 4). It sounds like this option referred to the JRMP MultiplexProtocol protocol.
    The multiplex protocol option has been removed from the 1.4 FAQ
    (http://java.sun.com/j2se/1.4.2/docs/guide/rmi/faq.html#firewallIn).
    Tried the "checkListen" and "socket factory" techniques mentioned in the 1.3 FAQ without success with 1.4.2. The RMI client behind the NAPT firewall runs in a signed Applet.
    Is the ability of using the JRMP MultiplexProtocol protocol available in the JRE in order to receive incoming RMI calls through a local firewall? If yes, what do you do in order to use it?
    What is the best way to have RMI callbacks work behind NAPT?
    Thanks a lot in advance!
    Cheers
    Bertrand

    As of about JDK 1.2.2, the ability of RMI clients to negotiate the multiplex protocol was
    removed, but the server-side support remains.
    Your best answer for negotiating NAT filrewalls may be the RMI Proxy http://www.rmiproxy.com, although I could be biased as I wrote it.
    EJP

  • Events not appearing across event-spanning days in ip 3gs

    Can you help pls
    I have a 3gs syncing via excange server. seems generally ok but events spanning several days do not appear in the iphone - just the start entry (eg in an event spanning 5 days, just appears in iphone on first day). The full event does appear on teh wbe or exchange version correctly, and the event itself, although not appearing in teh individual days correctly, is correctly entered - if I try to edit the event on iphone it does appear as a 5 day event.
    Any ideas please - or wheer can I get help?

    same issue here even after 8.1.1
    tried on two phones

  • Terminating Event to Event Queue due to Work Item Lock

    I have a dialog workflow task based on an asynchronous method defined with a terminating event.  When the user executes the work item, the method generates the terminating event (via a V2 change document) but the work item is enqueued (locked) by the same user (locked when they execute the work item from SBWP) and therefore the terminating event goes into error and is placed in the event queue.  The background job which processes the event queue does not redeliver the event so it stays in the event queue and the work item fails to complete.  Other than dequeing the work item lock myself with a function call how do I get around this catch 22?

    Hello Martin,
    Actually, the locking happens whether I have the task as asynchronous or synchronous.  The problem is the timing. If the user does not release the lock (by backing out of the dialog which is executed) prior to the terminating event attempting to enqueue and complete the work item then the event goes into error and is inserted into the event queue (and lingers there indefinitely, almost). Another issue with the asynchronous approach is that even if the user backs out of the dialog before the event actually attempts to complete the work item they will still see the work item in the inbox unless they click the refresh button when they get back to the inbox. 
    I have changed the task to synchronous but here is my scenario and another question.
    The process being workflowed is the approval of service entrysheets (similar to an invoice if you are not familiar with External Services).  In our process, there are a large number of documents being created and requiring approval by particular approvers.  It is a normal scenario for an approver to have, lets say 25 documents in his inbox awaiting approval. It was not practical for him to have to navigate back and forth between his inbox and the approval task screen.  Therefore, I give the users the option of (when executing a work item) having all the documents in his in-box (for this particular task) be presented in an approval list screen.  They can then do a mass approval of the 25 documents with 1 click and 1 navigation.  This list screen is also available to be executed outside workflow via a tcode.  So, when the user executes the mass approval (either from the inbox or outside workflow) the work items are terminated via the terminating event assigned to the approval task.
    A couple of issues remaining:
    1) Given my example of 25 work items (user executes 1 work item from in-box
    and I displayed all 25) being approved, when the user returns to the in-box, the 24
    items remain in his inbox until he clicks the refresh button since these were not actually "executed" from the workflow engines point of view.  However, these were terminated successfully because they were not "locked".
    <b>Question:</b> Is there a way (user exit?) to trigger the inbox refresh automatically.
    2) Now, the issue with the actual work item which the user executes from the inbox.  As I mentioned, the work item is locked as soon as the user executes it and is not released until they back out of the dialog or logoff.  So, here is what happens:  If the terminating event is sent before the lock is released the event is sent to the event queue.  If they then back out back to the in-box, its OK since I put some code in the SWO1 object type program (rememeber, its now synchronous) which will determine if they did the approval/rejection and the work item will complete and the event in the event queue will be deleted the next time the Event Queue Background job runs (it deletes any events for work items already in COMPLETED status). However, lets say they simply log off rather than backing up to the in-box or they don't do anything and are eventually logged off by timeout. In this case the code in the object type program to determine if the approval/rejection was done does not get executed (control does not return to the object type program) and the work item remains in "STARTED" status and remains in the users inbox and the event is in the event queue. So, now we have a work item that should be completed still sitting in the users in-box and the terminating event in the event queue. So the next time the user goes to their inbox the work item is still there.  The interesting thing is that though this may be confusing to the user, if they then attempt to execute the work item, they will get a message: "Work item currently being completed by event" (Message SWF_RUN 644) and the event sitting in the event queue gets redelivered and completes the work item.  To alleviate this problem I was thinking of adding a call to SAP_WAPI_WORKITEM_COMPLETE in the approval list screen after they do the approval but I'm guessing it wont work since it probably will try to enqueue the work item and it will still be locked. 
    Hopefully you haven't nodded off reading this rambling note...
    Thank you,
    Bob

Maybe you are looking for

  • How to access my itune account on someone else's computer

    How can I access my itune account on a computer that is not mine.

  • Questions about compiling kernel on archlinux

    hi...i'm new of this forum and new of archlinux i'm tryng to compiling a custom kernel in order not to replace the kernel26 package.. i prefere to make it with abs for managing it with pacman.. i followed the wiki but something went wrong.... i used

  • Attached Documents in the Production order

    Hello, My question is: how to setup the system to be able from the Production order to see (and have access)  to the documents attached to the BOM and/or Routing? Thank you in advance. Peter

  • Patch-upgrade questions

    I have been asked to get our phone servers all up to date with the latest OS patches (service releases) and have a question that i cannot seem to find an answer to. Our phone system consists of 4 servers (Cisco 78XX MCS) 2 of which are our Call Manag

  • Code for Lab execises in soa suite 10g

    Can anyone please give me the link where I can get the labs code for soa suite 10g.like FarenheitTocelsius.ear and validate.wsdl Any help is greatly appreciated.