DBA Reports large number of inactive sessions with 11.1.1.1

All,
We have installed System 11.1.1.1 on some 32 bit windows test machines running Windows Server 2003. Everything seems to be working fine, but recently the DBA is reporting that there are a large number of inactive sessions throwing alarms that we are reaching our Max Allowed Process on the Oracle Database server. We are running Oracle 10.2.0.4 on AIX.
We also have some System 9.3.1 Development servers that point at separate schemas in this environment and we don't see the same high number of inactive connections?
Most of the inactive connections are coming from Shared Services and Workspace. Anyone else see this or have any ideas?
Thanks for any responses.
Keith
Just a quick update. Originally I said this was only with 11.1.1.1 but we see the same high number of inactive sessions in 9.3. Anyone else see a large number of inactive sessions. They show up in Oracle as JDBC_Connect_Client. Does Shared Service, Planning Workspace etc utilize persistent connections or does it just abandon sessions when the windows service associated with an application is shutdown? Any information or thoughts are appreciated.
Edited by: Keith A on Oct 6, 2009 9:06 AM

Hi,
Not the answer you are looking for but have you logged it with Oracle as you might not get many answers to this question on here.
Cheers
John
http://john-goodwin.blogspot.com/

Similar Messages

  • Growing Number of Inactive Sessions

    When using WebDB application with 1.)Oracle Application Server 4.8.1 or 2.)Oracle 9i Application Server (Authentication Mode Basic) I noticed many sessions with status inactive in database.
    What is the methodology to logout the session from application and avoid growing number of inactive sessions?
    null

    -- Submits a dbms_job to cleanup sessions
    -- Expected Parameters:
    -- 1. hours_old - number of hours after session start before
    -- it should be deleted
    -- 2. start_time - when should the first job be run or 'START'
    -- 3. start_time_fmt - date format for start time
    -- 4. interval_hours - how many hours between each run
    -- If 'START' is provided for 2nd parameter, the 3rd parameter is
    -- ignored and it will default the start time to the current time.
    set serverout on
    set verify off
    create or replace package wwctx_patch is
    procedure cleanup_sessions
    p_hours_old IN number default 168 -- (1 week)
    end wwctx_patch;
    show errors package wwctx_patch;
    create or replace package body wwctx_patch as
    * cleanup expired sessions
    procedure cleanup_sessions
    p_hours_old IN number default 168 -- (1 week)
    is
    cursor expired_sessions is
    select rowid
    from wwctx_sso_session$
    where active = 0
    or (session_start_time < sysdate - (p_hours_old/24));
    current_session expired_sessions%rowtype;
    record_count number := 0;
    begin
    if p_hours_old is null then
    return;
    else
    open expired_sessions;
    loop
    fetch expired_sessions into current_session;
    exit when expired_sessions%notfound;
    record_count := record_count + 1;
    delete from wwctx_sso_session$
    where rowid = current_session.rowid;
    -- Note: The reason for doing this deletion in
    -- a loop with a commit in the loop is so as not
    -- to overrun the rollback segment in the case
    -- where there are a lot of sessions to cleanup
    -- with potentially a large amount of session
    -- storage to be deleted.
    -- do more than one per commit
    if record_count >= 10 then
    commit;
    record_count := 0;
    end if;
    end loop;
    close expired_sessions;
    commit;
    end if;
    exception
    when others then
    rollback;
    end;
    end wwctx_patch;
    show errors package body wwctx_patch
    declare
    INVALID_DATE_EXCEPTION exception;
    INVALID_AGE_EXCEPTION exception;
    INVALID_INTERVAL_EXCEPTION exception;
    v_jobid binary_integer;
    v_path varchar2(100) := 'oracle.portal.session';
    v_name varchar2(100) := 'cleanup_jobid';
    v_starttime date;
    v_hours_old number;
    v_interval_hours number;
    p_hours_old varchar2(30) := '&1';
    p_start_time varchar2(60) := '&2';
    p_start_time_fmt varchar2(60) := '&3';
    p_interval_hours varchar2(60) := '&4';
    begin
    -- validate hours_old parameter
    begin
    v_hours_old := to_number (p_hours_old);
    exception
    when others then
    raise INVALID_AGE_EXCEPTION;
    end;
    -- validate starttime
    begin
    if upper(p_start_time) = 'START' then
    v_starttime := sysdate;
    else
    v_starttime := to_date (p_start_time, p_start_time_fmt);
    end if;
    exception
    when others then
    raise INVALID_DATE_EXCEPTION;
    end;
    -- validate interval_hours parameter
    begin
    v_interval_hours := to_number (p_interval_hours);
    exception
    when others then
    raise INVALID_INTERVAL_EXCEPTION;
    end;
    -- Create a preference store item for the job id that is
    -- created for the submitted job.
    -- This will allow it to be deleted or modified later.
    begin
    WWPRE_API_NAME.CREATE_PATH(v_path);
    commit;
    dbms_output.put_line ('Created path for job id.');
    exception
    when WWPRE_API_NAME.DUPLICATE_PATH_EXCEPTION then
    -- probably this has already been created and a job
    -- is already in place.
    -- retrieve the job id
    null;
    when WWPRE_API_NAME.GENERAL_PREFERENCE_EXCEPTION then
    dbms_output.put_line
    ('ERROR: Exception in preference path creation');
    raise;
    when others then
    dbms_output.put_line('ERROR: creating path - ' &#0124; &#0124; sqlerrm );
    raise;
    end;
    begin
    v_jobid := WWPRE_API_VALUE.GET_VALUE_AS_NUMBER
    p_path => v_path
    ,p_name => v_name
    ,p_level_type => WWPRE_API_VALUE.SYSTEM_LEVEL_TYPE
    dbms_output.put_line ('DBMS_JOB id = ' &#0124; &#0124; v_jobid );
    exception
    when WWPRE_API_NAME.NAME_NOT_FOUND_EXCEPTION then
    -- we'll try to create it below.
    null;
    end;
    if v_jobid is null then
    begin
    WWPRE_API_NAME.CREATE_NAME
    p_path => v_path,
    p_name => v_name,
    p_description => 'The job id of the DBMS_JOB for cleaning up '&#0124; &#0124;
    'the expired session rows.',
    p_type_name => 'NUMBER',
    p_language => WWNLS_API.AMERICAN
    commit;
    exception
    when WWPRE_API_NAME.DUPLICATE_NAME_EXCEPTION then
    null;
    when OTHERS then
    dbms_output.put_line('ERROR: creating name - ' &#0124; &#0124; sqlerrm );
    raise;
    end;
    end if;
    declare
    l_job varchar2(4000);
    begin
    l_job :=
    'begin ' &#0124; &#0124;
    ' execute immediate ' &#0124; &#0124;
    ' ''begin wwctx_patch.cleanup_sessions(' &#0124; &#0124;
    ' p_hours_old => ' &#0124; &#0124; v_hours_old &#0124; &#0124;
    ' ); end;'' ' &#0124; &#0124;
    ' ; ' &#0124; &#0124;
    'exception ' &#0124; &#0124;
    ' when others then ' &#0124; &#0124;
    ' null; ' &#0124; &#0124;
    'end;';
    if v_jobid is null then
    DBMS_JOB.SUBMIT
    job => v_jobid,
    what => l_job,
    next_date => v_starttime,
    interval => 'SYSDATE + ' &#0124; &#0124; v_interval_hours &#0124; &#0124; '/24'
    WWPRE_API_VALUE.SET_VALUE_AS_NUMBER
    p_path => v_path,
    p_name => v_name,
    p_level_type => WWPRE_API_VALUE.SYSTEM_LEVEL_TYPE,
    p_level_name => null,
    p_value => v_jobid
    commit;
    DBMS_OUTPUT.PUT_LINE ('Cleanup job submitted.' &#0124; &#0124;
    ' Job ID = ' &#0124; &#0124; v_jobid);
    else
    -- v_jobid is not null
    -- modify the job
    DBMS_JOB.CHANGE
    job => v_jobid,
    what => l_job,
    next_date => v_starttime,
    interval => 'SYSDATE + ' &#0124; &#0124; v_interval_hours &#0124; &#0124; '/24'
    commit;
    DBMS_OUTPUT.PUT_LINE ('Cleanup job updated.' &#0124; &#0124;
    ' Job ID = ' &#0124; &#0124; v_jobid);
    end if;
    if p_start_time_fmt = 'NOW' then
    DBMS_JOB.RUN
    job => v_jobid
    commit;
    DBMS_OUTPUT.PUT_LINE ('Cleanup job run.');
    end if;
    end;
    exception
    when INVALID_DATE_EXCEPTION then
    rollback;
    DBMS_OUTPUT.PUT_LINE ('ERROR: Start Date Specified is Invalid');
    when INVALID_AGE_EXCEPTION then
    rollback;
    DBMS_OUTPUT.PUT_LINE ('ERROR: Age For Cleanup Specified is Invalid');
    when INVALID_INTERVAL_EXCEPTION then
    rollback;
    DBMS_OUTPUT.PUT_LINE ('ERROR: Job Interval Specified is Invalid');
    when OTHERS then
    rollback;
    DBMS_OUTPUT.PUT_LINE ('ERROR: ' &#0124; &#0124; sqlerrm );
    end;
    set verify on

  • Large number of concurrent sessions

    What optimizations are used to provide a large number of concurrent sessions?

    Generally:
    1) Design so that clustering is easy - e.g. cache only read-only data, and
    cache it agressively
    2) Keep replication requirements down - e.g. keep HTTP sessions small and
    turn off replication on stateful session beans
    3) Always load test with db shared = true so that you don't get nasty
    surprise when clustering
    4) Don't hit the database more than necessary - generally the db scales the
    poorest
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Priya Shinde" <[email protected]> wrote in message
    news:3c6fb3bd$[email protected]..
    >
    What optimizations are used to provide a large number of concurrentsessions?

  • Kill inactive sessions with no programs run it

    hi all,
    my database is 10gR2 with developer 6i
    the database have huge number of sessions with no programs running it like oracle form, some of those sessions stack in v$session table due to power failure.
    restart server solve the problem, but it is not efficient.
    is there any method to fined witch of database sessions is actually connect to the database and have application running it ?

    This script will give you the complete detail of Session , PID and Program which is running in dagtabase level.
    You can include the "STATUS" coloumn from v$session to get user status.
    Script is like this:
    set echo off;
    set termout on;
    set linesize 80;
    set pagesize 60;
    set newpage 0;
    select
    rpad(c.name||':',11)||rpad(' current logons='||
    (to_number(b.sessions_current)),20)||'cumulative logons='||
    rpad(substr(a.value,1,10),10)||'highwater mark='||
    b.sessions_highwater Information
    from
    v$sysstat a,
    v$license b,
    v$database c
    where
    a.name = 'logons cumulative'
    ttitle "dbname Database|UNIX/Oracle Sessions";
    set heading off;
    select 'Sessions on database '||substr(name,1,8) from v$database;
    set heading on;
    select
    substr(a.spid,1,9) pid,
    substr(b.sid,1,5) sid,
    substr(b.serial#,1,5) ser#,
    substr(b.machine,1,6) box,
    substr(b.username,1,10) username,
    -- b.server,
    substr(b.osuser,1,8) os_user,
    substr(b.program,1,30) program
    from v$session b, v$process a
    where
    b.paddr = a.addr
    and type='USER'
    order by spid;
    ttitle off;
    spool off;
    Save this script with your desire name and run in Database.
    Mukesh

  • Inactive sessions with sql_address=00

    hi gurus,
    db: oracle 11g
    application: weblogic
    i could see lots of invalid sessions with sql_address=00 and blank sql_id appearing intermittently and causing connection issues.
    prev_sql_id of majority of the rows are the same and the sql_text is "select count(*) from dual" !!!
    what could be the reason for these invalid sessions? not able to understand the prev sql_text also
    please help,
    charles

    The sessions are not invalid. They are just doing nothing.
    Also this does not cause connection problems.
    Applications like weblogic have several 'features'
    - They frequently execute dummy sql to check database availabilty, like select count(*) from dual
    - They don't have persistent connections
    This is addressed by setting up shared server and enabling connection pooling.
    Sybrand Bakker
    Senior Oracle DBA

  • Deliver Reports  Large number of users.

    Hi Experts,
    We want to deliver set of reports to our customers (1000 customers) with data level security.
    i.e., A customer can only see their data.
    How can I achieve this using BI Publisher.? Do we require licenses for these numbers of users.?
    Can you please help.?
    Thank You.

    Hi Damodhar
    User mapping can be done in the programming level. The User Management Engine in EP 6.0 provides two interfaces to access the user mapping data namely
    1. IUserMappingService.
    2. IUserMappingData.
    You can implement these two intefaces to enable User Mapping. Please refer to the following link for further details.
    http://help.sap.com/saphelp_nw04/helpdata/en/69/3482ee0d70492fa63ffe519f5758f5/content.htm
    Hope that was helpful.
    Best Regards
    Priya

  • Virtual Storage Error Count report large number

    Hi,
    I've win 2012 std with hyperv role on it.
    i've setup a virtual machine with 1 IDE disk and 1 SCSI disk all VHD on local disk.
    when i monitor the server with veeam one it report that the Virtual Storage Error Count in large (9) on the SCSI driver even if this drive is not loaded at all.
    why is that?

    Hi,
    I've win 2012 std with hyperv role on it.
    i've setup a virtual machine with 1 IDE disk and 1 SCSI disk all VHD on local disk.
    when i monitor the server with veeam one it report that the Virtual Storage Error Count in large (9) on the SCSI driver even if this drive is not loaded at all.
    why is that?
    I've seen this particular issue on several occasions as well as from various monitoring tools. Here is another thread concerning this same alert for a Virtual Storage Device Error Count with a value of 9, however, the source of the alert in this case is
    the Hyper V Management Pack for System Center Operations Manager:
    http://social.technet.microsoft.com/Forums/en-US/operationsmanagermgmtpacks/thread/6f4248aa-ed66-4ae1-b767-8238efc2e162/
    In each of these instances of the issue, there are a few environmental variables that generally seem to remain the same -
    The affected VM's are Server 2012 or Windows 8 guests running on a Server 2012 Hyper V host.
    The VHD's reporting the high Virtual Storage Device Error Count are using a SCSI controller.
    The disks are not pass-through disks ( http://support.microsoft.com/kb/2624495 )
    In most cases the same value of 9 is reported for the error count metric.
    The same error count value can be observed within Perfmon.exe on the host containing the affected VM(s) by adding the following performance counter for the affected VHD(s):
    Hyper-V Virtual Storage Device > Error Count
    The metric value for the affected VHD(s) can be reset by powering off the VM and rebooting the host server, however, this is often not possible in a production environment. Additionally, the error count value climbs to and halts at 9 immediately after the VM
    is powered back on. I've observed this behavior in Perfmon.exe while testing ways to reset the counter and, in turn, clear the alarms from any monitoring tools. There do not seem to be any correlating events logged in the Event Viewer or cluster
    events that would indicate that there actually is an issue occurring with the Virtual Storage Device.
    Overriding the alert completely would not be ideal as this would cause no alerts to trigger in the event of an actual problem with the device, thus I would like to find a way to reset only this particular performance counter while both the host and the VM(s)
    are powered on. Additionally, any information in regards to the root cause of this issue would be appreciated!

  • INACTIVE SESSIONS GROWING

    1. 9.2.0.4 - 64bit (MTS) (DB-A)
    2. 10.2.0.2.0 - 64 bit (DB-B)
    3. 10.2.0.2.0 - 64 bit (DB-C)
    We are having a process which starts with a trigger on a table in DB-A,
    The code in Trigger calls to a procedure which inturn access tables of user X
    in DB-C through DB link, and a procedure of user Y in DB-B through DB-Link
    connecting to user Z in DB-B.
    While doing this process some of the sessions originated from DB-A to DB-B and
    DB-C becomes Inactive and the number of Inactive sessions keep growing
    consuming memory.
    Thanks
    JD

    Hi,
    >>becomes Inactive...
    Maybe you should investigate and query the V$SESSION_WAIT view in order to displays the events for which these inactive sessions have just completed waiting or are currently waiting. The other view V$SYSTEM_EVENT displays the total number of times all the sessions have waited for the events in that view.
    Take a look on this doc below for more information:
    Oracle Wait Events
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14237/waitevents.htm#REFRN101
    Cheers

  • Inactive Sessions Getting Automatically Generated in Database

    I am facing a strange problem of getting huge number of inactive sessions getting generated th the database server which leads to it's connection closure.
    The Error reads as "Failed to check out an Application due to connection failure of Application Module."
    This happens each time I execute the following code:
    String amDefName = "amendprgo.model.CSDInvFRCAmendPrgoServices";
    String configName = "CSDInvFRCAmendPrgoServicesLocal";
    ApplicationModule app1 = Configuration.createRootApplicationModule(amDefName,configName) ;
    String voInstanceName="prgoHdrRO";
    ViewObject prgoHdrROVO =app1.createViewObjectFromQueryStmt(voInstanceName,"select * from INV_PRGO_HDR");
    prgoHdrROVO.setWhereClause("PRGO_ID="+tempRow.getAttribute("PrgoId")+" and DEPOT_CD = '0' and ITEM_CAT = 'I3' ");
    prgoHdrROVO.executeQuery();
    if(prgoHdrROVO.getEstimatedRowCount()>0){
    return true;
    I know there is a process of creating connection and View Object in Model part in JDeveloper, but I want to know why this problem happens.

    ApplicationModule app1 = Configuration.createRootApplicationModule(amDefName,configName) ;is your problem as it causes at least one (sometimes more) connections to open. As you don't free the resource after using it the connection remains open even if you can't access it anymore.
    You should call Configuration.releaseApplicationModule(...), with the application module you created before returning.
    On the other side you shoulnd not even call createRootApplicationModule in the first place (as it causes trouble if you don't deeply know what the framework do with a root application module).
    Can you tell us the use case which make you call createRootApplicationModule()? We might find a better solution.
    Timo
    Edited by: Timo Hahn on 19.05.2011 13:45
    PS: something to read http://blogs.oracle.com/jdevotnharvest/entry/when_to_use_createrootapplicationmodule_in_oracle_adf and http://radio-weblogs.com/0118231/2009/08/20.html#a959

  • Create a large number of purchase order in ME21N

    Hello,
    Is there a CATT or LSMW transaction or a program to create a large number of purchase orders with the positions?
    Thanks in advice
    Fany

    you can LSMW with direct input method
    Object - 0085, method - 0001
    venkat

  • OracleConnectionPoolDataSource creates inactive sessions

    Hi,
    My customer uses OracleConnectionPoolDataSource and finds that the pooled connection had created a huge number of inactive sessions on the database side.
    Any idea why this happens?
    Thanks in advance.
    Regards,
    Sindhiya V.

    Hi Hamdy,
    The inactivity timeout was configured through the Oracle Enterprise Manager.
    We created a Data Source and specified the following attributes on the page.
    JNDI Locations
    Location: jdbc/USPSTFPDADefaultDS
    XA Location: jdbc/xa/USPSTFPDAXADS
    EJB Location: jdbc/USPSTFPDADS
    Connection Attributes
    Connection Retry Interval: 5
    Max Connection Attempts: 3
    Cached Connection Inactivity Timeout: 300
    Maximum Open Connections: 10
    Minimum Open Connections: 1
    Wait For Free Connection Timeout: 5
    Hope you could help me in resolving this issue.
    Thanks & Regards,
    Sindhiya V.

  • Looking for a script to kill all inactive sessions

    Does anyone have a script to kill all INACTIVE sessions (with EXECUTE IMMEDIATE)?

    I suggest you to specify which OS you are talking about.
    The inactive status on the V$SESSION doesn't mean the user is not doing any thing, it only means the oracle server process is not processing any thing by the time it was queried. On OLTP systems Oracle Server Processes remain INACTIVE for more than 95% of the time, so it is advisable to configure shared servers.
    If you are really concerned about idle time, then I suggest you to configure profiles.
    On the pool mechanism you should address the microsoft side, if this, as far as I understood and guessed, application server is IIS.
    I suggest you further reading on the Killing sessions script and different session status (check the sniped status) here:
    Re: session inactive ??
    Re: make a job to delete the sniped sessions
    Re: How do I put a timeout in my DataBase?
    Re: Killing Session with Locks in Linux
    ~ Madrid

  • Barcode CODE 128 with large number (being rounded?) (BI / XML Publisher 5.6.3)

    After by applying Patch 9440398 as per Oracle's Doc ID 1072226.1, I have successfully created a CODE 128 barcode.
    But I am having an issue when creating a barcode whose value is a large number. Specifically, a number larger than around 16 or so digits.
    Here's my situation...
    In my RTF template I am encoding a barcode for the number 420917229102808239800004365998 as follows:
    <?format-barcode:420917229102808239800004365998;'code128c'?>
    I then run the report and a PDF is generated with the barcode. Everything looks great so far.
    But when I scan the barcode, this is the value I am reading (tried it with several different scanner types):
    420917229102808300000000000000
    So:
         Value I was expecting:     420917229102808239800004365998
         Value I actually got:         420917229102808300000000000000
    It seems as if the number is getting rounded at the 16th digit (or so, it varies depending of the value I use).
    I have tried several examples and all seem to do the same.  But anything with 15 digits or less seems to works perfectly.
    Any ideas?
    Manny

    Yes, I have.
    But I have found the cause now.
    When working with parameters coming in from the concurrent manager, all the parameters define in the concurrent program in EBS need to be in the same case (upper, lower) as they have been defined in the data template.
    Once I changed all to be the same case, it worked.
    thanks for the effort.
    regards
    Ronny

  • Hyperion Financial Reporting server 9.3.1 - Performance with Large batches

    I have not been able to find any help yet, so hopefully someone here can help.
    We have several financial reporting servers so that we can schedule reports and have users on seperate servers so that they do not interfere with each other.
    The problem is that when bursted batch reports that select 100 - +1000 members from the bursting dimension run, the resources are maxing out memory and if multiple batches with the same large number of (but different members) are run at the same time, we start having failures on the services where they hang or worse the server crashes (one server crashed early this morning).
    The Windows 2003 servers are Dell 2950 1x intel core 2 duo 3GHz with 8GB of RAM.
    We found that if we set the java memory parms at anything higher than 1.5GB the services do not start, so all 8GB available is hardly being used by the server since the FR services (batch scheduler, print server, reports, RMI) are the only things running.
    The batches are bursting the report for each member to a network folder for users to access and for archival purposes.
    We may need to get Oracle involved, but if anyone here has insight I'd appreciate the assistance.

    Hi Robert
    I have come across similar issues where the reports take much longer to run as part of a batch than it does when accessed direct via the workspace. Our issue was that Financial Reporting was not dropping the connection to Essbase. We were using windows os and had to add a few DWORDs to the registry:
    1. Open the registry and navigate to Local Machine\System\CurrentControlSet\Services\TCPIP\Parameters
    2. Add new DWORD Value named TcpTimedWaitDelay, right click and select Modify. Select decimal radio button, type in 30 (this is the number of seconds that TCP/IP will hold on to a connection before it is released and made available again, the default is 120 seconds)
    3. Add new DWORD Value named MaxUserPort, right click and select Modify. Select decimal radio button, type in 65534 (this determines the highest port number TCP can assign when an application requests an available user port from the system, the default is 5000)
    4. Add new DWORD Value named MaxFreeTcbs, right click and select Modify. Select decimal radio button, type in 6250 (this determines the number of TCP control blocks (TCBs) the system creates to support active connections, the default is 2000. As each connection requires a control block, this value determines how many active connections TCP can support simultaneously. If all control blocks are used and more connection requests arrive, TCP can prematurely release connections in the TIME_WAIT state in order to free a control block for a new connection)
    I think we did this to both our essbase and application server and rebooted both afterwards, it made a dramatic improvement to batch times!!
    As a personal note I try not to have too many batches running at once as they can interfere with each other and it can lead to failures. Where I have done this before we tend to use windows batch (.bat) files to launch the FR batches from the command line, if time allows I run a few batches to get a reasonable estimate of the time to complete and in my .bat file I add a pause of around that amount of time in between sending the batch requrests to the scheduler. Admittedly I've not done it yet where the number of reports in a bursting batch is as many as 1000.
    Hopefully this will help
    Stuart

  • Status and messaging for systems with a large number of classes

    Very common dilemma we coders face when creating
    systems involving a large number of classes:
    Any standard framework to take care of the global status of the whole application and of gui subsystems
    for both status handling and report messages to users?
    Something light if possible...and not too much threads.

    Ah, I see,
    I found JPanel with CardLayout or a JTabbedPane very good for control of several GUI in an application - as alternative organization tool I use a JTree, which is used for both, selecting and organizing certain tasks or data in the application - tasks are normally done with data associated with them (that is, what an object is for), so basically a click onto a node in this JTree invokes an interface method of that object (the userObject), which is associated with this node.
    Event handling should be done by the event-handling-thread only as far as possible - it is responsible for it so leave this job to it. This will give you control over the order in which the events are handled. Sometimes it needs a bit more work to obey this rule - for example communication coming from the outside (think of a chat channel for example) must be converted to an event source driven by a thread normally. As soon as it is an event source, you can leave it's event handling to the event handling thread again and problems with concurrent programming are minimized again.
    It is the same with manipulating components or models of components - leave it to the event handling thread using a Runnable and SwingUtilities.invokeLater(Runnable). This way you can be sure that each manipulation is done after the other in the order you have transferred it to the event handling thread.
    When you do this consequently most of your threads will idle most of the time - so give them a break using Thread.sleep(...) - not all platforms provide preemptive multitasking and this way it is garanteed, that the event handling thread will get a chance to run most of the time - which results in fast GUI update and fast event handling.
    Another thing is, that you should use "divide and conquer" also within a single GUI panel - place components in subpanels and transfer the responsibility for the components in this panel to exactly these subpanels - think of a team manager which makes his employees work together. He reports up to his super manager and transfers global order from his boss into specific tasks by delegation to the components, he is managing. If you have this in mind, when you design classes, you will have less problem - each class is responsible for a certain task - define it clearly and define to whom it is reporting (its listeners) and what these listeners may be interested in.
    When you design the communication structure within your hierarchy of classes (directors, managers, team managers and workers) have in mind, that the communication structure should not break the management hierarchy. A director gives global orders to a manager, which delegates several tasks to the team managers, which make their workers do what is needed. This structure makes a big company controlable by directors - the same principles can also keep control within an application.
    greetings Marsian

Maybe you are looking for