Swings and Threads

My applet communicates with the database. To ensure that the GUI is updated in the Event-Dispatching Thread I am using a SwingWorker: in construct() the application communicates with DB, and in finished() it updates the GUI. In construct() of the SwingWorker thread I need to create a dialog box to prompt the user for an input like to chose a color or to answer yes/no.
My question is: Do I need to use invokeAndWait() to create the dialog box? The more general question is: do we use invokeLater() or SwingWorker only for GUIs that are shared by several threads or we have to use it for every swing we create after Event-Dispatching Thread started running?
Thank you

One of the fun things about Swing and its EventDispatchThread is that
doing things wrong (such as performing Swing operations from a thread
other than the EDT) is that more often than not, even though they are done
technically wrong, they will still appear to work, especially in small programs.
(In a larger sense, this applies to any multi-threaded program: things might
appear to work until the timing changes just a teensy bit...)
What's even more fun is working with someone who has previously only
done small programs and because of that, takes this approach in large programs, and then spending a large amount of time trying to figure out why
something sporadically stops working, only to trace it back to a Swing
operation being invoked from a thread other than the EDT. Fun!
You know how to do it correctly.
You know why to do it correctly.
But you choose not to. Good luck with that.

Similar Messages

  • Java swing and threading issue

    i am trying to update swing components from some thread. at my first try, i noticed this was a disaster. upon further research, i found out about the single-threaded model of swing events (i.e. event dispatching thread).
    i did more research and could NOT find a good example on how to update swing components from other threads. many examples were showing too much.
    can someone post a simple example on here? i just want to see how to properly update a swing component from a non-swing class using threading.

    I think its a simple example:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=621226
    Let us know what you think.

  • Creator Freeze Often -- SWING Worker thread also

    I'm developping an app with creator. And I have many freezes in several minutes long as some people mentioned before.
    I'm running win XP on an opeteron 244(1.8G) x2 , with 2G memory. I've updated creator to the latest updates, but it doesn't seem to be better.
    The things I found is that when I edit Session Bean , Creator takes especially long time to come up.
    At that time, SWING worker thread of Creator IDE also stopping, No update of display , I only look window frame.
    You know the SWING has a Single thread model ,so if some logic uses SWING worker's thread long time, all displying process will be stopped.
    Below is the stacktrace just after a few seconds when Creator freeze by editing Session Bean.
    I use the stacktrace tool at http://tmitevski.users.mcs2.netarray.com/trace.do
    Full thread dump Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode):
    "StackTrace Remote Thread" prio=5 tid=0x48b10418 nid=0x368 waiting on condition [0x00000000..0x4e85fbac]
    "Inactive RequestProcessor thread [Was:TimedWeakReference/org.netbeans.modules.projectapi.TimedWeakReference]" daemon prio=2 tid=0x48cc9e78 nid=0x634 in Object.wait() [0x4e89f000..0x4e89fbe8]
         at java.lang.Object.wait(Native Method)
         at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:692)
         - locked <0x1eeb8620> (a java.lang.Object)
    "Inactive RequestProcessor thread [Was:Default RequestProcessor/org.netbeans.modules.editor.NbEditorUI$2]" daemon prio=2 tid=0x48d00d18 nid=0x814 in Object.wait() [0x4e79f000..0x4e79fce8]
         at java.lang.Object.wait(Native Method)
         at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:692)
         - locked <0x1eeb8690> (a java.lang.Object)
    "Inactive RequestProcessor thread [Was:Java Children Provider/org.netbeans.modules.java.ui.nodes.elements.SourceChildren$4]" daemon prio=2 tid=0x48ce0d98 nid=0xd8c in Object.wait() [0x4e65f000..0x4e65fae8]
         at java.lang.Object.wait(Native Method)
         at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:692)
         - locked <0x1edbfe00> (a java.lang.Object)
    "Inactive RequestProcessor thread [Was:Suggestions Broker/org.netbeans.modules.tasklist.suggestions.SuggestionsBroker$2]" daemon prio=2 tid=0x473e1c80 nid=0x9fc in Object.wait() [0x4b84f000..0x4b84fbe8]
         at java.lang.Object.wait(Native Method)
         at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:692)
         - locked <0x1ed09d38> (a java.lang.Object)
    "Timer-48" prio=7 tid=0x492d4748 nid=0x930 in Object.wait() [0x4e43f000..0x4e43fa68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1eb90290> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-46" prio=7 tid=0x4831ede8 nid=0xff0 in Object.wait() [0x4e71f000..0x4e71fae8]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1ea9f428> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-44" prio=7 tid=0x48b26ab0 nid=0xc50 in Object.wait() [0x4e81f000..0x4e81fb68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1dc0d688> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-42" prio=7 tid=0x50f3bb68 nid=0x8f0 in Object.wait() [0x4e7df000..0x4e7dfa68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1db078b8> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-40" prio=7 tid=0x48bbde20 nid=0xf0c in Object.wait() [0x4e75f000..0x4e75f9e8]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1d85d2b8> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-38" prio=7 tid=0x50e67840 nid=0x8a4 in Object.wait() [0x4e6df000..0x4e6dfae8]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1d7bc160> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-36" prio=7 tid=0x48ba3f50 nid=0xf58 in Object.wait() [0x4e5df000..0x4e5dfd68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1d7bc1d8> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-34" prio=7 tid=0x48abb270 nid=0xee8 in Object.wait() [0x4e53f000..0x4e53fb68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1d339d68> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-32" prio=7 tid=0x47a6e050 nid=0xe98 in Object.wait() [0x4e69f000..0x4e69fa68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1b93e2e8> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-30" prio=7 tid=0x4925bd38 nid=0x9a8 in Object.wait() [0x4e4bf000..0x4e4bfa68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1b3022f0> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-28" prio=7 tid=0x4930aae8 nid=0x620 in Object.wait() [0x4b70f000..0x4b70fae8]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1af19770> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-26" prio=7 tid=0x485620c8 nid=0x120 in Object.wait() [0x4e59f000..0x4e59fb68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1978f0f8> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-24" prio=7 tid=0x46d7e9e8 nid=0xaf8 in Object.wait() [0x4e61f000..0x4e61fbe8]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x196f19e8> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "VCS Command Tasks Starter Loop" daemon prio=2 tid=0x48aeed00 nid=0x96c in Object.wait() [0x4e4ff000..0x4e4ffbe8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x18841770> (a org.netbeans.modules.vcscore.commands.CommandProcessor)
         at java.lang.Object.wait(Object.java:474)
         at org.netbeans.modules.vcscore.commands.CommandProcessor.executorStarterLoop(CommandProcessor.java:757)
         - locked <0x18841770> (a org.netbeans.modules.vcscore.commands.CommandProcessor)
         at org.netbeans.modules.vcscore.commands.CommandProcessor.access$700(CommandProcessor.java:65)
         at org.netbeans.modules.vcscore.commands.CommandProcessor$5.run(CommandProcessor.java:776)
         at java.lang.Thread.run(Thread.java:595)
    "Timer-16" prio=7 tid=0x46fa81a8 nid=0x69c in Object.wait() [0x4e3ff000..0x4e3ffd68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x151bf408> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-12" prio=7 tid=0x479eacf0 nid=0x2ec in Object.wait() [0x4b4df000..0x4b4dfce8]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1499b4e8> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "URLdisplayer" prio=7 tid=0x4865de20 nid=0xe2c in Object.wait() [0x4727f000..0x4727fd68]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x12a02bb0> (a org.netbeans.modules.extbrowser.NbDdeBrowserImpl$URLDisplayer)
         at java.lang.Object.wait(Object.java:474)
         at org.netbeans.modules.extbrowser.NbDdeBrowserImpl$URLDisplayer.getNextTask(NbDdeBrowserImpl.java:223)
         - locked <0x12a02bb0> (a org.netbeans.modules.extbrowser.NbDdeBrowserImpl$URLDisplayer)
         at org.netbeans.modules.extbrowser.NbDdeBrowserImpl$URLDisplayer.run(NbDdeBrowserImpl.java:235)
         at java.lang.Thread.run(Thread.java:595)
    "Text-Layout" prio=2 tid=0x475967e8 nid=0xa68 in Object.wait() [0x4b68f000..0x4b68fae8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x129e8cd0> (a org.netbeans.editor.view.spi.ViewLayoutQueue)
         at java.lang.Object.wait(Object.java:474)
         at org.netbeans.editor.view.spi.ViewLayoutQueue.waitForTask(ViewLayoutQueue.java:128)
         - locked <0x129e8cd0> (a org.netbeans.editor.view.spi.ViewLayoutQueue)
         at org.netbeans.editor.view.spi.ViewLayoutQueue$LayoutThread.run(ViewLayoutQueue.java:182)
    "MDR event dispatcher" daemon prio=2 tid=0x47b8b450 nid=0x9c8 in Object.wait() [0x4b88f000..0x4b88fa68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at org.netbeans.mdr.util.EventNotifier$EventsDelivery.run(EventNotifier.java:257)
         - locked <0x087d1b10> (a java.util.LinkedList)
         at java.lang.Thread.run(Thread.java:595)
    "DestroyJavaVM" prio=5 tid=0x00038890 nid=0x4e4 waiting on condition [0x00000000..0x0007fae8]
    "TimerQueue" daemon prio=5 tid=0x46da6908 nid=0x768 in Object.wait() [0x4716f000..0x4716fb68]
         at java.lang.Object.wait(Native Method)
         at javax.swing.TimerQueue.run(TimerQueue.java:233)
         - locked <0x07b22b68> (a javax.swing.TimerQueue)
         at java.lang.Thread.run(Thread.java:595)
    "AWT-EventQueue-1" prio=7 tid=0x46ea8478 nid=0x990 runnable [0x4820e000..0x4820fbe8]
         at java.net.Inet4AddressImpl.getHostByAddr(Native Method)
         at java.net.InetAddress$1.getHostByAddr(InetAddress.java:842)
         at java.net.InetAddress.getHostFromNameService(InetAddress.java:532)
         at java.net.InetAddress.getHostName(InetAddress.java:475)
         at java.net.InetAddress.getHostName(InetAddress.java:447)
         at java.net.InetSocketAddress.getHostName(InetSocketAddress.java:210)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:341)
         at java.net.Socket.connect(Socket.java:507)
         at java.net.Socket.connect(Socket.java:457)
         at java.net.Socket.<init>(Socket.java:365)
         at java.net.Socket.<init>(Socket.java:207)
         at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:142)
         at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280)
         at com.mysql.jdbc.Connection.createNewIO(Connection.java:1774)
         at com.mysql.jdbc.Connection.<init>(Connection.java:437)
         at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:268)
         at com.sun.rave.sql.DesignTimeDataSource.getConnection(DesignTimeDataSource.java:238)
         at com.sun.rave.sql.DesignTimeDataSource.getConnection(DesignTimeDataSource.java:214)
         at com.sun.sql.rowset.JdbcRowSetXImpl.connect(JdbcRowSetXImpl.java:410)
         at com.sun.sql.rowset.JdbcRowSetXImpl.prepare(JdbcRowSetXImpl.java:532)
         at com.sun.sql.rowset.JdbcRowSetXImpl.execute(JdbcRowSetXImpl.java:349)
         at caico.jsf.svc.itemSvc.<init>(itemSvc.java:81)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at java.lang.Class.newInstance0(Class.java:350)
         at java.lang.Class.newInstance(Class.java:303)
         at com.sun.rave.insync.beans.BeansUnit.instantiateBean(BeansUnit.java:884)
         at com.sun.rave.insync.live.LiveUnit.ressurectDesignBean(LiveUnit.java:339)
         at com.sun.rave.insync.live.LiveUnit.resurrect(LiveUnit.java:406)
         at com.sun.rave.insync.live.LiveUnit.sync(LiveUnit.java:294)
         at com.sun.rave.insync.live.LiveUnitWrapper.sync(LiveUnitWrapper.java:115)
         at com.sun.rave.insync.models.FacesModel.syncImpl(FacesModel.java:899)
         at com.sun.rave.insync.Model.sync(Model.java:207)
         at com.sun.rave.insync.Model.sync(Model.java:173)
         at com.sun.rave.insync.ModelSet$WindowManagerPropertyRegistry.processNodes(ModelSet.java:107)
         at com.sun.rave.insync.ModelSet$WindowManagerPropertyRegistry.propertyChange(ModelSet.java:125)
         at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
         at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
         at org.netbeans.core.windows.RegistryImpl.doFirePropertyChange(RegistryImpl.java:249)
         at org.netbeans.core.windows.RegistryImpl.tryFireChanges(RegistryImpl.java:222)
         at org.netbeans.core.windows.RegistryImpl.selectedNodesChanged(RegistryImpl.java:186)
         at org.netbeans.core.windows.RegistryImpl.topComponentActivated(RegistryImpl.java:138)
         at org.netbeans.core.windows.WindowManagerImpl.notifyRegistryTopComponentActivated(WindowManagerImpl.java:893)
         at org.netbeans.core.windows.Central.setActiveMode(Central.java:182)
         at org.netbeans.core.windows.Central.userActivatedMode(Central.java:1451)
         at org.netbeans.core.windows.view.DefaultView.userActivatedModeView(DefaultView.java:591)
         at org.netbeans.core.windows.view.ui.TabbedHandler$ActivationManager.handleActivation(TabbedHandler.java:477)
         at org.netbeans.core.windows.view.ui.TabbedHandler$ActivationManager.eventDispatched(TabbedHandler.java:425)
         at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:2206)
         at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2100)
         at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2099)
         at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2099)
         at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2099)
         at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2099)
         at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2099)
         at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2099)
         at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2099)
         at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:2058)
         at java.awt.Component.dispatchEventImpl(Component.java:3867)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3889)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    "Creator Error Handler Listener" prio=5 tid=0x4665f3d8 nid=0xf70 runnable [0x481cf000..0x481cfce8]
         at java.net.PlainSocketImpl.socketAccept(Native Method)
         at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
         - locked <0x0793baf0> (a java.net.SocksSocketImpl)
         at java.net.ServerSocket.implAccept(ServerSocket.java:450)
         at java.net.ServerSocket.accept(ServerSocket.java:421)
         at com.sun.rave.errorhandler.DebugServerThread.run(DebugServerThread.java:81)
    "Java2D Disposer" daemon prio=10 tid=0x467d6760 nid=0xa08 in Object.wait() [0x46c8f000..0x46c8fce8]
         at java.lang.Object.wait(Native Method)
         at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
         - locked <0x07451380> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
         at sun.java2d.Disposer.run(Disposer.java:107)
         at java.lang.Thread.run(Thread.java:595)
    "Active Reference Queue Daemon" daemon prio=2 tid=0x467bb638 nid=0xb70 in Object.wait() [0x46c4f000..0x46c4fd68]
         at java.lang.Object.wait(Native Method)
         at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
         - locked <0x07451408> (a java.lang.ref.ReferenceQueue$Lock)
         at org.openide.util.Utilities$ActiveQueue.run(Utilities.java:2465)
         at java.lang.Thread.run(Thread.java:595)
    "Timer-0" daemon prio=5 tid=0x4678f2f0 nid=0xaf0 in Object.wait() [0x46c0f000..0x46c0f9e8]
         at java.lang.Object.wait(Native Method)
         at java.util.TimerThread.mainLoop(Timer.java:509)
         - locked <0x07451498> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "AWT-Windows" daemon prio=7 tid=0x467a54a0 nid=0x790 runnable [0x46a6f000..0x46a6fa68]
         at sun.awt.windows.WToolkit.eventLoop(Native Method)
         at sun.awt.windows.WToolkit.run(WToolkit.java:269)
         at java.lang.Thread.run(Thread.java:595)
    "AWT-Shutdown" prio=5 tid=0x467a5008 nid=0xafc in Object.wait() [0x46a2f000..0x46a2fae8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x07451568> (a java.lang.Object)
         at java.lang.Object.wait(Object.java:474)
         at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
         - locked <0x07451568> (a java.lang.Object)
         at java.lang.Thread.run(Thread.java:595)
    "CLI Requests Server" daemon prio=5 tid=0x4676b380 nid=0xa64 runnable [0x4693f000..0x4693fbe8]
         at java.net.PlainSocketImpl.socketAccept(Native Method)
         at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
         - locked <0x07451720> (a java.net.SocksSocketImpl)
         at java.net.ServerSocket.implAccept(ServerSocket.java:450)
         at java.net.ServerSocket.accept(ServerSocket.java:421)
         at org.netbeans.CLIHandler$Server.run(CLIHandler.java:758)
    "Low Memory Detector" daemon prio=5 tid=0x00ab83b8 nid=0xee0 runnable [0x00000000..0x00000000]
    "CompilerThread0" daemon prio=10 tid=0x00ab7020 nid=0x9c4 waiting on condition [0x00000000..0x465cfa4c]
    "Signal Dispatcher" daemon prio=10 tid=0x00ab6470 nid=0x31c runnable [0x00000000..0x00000000]
    "Finalizer" daemon prio=9 tid=0x00aa95e0 nid=0x85c in Object.wait() [0x4654f000..0x4654fa68]
         at java.lang.Object.wait(Native Method)
         at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
         - locked <0x074519c0> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
         at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
    "Reference Handler" daemon prio=10 tid=0x00aa8150 nid=0xf1c in Object.wait() [0x4650f000..0x4650fae8]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
         - locked <0x07451590> (a java.lang.ref.Reference$Lock)
    "VM Thread" prio=10 tid=0x00aa5780 nid=0x808 runnable
    "VM Periodic Task Thread" prio=10 tid=0x00ab9858 nid=0x1b0 waiting on condition

    Use a SwingUtilities.invokeLater(...) to invoke the main GUI. This will allow the button to repaint itself before the main GUI is invoked.

  • Implementing sockets and threads in a jframe gui program

    Hi, I am trying to find a solution to a problem I am having designing my instant messenger application.
    I am creating listening sockets and threads for each client logged into the system. i want to know if there is a way to listen to other clients request from the main gui and then if another client tries to establish a connection with me for example, a thread is created for that client and then my chat gui opens automatically has soon has the other client sends his or hers first text message to me.
    I am relatively new at socket programming has I am currently studying along this area. I know how to create threads and sockets but I am having trouble finding out a solution to my problem. Here is the code that I have done so far for the listening method from my main gui, and the thread class of what I have done so far.
    listening socket:
         private void listeningSocket()
                ServerSocket serverSocket = null;
                boolean listening = true;
                try
                    //listen in port 4444;
                    serverSocket = new ServerSocket(4444);
                catch(IOException x)
                    JOptionPane.showMessageDialog(null, "cannot listen to port 4444", null, JOptionPane.ERROR_MESSAGE);
                while(listening)
                    client_thread w;
                    try
                       w = new client_thread(serverSocket.accept(), jTextArea1);
                       Thread t = new Thread(w);
                       t.start();
                    catch(IOException x)
                         JOptionPane.showMessageDialog(null, "error, cannot start new thread", null, JOptionPane.ERROR_MESSAGE);
            }thread class:
    import java.io.*;
    import java.net.*;
    import javax.swing.*;
    import java.sql.*;
    import java.awt.event.*;
    * @author jonathan
    public class client_thread extends Thread
         //define new socket object
        private Socket client_user = null;
        private JTextArea textArea;
        public client_thread(Socket client_user, JTextArea textArea)
            this.client_user = client_user;
            this.textArea = textArea;
        public void run()
            BufferedReader in = null;
            PrintWriter out = null;
            String error = "error has occured, messege was not sent";
            String messege = null;
             try
                //create input and output streams
                in = new BufferedReader(new InputStreamReader (client_user.getInputStream()));
                out = new PrintWriter(client_user.getOutputStream(), true);
                while(true)
                   //read messege sent by user
                   messege = in.readLine();
                    //display messege in textfield
                   out.println(messege);
                   textArea.append(messege);
            catch (IOException e)
                //error messege
                JOptionPane.showMessageDialog(null, error, null, JOptionPane.ERROR_MESSAGE);
    }

    Seems like all you need to do is create a new dialog for each socket that is established. Your current design looks like it will attempt to use the same textarea for all the sockets.
    I would say in your thread class do the following:
    MyConversationDialog dialog = new MyConversationDialog();
    while(true)
                   //read messege sent by user
                   messege = in.readLine();
                    //display messege in textfield
                   out.println(messege);
                   dialog.setVisible (true);
                   dialog.addMessage (message);
                }

  • SwingGUIs and Threads

    Hello,
    I have written a progressDialog. And now I am not sure if I did it the right way. It looks like it is working. But especially I would like to know if the way I did it could be problematic in terms of the Swing EventDispatching Thread and my Thread.
    This is what I wanted to do:
    A Task's (that is run as a thread) progress shall be watchable via a modal progressDialog. The updatefrequency of the content of the dialog shall configurable and triggered by a timer. Also the must be a function like decidetopopup (millisces).
    This is how I did it:
    A class that extends Thread named ProgressTask has two timers as members: a timer that triggers the popup and a timer that triggers the JProgressDialog.updatecontent() frequently. updatecontent changes the status of the progressbar, sets a new title for the dialog if needed, changes the icon that is displayed in that dialog and changes the text in that dialog.
    So to sum it up:
    in the actionperformed eventhandler (the listener is that thread itself) is the Jprogressdialog.show() done
    in the same eventhandler is also the Jprogressdialog.updatecontent() done
    in the run method of the thread is the actual work done (i.e. Reading a file) some variables are set frequently (when progress is done) that contain information about the icon/title/text/progressvalue for the progressdialog.
    from the mainclass I do myProgressTask.start();

    Hello,
    I have written a progressDialog. And now I am not sure if I did it the right way. It looks like it is working. But especially I would like to know if the way I did it could be problematic in terms of the Swing EventDispatching Thread and my Thread.
    This is what I wanted to do:
    A Task's (that is run as a thread) progress shall be watchable via a modal progressDialog. The updatefrequency of the content of the dialog shall configurable and triggered by a timer. Also the must be a function like decidetopopup (millisces).
    This is how I did it:
    A class that extends Thread named ProgressTask has two timers as members: a timer that triggers the popup and a timer that triggers the JProgressDialog.updatecontent() frequently. updatecontent changes the status of the progressbar, sets a new title for the dialog if needed, changes the icon that is displayed in that dialog and changes the text in that dialog.
    So to sum it up:
    in the actionperformed eventhandler (the listener is that thread itself) is the Jprogressdialog.show() done
    in the same eventhandler is also the Jprogressdialog.updatecontent() done
    in the run method of the thread is the actual work done (i.e. Reading a file) some variables are set frequently (when progress is done) that contain information about the icon/title/text/progressvalue for the progressdialog.
    from the mainclass I do myProgressTask.start();

  • Example of WAIT and CONTINUE using checkBox and thread and getTreeLock()

    I had so much trouble with this that I descided to
    post if incase it helps someone else
    // Swing Applet example of WAIT and CONTINUE using checkBox and thread and getTreeLock()
    // Runs form dos window
    // When START button is pressed program increments x and displys it as a JLabel
    // When checkBox WAIT is ticked program waits.
    // When checkBox WAIT is unticked program continues.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    import java.io.*;
    public class Wc extends JApplet {
    Display canvas;//drawing surface is displayed.
    Box buttonPanel;
    Box msgArea;
    public static JButton button[] = new JButton [2];
    public static JCheckBox checkBox[] = new JCheckBox[2];
    public static JLabel msg[] = new JLabel [2];
    String[] buttonDesc ={"Start","Quit"};
    public static final int buttonStart = 0;
    public static final int buttonQuit = 1;
    String[] checkBoxDesc ={"Wait"};     
    public static final int checkBoxWait = 0;
    public boolean wait;
    public Graphics g;
    //================================================================
    public static void main(String[] args){
    Frame f = new Frame();
    JApplet a = new Wc();
    f.add(a, "Center"); // Add applet to window
    a.init(); // Initialize the applet
    f.setSize(300,100); // Set the size of the window
    f.show(); // Make the window visible
    f.addWindowListener(
    new WindowAdapter(){
    public void windowClosing(WindowEvent e){System.exit(0);}
    }// end main
    //===================================================
    public void init() {
    canvas = new Display();
    setBackground(Color.black);
    getContentPane().setLayout(new BorderLayout(3,3));
    getContentPane().add(canvas, BorderLayout.CENTER);
    buttonPanel = Box.createHorizontalBox();
    getContentPane().add(buttonPanel, BorderLayout.NORTH);
    int sbZ;
    // add button
    button[0] = new JButton(buttonDesc[0]);
    button[0].addActionListener(canvas);
    buttonPanel.add(button[0]);
    button[1] = new JButton(buttonDesc[1]);
    button[1].addActionListener(canvas);
    buttonPanel.add(button[1]);
    // add checkBox
    sbZ=0;
    checkBox[sbZ]=new JCheckBox(checkBoxDesc[sbZ]);
    checkBox[sbZ].setBackground(Color.white);
    checkBox[sbZ].setOpaque(true);
    checkBox[sbZ].addActionListener(canvas);
    buttonPanel.add(checkBox[sbZ]);
    msgArea = Box.createVerticalBox(); // add message
    sbZ=0;
    msg[sbZ]=new JLabel("1",JLabel.LEFT);
    msg[sbZ].setOpaque(true);
    msg[sbZ].setBackground(Color.black);
    msg[sbZ].setForeground(Color.red);
    msgArea.add(msg[sbZ]);
    getContentPane().add(msgArea, BorderLayout.SOUTH);
    } // end init();
    //===================================================
    public void stop(){canvas.stopRunning();}
    //===================================================
    // The following nested class represents the drawing surface
    // of the applet and also does all the work.
    class Display extends JPanel implements ActionListener, Runnable {
    Image OSI;
    Graphics OSG; // A graphics context for drawing on OSI.
    Thread runner; // A thread to do the computation.
    boolean running; // Set to true when the thread is running.
    public void paintComponent(Graphics g) {
    if (OSI == null) {
    g.setColor(Color.black);
    g.fillRect(0,0,getWidth(),getHeight());
    else {g.drawImage(OSI,0,0,null);}
    }//paintComponent
    public void actionPerformed(ActionEvent evt) {
    String command = evt.getActionCommand();
    if (command.equals(buttonDesc[buttonStart])) {
    startRunning();
    if (command.equals(buttonDesc[buttonQuit])) {
    stopRunning();
    if (command.equals(checkBoxDesc[checkBoxWait])){
    System.out.println("cb");
    if (checkBox[checkBoxWait].isSelected() ) {
    wait = true;
    System.out.println("cb selected twait "+wait);
    return;
    wait = false;
    synchronized(getTreeLock()) {getTreeLock().notifyAll();}
    System.out.println("cb selected fwait "+wait);
    } // end command.equal cb wait
    } //end action performed
    // A method that starts the thread unless it is already running.
    void startRunning() {
    if (running)return;
    // Create a thread that will execute run() in this Display class.
    runner = new Thread(this);
    running = true;
    runner.start();
    } //end startRunning
    void stopRunning() {running = false;System.exit(0);}
    public void run() {
    button[buttonStart].setEnabled(false);
    int x;
    x=1;
    while(x>0 && running){
    x = x + 1;
    msg[0].setText(""+x);
    try{SwingUtilities.invokeAndWait(painter);}catch(Exception e){}
    //importand dont put this in actionPerformed
    if (wait) {
    System.out.println("run "+wait);
    synchronized(getTreeLock()) {
    while(wait) {
    System.out.println("while "+wait);
    try {getTreeLock().wait();} catch(Exception e){break;}
    } //end while(wait)
    } // end sync
    } // end if(wait)
    } // endwhile(x>0)
    stopRunning();
    } // end run()
    Runnable painter = new Runnable() {
    public void run() {
    Dimension dim = msg[0].getSize();
    msg[0].paintImmediately(0,0,dim.width,dim.height);
    Thread.yield();
    }//end run in painter
    } ; //end painter
    } //end nested class Display
    } //end class Wc

    I just encountered a similar issue.  I bought a new iPhone5s and sent my iPhone4s for recycling as it was in great shape, no scratches, no breaks, perfect condition.  I expected $200 and received an email that I would only receive $24.12.  The explanation was as follows:  Phone does not power on - Power Supply Error.   Attempts to discuss don't seem to get past a customer service rep that can only "escalate" my concern.  They said I would receive a response, but by email.  After 4 days no response.  There is something seriously wrong with the technical ability of those in the recycling center.

  • I have a problem in this that i want to paas a form in a case that when user pres n then it must go to a form but error arises and not working good and threading is not responding

    made in cosmos help please need it
    using System;
    using Cosmos.Compiler.Builder;
    using System.Threading;
    using System.Windows.Forms;
    namespace IUOS
        class Program
            #region Cosmos Builder logic
            // Most users wont touch this. This will call the Cosmos Build tool
            [STAThread]
            static void Main(string[] args)
                BuildUI.Run();
            #endregion
            // Main entry point of the kernel
            public static void Init()
                var xBoot = new Cosmos.Sys.Boot();
                xBoot.Execute();
                Console.ForegroundColor = ConsoleColor.DarkBlue;
                a:
                Console.WriteLine("------------------------------");
                Console.WriteLine("WELCOME TO THE NEWLY OS MADE BY THE STUDENTS OF IQRA UNIVERSITY!");
                Console.WriteLine("------------------------------");
                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine("\t _____                                
                Console.WriteLine("\t|     |        |            |        
    |            |      |");
                Console.WriteLine("\t|     |        |            |        
    |            |      |");
                Console.WriteLine("\t|     |        |            |        
    |            |      |");
                Console.WriteLine("\t|     |        |            |        
    |            |      |___________");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|_____|        |____________|         |____________|      ____________");
                string input;
                Console.WriteLine();
                Console.Write("\nAbout OS     : a");
                Console.Write("\nTo Shutdown  : s");
                Console.Write("\nTo Reboot    : r");
                Console.Write("\nStart Windows Normaly : n");
                Console.WriteLine();
                input = Console.ReadLine();
                if (input == "s" || input == "S"){
                    Cosmos.Sys.Deboot.ShutDown();
                else
                if (input == "r" || input == "R"){
                    Cosmos.Sys.Deboot.Reboot();
                else
                if (input == "a" || input == "A"){
                    Console.ForegroundColor = ConsoleColor.DarkBlue;
                    Console.Clear();
                    Console.WriteLine("\n\n\n-------------------------------------");
                    Console.WriteLine("version: DISPLAYS OS VERSION");
                    Console.WriteLine("about: DISPLAYS INFO ABOUT ANGRY OS");
                    Console.WriteLine("hello or hi: DISPLAYS A HELLO WORLD");
                    Console.WriteLine("MESSAGE THAT WAS USED TO TEST THIS OS!!");
                    Console.WriteLine("-----------------------------------");
                    Console.Write("You Want to know : ");
                    input = Console.ReadLine();
                    if (input == "version"){
                        Console.WriteLine("--------------------");
                        Console.WriteLine("OS VERSION 0.1");
                        Console.WriteLine("--------------------");
                    else
                    if (input == "about"){
                        Console.WriteLine("--------------------------------------------");
                        Console.WriteLine("OS IS DEVELOPED BY Qazi Jalil-ur-Rahman & Syed Akber Abbas Jafri");
                        Console.WriteLine("--------------------------------------------");
                    Console.Write("Want to go back to the main window");
                    Console.Write("\nYes : ");
                    string ans = Console.ReadLine();
                    if (ans == "y" || ans == "Y")
                        goto a;
                        Thread.Sleep(10000);
                    else
                    if (input == "n" || input == "N")
                        Thread.Sleep(5000);
                        Console.Clear();
                        for (int i = 0; i <= 0; i++){
                            Console.Write("\n\n\n\n\t\t\t\t\t  ____        ____   ___  
                            Console.Write("\n\t\t|\t\t |  |      |    |     
    |   |  | |  |  |");
                            Console.Write("\n\t\t|\t|    |  |----  |    |     
    |   |  | |  |  |---");
                            Console.Write("\n\t\t|____|____|  |____  |___ |____  |___|  |    |  |___");
                            Thread.Sleep(500);
                        Thread.Sleep(5000);
                        Console.Clear();
                        BootUserInterface();
                        Console.ReadLine();
    //                    Form1 fo = new Form1();
                    else{
                        for (int i = 0; i <= 5; i++){
                            Console.Beep();
                            Thread.Sleep(1000);
                            goto a;
                while (true);
            private static void BootUserInterface() {
                Thread t = new Thread(UserInterfaceThread);
                t.IsBackground = true;
                t.SetApartmentState(ApartmentState.STA);
                t.Start();
            private static void UserInterfaceThread(object arg) {
                Form1 frm = new Form1();  // use your own
                Application.Run(frm);
     

    Hi
    Jalil Cracker,
    >>when user pres n then it must go to a form but error arises and not working good and threading is not respondin
    Could you post the error information? And which line caused this error?
    If you want to show Form1, you can use form.show() method
    Form1 frm = new Form1();
    frm.Show();
    In addition, Cosmos is an acronym for C# Open Source Managed Operating System. This is not Microsoft product.If the issue is related to Cosmos, it would be out of our support. Thanks for your understanding. And you need raise an issue at Cosmos site.
    Best regards,
    kristin
    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.

  • Java Swing and Socket Programming

    I am making a Messenger like yahoo Messenger using Swing and Socket Programming ,Multithreading .
    Is this techology feasible or i should try something else.
    I want to display my messenger icon on task bar as it comes when i install and run Yahoo Messenger.
    Which class i should use.

    I don't really have an answer to what you are asking. But I am developing the same kind of application. I am using RMI for client-server and server-server (i have distributed servers) communication and TCP/IP for client-client. So may be we might be able to help each other out. My email id is [email protected]
    Are you opening a new socket for every conversation? I was wondering how to multithread a socket to reuse it for different connections, if it is possible at all.
    --Poonam.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Weblogic Enterprise 5.1 and threads

    I know when building servers based on WLE 4.2 in was a big no-no to link in threading libraries like pthread and thread. Is this still the case in Weblogic Enterprise 5.1?

    According to the product information, WLE 5.1 does not support Oracle 8.1.6, it
    only goes up to
    Oracle 8.1.5. But in general, I thought that with oracle there are 2 sets of
    libraries, one for threads and
    one for non-threaded support. You need to use the correct one, in the case of
    WLE, that would be the
    non-threaded one.
    MAS
    Paul Power wrote:
    Thanks Mary,
    Do you know of any customers who have managed to work
    with Oracle 8.1.6 without linking with the thread libraries ?
    cheers,
    P.
    Mary Ann Slavin wrote in message <[email protected]>...
    WLE 5.1 C++ is not a threaded product. Compiling WLE 5.1 C++ with thread
    libraries is not supported and will give unpredictable results for allprograms.
    This should not be done.
    Paul Power wrote:
    Hi Mary,
    Is it a dictate from BEA that you "can't" link with thread libraries ?
    We are using WLE 5.0.1 ( and some 5.1) with Oracle 8.1.6 on
    Solaris and found that we had to link using -lthread in order to use
    Oracle (not the case in 8.1.5)
    We don't actually attempt to try any threading in our apps and
    have not had any problems yet but if it's the case that there
    are known problems using threads we'd love to hear about
    them :-)
    As an aside, is Oracle 8.1.6 cleared for use by WLE ?
    P.
    Mary Ann Slavin wrote in message <[email protected]>...
    No matter how WLE 5.1 C++ is used, it cannot be compiled with threadedlibraries, so that restriction remains.
    A WLE C++ server can act as a client and call a WLE Java Server. Doingthis does not require the WLE C++ server to be compiled with threaded
    libraries.
    Wendell MacKenzie wrote:
    Does this also mean if CORBA C++ servers want to invoke threaded
    JavaServers
    the same DEFECT will be prevent this from being accomplished?
    Mary Ann Slavin wrote:
    WLE 5.1 does not have threads in the C++ clients or servers. Java
    threads are naturally occuring in the language, however, there are WLE
    restrictions on what can be done in the
    Java threads. These are documented.
    jd wrote:
    I know when building servers based on WLE 4.2 in was a big no-no
    to
    link in threading libraries like pthread and thread. Is this still thecase
    in Weblogic Enterprise 5.1?
    >

  • Connect swing and J2EE

    In WEB Application i used JSP, Struts and J2EE.
    But Now use swing application, and something for joing swing and j2ee
    Somebody knows something...
    I need your help....

    In WEB Application i used JSP, Struts and J2EE.
    But Now use swing application, and something for joing
    swing and j2ee
    hopefully, no business logic is in struts; only the application logic (i.e. order of screens, input type validation, etc.). If this is the case you have many options:
    - direct calls to the ejb (assuming you have a service defined as an EJB)
    - SOAP, SOAP-RPC, or a full web-service (as mentioned above)
    - your own custom protocol over HTTP
    - RMI (probably too much work; easier to just make direct EJB calls)
    - JMS (probably more work than just using SOAP or HTTP)
    - Socket based communication with your own custom protocol
    Probably the fastest to get going is direct calls from swing to the EJB.
    You'll have to re-implement your application logic; but this is fine as the swing app will probably have a different flow than the web-app.
    Best of luck,
    Andrew

  • Documents and threads to start with Crystal reports with BI

    Hi,
    I am a BI consultant and searching for documents and threads to gain knowledge on Crystal reports .Could any one pls send me the pointers for the same...
    Kindly do the needful
    Points are assured.
    Thanks
    James

    You are in the right place for Crystal Reports and you may also want to look in the BI Forums.
    A good place to start is the Help file for Crystal Reports Designer and download our sample reports. They don't use B1 as the data source but it will help to see how to use CR.
    You need to specify specific questions and "how to's". Books have been written on how to use Crystal reports which is beyond the scope of this forum on one post.
    Thank you
    Don

  • MS 6.0 and Threads

    What is the official status of Measurement Studio 6.0 and Thread access? Right now all my DAQ stuff works great from Visual C++ 6.0 worker threads but my NiButton stuff doesn't. Is this expected? Do I still need to Post Messages to my NiButton controls in order to access them from within worker threads?
    Grant
    Grant M. Johnson
    Project Engineer
    LECO Corporation

    No, the User Interface controls should now support access from other threads. If you are seeing a problem, post the code or contact our tech support through http://www.ni.com/ask and we will see if we can give you an explanation.
    Best Regards,
    Chris Matthews
    National Instruments

  • User and thread feeds - wrong links in feed icon - Admins please check

    It seems (at least for me) that the user- and thread-specific feeds are broken. There are feed icons on user (for example: [https://forums.sdn.sap.com/profile.jspa?userID=3472354]) and thread (for example: [How to hide the columns in EVDRE]) pages. The tooltip for these icons indicate that it is a feed for the specific user or thread, but it actually just redirects to the main feed page where I can subscribe to individual forums.
    Am I doing something wrong here?
    Thanks!
    Ethan
    Edited by: Thomas Zloch on Oct 14, 2010 9:35 AM

    Hi David,
    No, that is incorrect. It is an issue with the SDN web page, not with the feeds or a feed reader. Try clicking on the little orange RSS icon at the bottom of this page. The page it redirects to is not an RSS feed - it is a web page that lists RSS feeds.
    For a long long time I thought that this was what was meant to happen. But I was really confused about why I couldn't find the feeds for threads or users, but the threads and users seemed to think that they had their own feeds. So I asked (a year ago).
    Then, more recently, I realized that the link at the bottom of the page was incorrect and if I re-jiggered it a little bit I could get to the actual RSS feed of the thread. Please take another look. Hopefully we can get this fixed!
    Thanks,
    Ethan

  • Understanding asynchronous BPEL processes and threading

    Hi everybody,
    I have a question regarding asynchronous BPEL processes and threading.
    I have an asynchronous BPEL process which delivers a message (picked up from a JMS topic) to a repository (via for instance an ICAN server). This transaction must be time-sensitive, i.e. first-in is first-out.
    If I have several threads running concurrently I have no guarantee that the messages are delivered in the same order that they where generated. It seems that the suggested way around this problem is to use single-threading.
    So here's the part that I do not understand:
    An asynchronous request does not wait for a response. If I use single-threading then what happens to that single-thread if for some reason (for instance the ICAN server is not responding) the BPEL instance is dehydrated? Is the thread still allocated for waiting for the first response or does it go back and pick up the next thing on the topic? If the next thing on the topic is picked up then how can I be sure that the messages are delivered in the correct order? If the thread is still allocated to the single instance then does that not kindda go against the whole concept of an asynchronous process?
    I hope some one can explain this to me.
    Thank you in advance.
    Kind regards,
    Mathias
    PS. This question is an attempt of a different angle on another forum thread: Asynchronuos BPEL - how to get the order of messages right?

    Hi again,
    A quick follow up question:
    Is there any way to have several BPEL processes running on the same server with different settings for how many threads to use?
    It seems that the only way to set number of threads used by BPEL is to use the configuration in the BPEL console? This is an domain setting - which means that all processes deployed to the server is effected the same way?
    I am asking because I am facing a scenario where I need one BPEL process to read from a AQ queue (well actually a topic) with a single thread and another BPEL process - deployed to the same BPEL server - to read from the same AQ queue with multiple threads.
    Does anyone have any idea of how to do this? Can it be done?
    Any suggestions, hints or reference to any documentation would be very much appreciated.
    Thank you in advance,
    Aagaard

  • Process and Thread

    I am new to the servlet and JSP technology.It is said that "Servlets and CGI differ mainly in Process and Thread.CGI used processes and Servlet technology uses Threads".I would like to know what exacly is the meaning of a process and a thread.How do we say that a process uses higher resources and hence a higher resource and memory overhead.
    What do we exactly mean by thread and how r they using less resources?When we say Thread t=new Thread(); what exactly is happening inside?

    A thread runs with in the context of the JVM process.
    http://java.sun.com/docs/books/tutorial/essential/threads/definition.html
    A process is the running of an executable. A cgi can be a C .exe file or a perl script run under perl.exe.
    The thread is faster because the jvm process has been loaded into memory and initialized. For each cgi call the operating system has to load the code into memeory and intialize all the variables and resources.
    http://c2.com/cgi/wiki?CgiVsServlet
    http://www.disc.com/jdbcserv.html

Maybe you are looking for

  • Drivers Download for HP 15 e-038tx

    Hello, I need to download/install  all drivers of HP 15 e038tx for Window 7. I am trying to download and searching the driver software but not getting any suitable solutions. here I am eclosing the hardware ID's  - Inter(R) HD Graphics 4000 Propertie

  • The instructions for setting up icloud on windows 8 don't work

    The instructions for linking apple id to icloud for windows 8 do not work

  • Send me documents regarding all Seeburger  adapters and scenarios

    Hi All, Convery my best wishes to all. i got objects on Seeburger scenarios, on this i don't have any experience so please send me documents soon. particularly TRADACOMS ORDERS( and mapping program on this), OFTP, AS2 and remaining all seeburger adap

  • 1841 SEC K9 with HWIC-2FE

    Hi! Is it possible to use the HWIC-2FE module into the 1841 SEC/K9 bundle? Using the online Cisco Dynamic config tool, HWIC-2FE is not listed as an option when you select the 1841. Does it mean that this configuration won't work? Thanks very much for

  • Script to logout users from a specific group, when queries are long

    Hi, I have a requirement that users from a specific group need to be logged out, when they are running queries for more than say 20 mins. I could get the list of users from that group and could get the list of active sessions on the application, but