Professional Web Applications Themes

Problem with Java EventQueues - Mac Programming

Hi all, I am having trouble with Java EventQueues. I am working on a software that does some transactions. I have a swing based GUI. Some of the elements in the GUI (drop down boxes and buttons) have listeners. This is the problem that I am having. After each transaction ( which involves pulling down a drop down menu and clicking a button) two AWT-EventQueue Threads are being created. These threads are not exiting. I yzed to program using Borland OptimizeIt. Two threads are getting created per transaction (as expected). They are active during the duration of a transaction. But ...

  1. #1

    Default Problem with Java EventQueues

    Hi all,

    I am having trouble with Java EventQueues. I am working on a software
    that does some transactions. I have a swing based GUI. Some of the
    elements in the GUI (drop down boxes and buttons) have listeners.

    This is the problem that I am having. After each transaction ( which
    involves pulling down a drop down menu and clicking a button) two
    AWT-EventQueue Threads are being created. These threads are not
    exiting. I yzed to program using Borland OptimizeIt. Two threads
    are getting created per transaction (as expected). They are active
    during the duration of a transaction. But after the transaction ends
    these threads are not exiting. ( But they are idle). So after 20
    transaction I am left with 40 unwanted idle threads.

    Anybody got any clue what is going on.

    If you could mail me back any suggestions to tamu.edu I
    would really appreciate it.

    Thank you very much for your time,
    Paul Thomas
    Paul Guest

  2. #2

    Default Re: Problem with Java EventQueues

    On 9 Oct 2003 18:19:28 -0700, Paul Thomas <com>
    wrote:
     

    EventQueue threads don't exit... there's always the possibility that
    another event could be posted to their queue, and they'ld have to process
    it.

    Why are you creating your own event queues though? As opposed to just
    posting events to the system queue and let the system EDT take care of it,
    or spawning your own temporary threads? Or at a bare minimum, caching your
    queues so you're not recreating them...

    Hope this helps,

    Frank
    Frank Guest

  3. #3

    Default Re: Problem with Java EventQueues

    I am working on an old code. I am not sure why the original autor
    wanted to put custom event queues.

    Frank: are you sure that EventQueue threads dont exist. Because I am
    printing out the logs. In the logs the first entry is time, the second
    entry is the thread name. Here are a few typical entries

    Oct 9, 2003 8:36:13 PM AWT-EventQueue-4 from mouseClicked(MouseEvent
    e)
    Oct 9, 2003 8:36:19 PM AWT-EventQueue-4 CustomerSession: getCost =
    24.99
    Oct 9, 2003 8:36:19 PM AWT-EventQueue-4 CustomerSession: getReturns
    =1.75

    .... At some other part of the log I have entries like this...


    Oct 9, 2003 8:36:13 PM AWT-EventQueue-6 from mouseClicked(MouseEvent
    e)
    Oct 9, 2003 8:36:19 PM AWT-EventQueue-6 CustomerSession: getCost =
    35.78
    Oct 9, 2003 8:36:19 PM AWT-EventQueue-6 CustomerSession: getReturns
    =2.45

    From here it looks like there are threads with the name
    AWT-EventQueue-*. Are these real threads or quasi threads ?????
     
    >
    > EventQueue threads don't exit... there's always the possibility that
    > another event could be posted to their queue, and they'ld have to process
    > it.
    >
    > Why are you creating your own event queues though? As opposed to just
    > posting events to the system queue and let the system EDT take care of it,
    > or spawning your own temporary threads? Or at a bare minimum, caching your
    > queues so you're not recreating them...
    >
    > Hope this helps,
    >
    > Frank[/ref]
    Paul Guest

Similar Threads

  1. Can't run AIR extension for DW CS4 (Java / JRE problem) on Mac...
    By Ashor Livs in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 1
    Last Post: February 10th, 01:53 AM
  2. Java to Firefox Linking Problem
    By Bill Fahrenkrug in forum Ubuntu
    Replies: 3
    Last Post: November 29th, 10:08 PM
  3. Problem with Java 1.5
    By Snake007uk in forum Coldfusion - Getting Started
    Replies: 1
    Last Post: August 8th, 10:12 PM
  4. Problem with SQLJ and Java
    By gianluca in forum IBM DB2
    Replies: 0
    Last Post: August 22nd, 01:25 PM
  5. java problem with ie 6
    By steve4454 in forum Windows XP/2000/ME
    Replies: 4
    Last Post: July 7th, 04:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139