Open cursors and shared cached cursors

Hi
In addm report i found below recommendation, before any change in parameter i want to know about those parameters, is there any thumb rule for this parameters,
is there any drawback if i increase those parameters.
FINDING 7: 2.1% impact (10693 seconds)
Soft parsing of SQL statements was consuming significant database time.
RECOMMENDATION 1: Application Analysis, 2.1% benefit (10693 seconds)
ACTION: Investigate application logic to keep open the frequently used
cursors. Note that cursors are closed by both cursor close calls
and
session disconnects.
RECOMMENDATION 2: DB Configuration, 2.1% benefit (10693 seconds)
ACTION: Consider increasing the maximum number of open cursors a
session
can have by increasing the value of parameter "open_cursors".
ACTION: Consider increasing the session cursor cache size by
increasing
the value of parameter "session_cached_cursors".
RATIONALE: The value of parameter "open_cursors" was "300" during the
analysis period.
RATIONALE: The value of parameter "session_cached_cursors" was "20"
during the analysis period.
Thanks and Regards
Jafar

Jaffy
Your system suffers from soft parsing (according to ADDM), therefore:
- Increasing the value of open_cursors has no impact on soft parsing (only up to 9.2.0.4 open_cursors had a direct impact on that for PL/SQL programs).
- Increasing the value of session_cached_cursors might help reducing soft parsing. If it helps or not is really dependent from the application.
ADDM is probably advising to increase open_cursors as well, because the database engine will keep cursors open even if the application closes them.
HTH
Chris
PS: cursor_sharing might be helpful to reduce hard parses. It has no impact on soft parses... So, forget the hint about it.

Similar Messages

  • For oracle cursor and stored procedure.

    Hi,
    I wanted to call a PL/SQL function that opens a cursor and gets a cursor
    back as a Java result set.Actually there is a readymade program in
    http://www.oradoc.com/ora816/java.816/a81354/samapp5.htm#1016411
    in the name RefCursorExample.java
    Now what I wanted to know is in weblogic how to do that.
    For example I would like you to help me to give the weblogic equivalent of a
    single line in that program.
    call.registerOutParameter(1, OracleTypes.CURSOR);
    Instead of OracleTypes.CURSOR...what should I write for weblogic JDriver for
    oracle.
    Please refer to my program in the attachment. FYI weblogic is already
    running when I execute the program and it creates oracle connection pools.
    Please also look at the exceptions it throws below.
    Exceptions are
    Exception java.sql.SQLException: ORA-06550: line 1, column 15:
    PLS-00382: expression is of wrong type
    ORA-06550: line 1, column 9:
    PL/SQL: Statement ignored
    java.sql.SQLException: ORA-06550: line 1, column 15:
    PLS-00382: expression is of wrong type
    ORA-06550: line 1, column 9:
    PL/SQL: Statement ignored
    at
    weblogic.rmi.extensions.AbstractRequest.sendReceive(AbstractRequest.j
    ava:76)
    at
    weblogic.jdbc20.rmi.internal.WLStub2z3m13133166452s5z42a5c4u4a3b1v.ex
    ecute(WLStub2z3m13133166452s5z42a5c4u4a3b1v.java:415)
    at
    weblogic.jdbc20.rmi.internal.CallableStatementStub.execute(CallableSt
    atementStub.java:454)
    at
    weblogic.jdbc20.rmi.SerialPreparedStatement.execute(SerialPreparedSta
    tement.java:401)
    at OracleDataSource.main(OracleDataSource.java:49)
    I would be great if you can help me out.
    Sincerely,
    Praveen.C
    [OracleDataSource.java]

    Also, see this KBA.
    And KBA 1525432
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Why won't my trackpad work properly and the cursor will move on it's own and open windows and menu's randomly?

    I bought my Macbook Pro less than a year ago and the other night I was watching a TV show in itunes and I couldn't use the track pad. I was able to finally shut the Macbook down and the next morning I rebooted it. It was still acting weird and the trackpad was jumpy and would randomly start opening windows and menus as if someone was contriolling it remotely. I used my bluetooth mouse and it seemed to work ok until tonight when I was copying some files wirelessly (or trying to) and evey time I tried to select files the cursor would jump to another screen and open a menu and then select all and open all my file folders. I was able to get that to stop openin ght ewindows but I still can't use the track pad and the machine acts like it is possesed and has a mind of it's own. I have made sure file saring and screen sharing are off and the battery shows to be normal from doing the control+battery test. What is going on and how can I get this fixed?

    Look at this Apple support article and see if this is of any help:
    http://support.apple.com/kb/TS1449
    In addition, check the MBP battery which resides under your trackpad.  They have been known to swell up and interfere with the trackpad operation.
    Ciao.

  • Open and closed hand cursors

    I have a drag image application and I wanted to use the open and closed hand cursors to move the image about. It seems there is no easy way of accessing these in Java. After searching for cursor names etc.. I decided to hard code the cursors from the .gif image. Also I didn't want the .GIFs as files as this adds to loading problems so I ended up using arrays of pixels that took a little while to enter.
    I'm giving you the code if you ever need to use it as I typed it in and wouldn't want anyone else to have to do the same.
    int curWidth=32;
                   int curHeight=32;
                   int curCol;
                   Image img;
                   int x,y;
                   int closed_black[] = { 6,5,7,5,9,5,10,5,12,5,13,5,5,6,8,6,11,6,14,6,
                             15,6,5,7,14,7,16,7,6,8,16,8,5,9,6,9,16,9,4,10,
                             16,10,4,11,16,11,4,12,15,12,5,13,15,13,6,14,14,14,
                             7,15,14,15,7,16,14,16,0};
                   int closed_white[] = { 6,4,7,4,9,4,10,4,12,4,13,4,5,5,8,5,11,5,14,5,15,5,
                             4,6,6,6,7,6,9,6,10,6,12,6,13,6,16,6,4,7,15,7,17,7,
                             5,8,17,8,4,9,17,9,3,10,5,10,15,10,17,10,3,11,17,11,
                             3,12,16,12,4,13,16,13,5,14,15,14,6,15,15,15,6,16,
                             15,16,7,17,14,17,0};
                   int closed_whiteruns[] = {6,13,7,15,7,15,5,15,5,15,5,14,6,14,7,13,8,13,8,13,0};
                   int open_black[] = { 10,3,11,3,6,4,7,4,9,4,12,4,13,4,14,4,5,5,8,5,9,5,12,5,
                             15,5,5,6,8,6,9,6,12,6,15,6,17,6,6,7,9,7,12,7,15,7,16,7,18,7,
                             6,8,9,8,12,8,15,8,18,8,4,9,5,9,7,9,15,9,18,9,3,10,6,10,7,10,
                             18,10,3,11,7,11,17,11,4,12,17,12,5,13,17,13,5,14,16,14,6,15,
                             16,15,7,16,15,16,8,17,15,17,8,18,15,18,0};
                   int open_white[] = {10,2,11,2,6,3,7,3,9,3,12,3,13,3,5,4,8,4,10,4,11,4,15,4,
                             4,5,6,5,7,5,10,5,11,5,13,5,14,5,16,5,17,5,4,6,6,6,7,6,10,6,
                             11,6,13,6,14,6,16,6,18,6,5,7,7,7,8,7,10,7,11,7,13,7,14,7,17,7,
                             19,7,4,8,5,8,7,8,8,8,10,8,11,8,13,8,14,8,16,8,17,7,19,8,3,9,6,9,
                             16,9,17,9,19,9,2,10,4,10,5,10,19,10,2,11,18,11,3,12,18,12,4,13,
                             18,13,4,14,17,14,5,15,17,15,6,16,16,16,7,17,18,17,7,18,16,18,
                             8,19,15,19,0};
                   int open_whiteruns[] = {9,14,8,17,4,16,5,16,6,16,6,15,7,15,8,14,9,14,9,14,0};                    
                   int pix[] = new int[curWidth*curHeight];
                   for(y=0; y<=curHeight; y++) for(x=0; x<=curWidth; x++) pix[y+x]=0; // all points transparent
                   // black pixels
                   curCol=Color.black.getRGB();
                   int n=0;
                   while(closed_black[n]!=0)
                        pix[closed_black[n++]+closed_black[n++]*curWidth]=curCol;
                   // white pixels
                   curCol=Color.white.getRGB();
                   n=0;
                   while(closed_white[n]!=0)
                        pix[closed_white[n++]+closed_white[n++]*curWidth]=curCol;
                   // white pixel runs
                   n=0;
                   y=7;
                   while(closed_whiteruns[n]!=0) {
                        for(x=closed_whiteruns[n++];x<closed_whiteruns[n];x++)
                             pix[x+y*curWidth]=curCol;
                        n++; y++;
                   img = createImage(new MemoryImageSource(curWidth,curHeight,pix,0,curWidth));
                   closedhandCursor = Toolkit.getDefaultToolkit().createCustomCursor(img,new Point(5,5),"closedhand");
                   for(y=0; y<=curHeight; y++) for(x=0; x<=curWidth; x++) pix[y+x]=0; // all points transparent
                   // black pixels
                   curCol=Color.black.getRGB();
                   n=0;
                   while(open_black[n]!=0)
                        pix[open_black[n++]+open_black[n++]*curWidth]=curCol;
                   // white pixels
                   curCol=Color.white.getRGB();
                   n=0;
                   while(open_white[n]!=0)
                        pix[open_white[n++]+open_white[n++]*curWidth]=curCol;
                   // white pixel runs
                   n=0;
                   y=9;
                   while(open_whiteruns[n]!=0) {
                        for(x=open_whiteruns[n++];x<open_whiteruns[n];x++)
                             pix[x+y*curWidth]=curCol;
                        n++; y++;
                   img = createImage(new MemoryImageSource(curWidth,curHeight,pix,0,curWidth));
                   openhandCursor = Toolkit.getDefaultToolkit().createCustomCursor(img,new Point(5,5),"openhand");
                   setCursor(openhandCursor);you need to define openhandCursor and closedhandCursor with your other cursor definitions (I made them default to start with) and then just use setcursor as normal. There must be an easier way to do this!
    p.s. thanks to Martin Zvarik for the original code here: http://www.jguru.com/faq/view.jsp?EID=9958

    Hi,
    you can use the same query...Also check the new code after the select..
    SELECT BUKRS BELNR GJAHR <b>BSTAT</b>
    FROM BKPF
    INTO TABLE T_BKPF
    WHERE BUKRS = P_BUKRS
    AND BSTAT IN ( ' ' , 'A' ) " ' ' - Normal document, A - Parked doc
    AND BLART = P_BLART
    AND CPUDT IN SO_CPUDT " Selection screen input.
    IF NOT T_BKPF[] IS INITIAL.
    SELECT BUKRS BELNR GJAHR BUZEI EBELN AUGBL AUGBT
    INTO TABLE T_BSEG
    FOR ALL ENTRIES IN T_BKPF
    WHERE BUKRS = T_BKPF-BUKRS
    AND BELNR = T_BKPF-BELNR
    AND GJAHR = T_BKPF-GJAHR
    AND EBELN IN SO_EBELN " selection-screen input
    ENDIF.
    LOOP AT T_BKPF.
    Parked
      IF T_BKPF-BSTAT = 'A'.
        WRITE: / T_BKPF-BELNR , ' - Parked'.
    process the next record.
        CONTINUE.
      ENDIF.
    Check for Open / Closed.
      LOOP AT T_BSEG WHERE BELNR = T_BKPF-BELNR
                                   AND      BUKRS = T_BKPF-BUKRS
                                   AND      GJAHR = T_BKPF-GJAHR
                                   AND      AUGBL <> ' '.
        EXIT.
      ENDLOOP.
    If the return code is 0 then the document is cleared..
      IF sy-subrc = 0.
        WRITE: / T_BKPF-BELNR , ' - Closed'.
    Else the document is not cleared.
      ELSE.
        WRITE: / T_BKPF-BELNR , ' - Open'.
      ENDIF.
    ENDLOOP.
    Thanks,
    Naren

  • Can we open and close the cursor again and again

    hi all,
    with the help of cursor select statement i am writing some columns into the text file. while writing into the file in between i want to write something which belongs to others cursor. shall i close the first cursor and reopen it again..
    is its works?

    If you are using for loop the you don't need to open and close the cursor like:
    SQL> set autot off
    SQL> begin
      2     for i in (select ename, deptno, sal from emp)
      3     loop
      4             for j in (select dname from dept where deptno = i.deptno)
      5             loop
      6             dbms_output.put_line ('Ename:' || i.Ename ||'  Dept Name:'|| j.dname);
      7             end loop;
      8     end loop;
      9  end;
    10  /
    PL/SQL procedure successfully completed.
    SQL> set serveroutput on
    SQL> /
    Ename:SCOTT  Dept Name:RESEARCH
    Ename:first_0  Dept Name:SALES
    Ename:first_1  Dept Name:SALES
    Ename:first_0  Dept Name:RESEARCH
    Ename:first_1  Dept Name:SALES
    Ename:first_0  Dept Name:SALES
    Ename:first_1  Dept Name:ACCOUNTING
    Ename:first_0  Dept Name:RESEARCH
    Ename:first_1  Dept Name:ACCOUNTING
    Ename:first_0  Dept Name:SALES
    Ename:first_1  Dept Name:RESEARCH
    Ename:first_0  Dept Name:SALES
    Ename:first_1  Dept Name:RESEARCH
    Ename:first_0  Dept Name:ACCOUNTING
    PL/SQL procedure successfully completed.
    SQL> Or let us know about your requirements i.e. why you need to open/close the cursor again and again.

  • When I select the firefox icon to open the brower, the round cursor is flashing and jumping instead of twirling steadily like it used to. What is wrong?

    I'm not sure how to tell which Firefox version I have, but it was running smoothly before. Now when I click the Firefox icon in the task bar, to open the browser, the round cursor jumps and flicks on and off. Firefox does come on, but it seems like something is wrong. What is wrong that it is doing this?

    That is is always a problem when you are using multiple profiles and Firefox isn't running.
    It might work if no profile is selected (i.e. marked as Default=1 in profiles.ini).<br />
    You can use desktop shortcut that open with a specific profile (-P "profile").<br />
    There is also a setting in the Profile Manager (Don't ask at startup).

  • When I right click on a link to open in new tab and move my cursor into the dialog box the box dissapears this is new in the last 24 hours.

    I'm using Firefox 8.0 on Suse 11.4 today is 11/28/11 the past 24 hours I've been experiencing this: I always try to right click on links and open in new tab, lately when I do so and move the cursor into the dialog box the box disappears. Also if I online shop say for clothing, if I want to change size's when I click the button to do so nothing happens when I want to scroll down and pick a different size, (I can hi-light the size and click on it then when the window scrolls back up the default size is still there. This isn't consistent with all web sites.

    You can middle-click a link to open the link in a new tab.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • How can I get the cursor's position in a opened file and display a menu?

    Hello,
    I want to make a program by which I will be able to display a panel/pops up menu at the corsor's current position, (In any text/doc file or in the desktop, we can display a menu by right click of the mouse.) Now I want my program to do the same task.
    More clearly-
    1. First I would save some words or sentences in a file(aa.txt).
    2. Then I would open another text file/ a word/ excel/ or any other editor( bb.txt / cc.doc / dd.xls / ee.html ).
    3. While editing or writing something in the opened file, if I click the right mouse button/ press a key (ctrl+space), a menu will appear containing the sentences I saved in the file(aa.txt) previously.
    My program will tell me the cursor's position in bb.txt / cc.doc / dd.xls / ee.html that i opened. And display a menu. my problem is not reading / writing in a file.
    My problem is how can I get the cursor's position in a opened file display a menu at that position by a mouse/key action*.
    Would you please help me on this regard.
    Thanks

    DrClap wrote:
    I think the OP wants to start up an application like MS Word and then operate it from a Java program.Doesn't The Monkey's Paw do that? What a second, according to Wikipedia:
    [http://en.wikipedia.org/wiki/The_Monkey%27s_Paw]
    <quote>
    ...the paw of a dead monkey is a talisman that grants its possessor three wishes, but the wishes come with an enormous price.
    The moral of the story is contained in this description of the paw: "It had a spell put on it by an old fakir," said the sergeant-major, "a very holy man. He wanted to show that fate ruled people's lives, and that those who interfered with it did so to their sorrow."
    </quote>
    So I guess that a non-sequitor ... or is it?

  • My Mac book pro powers on and once on cursor moves but can not open anything with it.

    My Mac book pro powers on and once on cursor moves but can not open anything with it.

    ladislavfromcygnet wrote:
    Thank you Shootist007. I cannot do even Update now. I probably should have spent the same amount of money on a new IMac!
    No not really. If this is a brand new Macbook Pro take it back for a refund. Apple has a 14 day No Questions Asked return policy for Full refund.
    Take it back, get the Full Refund (DO NOT LET THEM TRY TO FIX IT. YOU BOUGHT A NEW COMPUTER NOT ONE THAT HAS BEEN WORKED ON OR NEEDS TO BE FIXED) and then decide whether to buy another Macbook Pro or the iMac. Or you could return it, get the Full refund and buy some other brand computer.

  • Every time I open iPhoto I get the loading cursor and nothing loads

    Every time I open iPhoto I get the loading cursor and nothing loads. I have tried to sync photos from my iPhone, from my iPad and nothing works. I do not want to restore my whole computer to a backed-up version because I have been using the other applications just fine. How do I restore just my iPhoto and not lose any pictures?

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
    Regards
    TD

  • How to use open cursor and iner join in one statement

    Hello All,
    Could any one post the code for the below question?
    How to use open cursor and iner join in one statement
    Regards,
    Lisa

    OPEN CURSOR c FOR SELECT     carrid connid fldate bookid smoker
                        FROM     sbook innerjoin shook
                        ORDER BY carrid connid fldate smoker bookid.
    Pls reward if helpful.

  • I have a problem mackeeper keep opening up another tab and these little green circle stuff keep popping up on the page and overtime my cursor hover over it it pops up a little box with stuff in it does anyone have an idea how to get rid of it?

    i have a problem mackeeper keep opening up another tab and these little green circle stuff keep popping up on the page and overtime my cursor hover over it it pops up a little box with stuff in it does anyone have an idea how to get rid of it?

    You installed a variant of the "VSearch" trojan. Remove it as follows.
    This malware has many variants. Anyone else finding this comment should not expect it to be applicable.
    Back up all data before proceeding.
    Triple-click anywhere in the line below on this page to select it:
    /Library/LaunchAgents/com.2c232f1e4d12129e.agent.plist
    Right-click or control-click the line and select
              Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item selected. Drag the selected item to the Trash. You may be prompted for your administrator login password.
    Repeat with each of these lines:
    /Library/LaunchDaemons/com.2c232f1e4d12129e.daemon.plist
    /Library/LaunchDaemons/com.2c232f1e4d12129e.helper.plist
    Restart the computer and empty the Trash. Then delete the following items in the same way:
    /Library/Application Support/2c232f1e4d12129e
    /System/Library/Frameworks/v.framework
    The trouble may have started when you downloaded and ran an application called "MPlayerX." That's the name of a legitimate free movie player, but the name is also used fraudulently to distribute VSearch. If there is an item with that name in the Applications folder, delete it, and if you wish, replace it with the genuine article from mplayerx.org.
    This trojan is often found on illegal websites that traffic in pirated content such as movies. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect more of the same, and worse, to follow. Never install any software that you downloaded from a bittorrent, or that was downloaded by someone else from an unknown source.
    In the Security & Privacy pane of System Preferences, select the General tab. The radio button marked Anywhere  should not be selected. If it is, click the lock icon to unlock the settings, then select one of the other buttons. After that, don't ignore a warning that you are about to run or install an application from an unknown developer.
    Then, still in System Preferences, open the App Store or Software Update pane and check the box marked
              Install system data files and security updates (OS X 10.10 or later)
    or
              Download updates automatically (OS X 10.9 or earlier)
    if it's not already checked.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • What is the sharable SQL except  bind varables and shared cursors?

    What is sharable SQL except bind varables and shared cursors?
    Specification: The value of CURSOR_SHARING parameter must be EXACT

    You haven't given much of the elaboration but whatever you have given, based on that shareable sql is that one which won't change. So if you have ran select * from emp for the first time and than would run it again, for you its a shareable sql.
    HTH
    Aman....

  • Cursor and Triggers.Please guide

    This is a cross post.no offence please
    I have written a trigger with a cursor
    and been advised to close the cursor
    in code called by triggers
    Can anyone tell me why this is useful?

    As Tom Kyte points out
    http://asktom.oracle.com/pls/ask/f?p=4950:8:11220850869708805739::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:1089433252941
    and we can check:
    SQL> select n.name, s.value from
      2  v$mystat s, v$statname n
      3  where s.statistic# = n.statistic#
      4  and n.name like '%cursor%';
    &nbsp
    NAME                                          VALUE
    opened cursors cumulative                       665
    opened cursors current                           26
    session cursor cache hits                         0
    session cursor cache count                        0
    cursor authentications                           46
    &nbsp
    SQL> declare
      2   cursor s is select * from emp;
      3  begin
      4   open s;
      5  end;
      6  /
    &nbsp
    PL/SQL procedure successfully completed.
    &nbsp
    SQL> select n.name, s.value from
      2  v$mystat s, v$statname n
      3  where s.statistic# = n.statistic#
      4  and n.name like '%cursor%';
    &nbsp
    NAME                                          VALUE
    opened cursors cumulative                       670
    opened cursors current                           26
    session cursor cache hits                         0
    session cursor cache count                        0
    cursor authentications                           47local cursor is closed whan it is gone out of scope.
    Scope here is an anonimous block.
    Whan the scope is "global", cursor keeps it's state
    between calls.
    Rgds.

  • Problem with JFrame and busy/wait Cursor

    Hi -- I'm trying to set a JFrame's cursor to be the busy cursor,
    for the duration of some operation (usually just a few seconds).
    I can get it to work in some situations, but not others.
    Timing does seem to be an issue.
    There are thousands of posts on the BugParade, but
    in general Sun indicates this is not a bug. I just need
    a work-around.
    I've written a test program below to demonstrate the problem.
    I have the problem on Solaris, running with both J2SE 1.3 and 1.4.
    I have not tested on Windows yet.
    When you run the following code, three JFrames will be opened,
    each with the same 5 buttons. The first "F1" listens to its own
    buttons, and works fine. The other two (F2 and F3) listen
    to each other's buttons.
    The "BUSY" button simply sets the cursor on its listener
    to the busy cursor. The "DONE" button sets it to the
    default cursor. These work fine.
    The "SLEEP" button sets the cursor, sleeps for 3 seconds,
    and sets it back. This does not work.
    The "INVOKE LATER" button does the same thing,
    except is uses invokeLater to sleep and set the
    cursor back. This also does not work.
    The "DELAY" button sleeps for 3 seconds (giving you
    time to move the mouse into the other (listerner's)
    window, and then it behaves just like the "SLEEP"
    button. This works.
    Any ideas would be appreciated, thanks.
    -J
    import java.awt.BorderLayout;
    import java.awt.Cursor;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    public class BusyFrameTest implements ActionListener
    private static Cursor busy = Cursor.getPredefinedCursor (Cursor.WAIT_CURSOR);
    private static Cursor done = Cursor.getDefaultCursor();
    JFrame frame;
    JButton[] buttons;
    public BusyFrameTest (String title)
    frame = new JFrame (title);
    buttons = new JButton[5];
    buttons[0] = new JButton ("BUSY");
    buttons[1] = new JButton ("DONE");
    buttons[2] = new JButton ("SLEEP");
    buttons[3] = new JButton ("INVOKE LATER");
    buttons[4] = new JButton ("DELAY");
    JPanel buttonPanel = new JPanel();
    for (int i = 0; i < buttons.length; i++)
    buttonPanel.add (buttons);
    frame.getContentPane().add (buttonPanel);
    frame.pack();
    frame.setVisible (true);
    public void addListeners (ActionListener listener)
    for (int i = 0; i < buttons.length; i++)
    buttons[i].addActionListener (listener);
    public void actionPerformed (ActionEvent e)
    System.out.print (frame.getTitle() + ": " + e.getActionCommand());
    if (e.getActionCommand().equals ("BUSY"))
    frame.setCursor (busy);
    else if (e.getActionCommand().equals ("DONE"))
    frame.setCursor (done);
    else if (e.getActionCommand().equals ("SLEEP"))
    frame.setCursor (busy);
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.print (" finished");
    else if (e.getActionCommand().equals ("INVOKE LATER"))
    frame.setCursor (busy);
    SwingUtilities.invokeLater (thread);
    else if (e.getActionCommand().equals ("DELAY"))
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (busy);
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.print (" finished");
    System.out.println();
    Runnable thread = new Runnable()
    public void run()
    try { Thread.sleep (3000); } catch (Exception ex) { }
    frame.setCursor (done);
    System.out.println (" finished");
    public static void main (String[] args)
    BusyFrameTest f1 = new BusyFrameTest ("F1");
    f1.addListeners (f1);
    BusyFrameTest f2 = new BusyFrameTest ("F2");
    BusyFrameTest f3 = new BusyFrameTest ("F3");
    f2.addListeners (f3); // 2 listens to 3
    f3.addListeners (f2); // 3 listens to 2

    I've had the same problems with cursors and repaints in a swing application, and I was thinking of if I could use invokeLater, but I never got that far with it.
    I still believe you would need a thread for the time consuming task, and that invokeLater is something you only need to use in a thread different from the event thread.

Maybe you are looking for

  • It can't (shouldn't) be this difficult...

    I've been using a simple home network with my G4 iGloo and a G4 iBook. The iGloo connects to an Ethernet Switch connected to an Airport Extreme which connects to the cable modem. iBook has an Airport card and is used to administer the AEBS. Everythin

  • DMS ERROR HTTP - 500

    Hi All, While creating the Content Repositories with T-CODE OAC0 I am getting the following error message. We are using the HTTP Content server on Window's 2003. If click on creat repositories then system gives this error. So please let me know what

  • How to combine revenue data on a same chart using the same axis

    Hi folks:    I'd like to create a chart like below... It's weekly revenue data from 2012, 2013 and 2014. I'd like to show all data using the same  X-Axis so that people would easily tell if it's going up or down... Do I have to create a MDX query for

  • Change the format of a capture datasorce

    Im trying to change the format(really the resolution) to display the video from my webcam in a small panel(160x120). RGBFormat format2 = new RGBFormat(new Dimension(160,120),76032,Format.byteArray,30,24,3,2,1,3,528,1,0);  //this is an example of form

  • AJAX & APEX Book Recommendation

    Hi Everybody, I am interested in picking up some AJAX reading material for those special days at the office when APEX's rapid development characteristics leave some free time in the afternoons. Does anybody have any AJAX recommendations that apply re