How to kill db-session when explored is closed?

Hi all,
Is there an easy way to kill database sessions when the explorer window is closed?.
I tried to set the "disconnect application module upon release" checkbox on the module, but than my application doesn't work correctly...
I'm getting errors like:
Jul 17, 2007 6:34:10 PM com.sun.faces.lifecycle.ProcessValidationsPhase execute
SEVERE: SelectOne submittedValue's index 0 is out of bounds. It should be between 0 and -1
java.lang.IndexOutOfBoundsException: SelectOne submittedValue's index 0 is out of bounds. It should be between 0 and -1
     at oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer.__getIndex(SimpleSelectOneRenderer.java:347)
     at oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer._convertIndexedSubmittedValue(SimpleSelectOneRenderer.java:189)
     at oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer.getConvertedValue(SimpleSelectOneRenderer.java:157)
     at oracle.adfinternal.view.faces.renderkit.core.xhtml.InputLabelAndMessageRenderer.getConvertedValue(InputLabelAndMessageRenderer.java:42)

Hi Arti,
You may want to check out how to use JDBC Datasources intead of the JDBC URL to connect to your database at the OC4J level. This method will manage the number of open db sessions that the OC4J can access. It is normal to have the sessions connected even after the browser has closed. It actually saves processing on the database because you don't need additional resources to open sessions, and you're reusing technology on connection management that is part of the database DNA. It is designed this way so that the OC4J can reuse existing connections for performance reasons among others.
To do this on ADFBC, these are the files that you'll need to modify:
1) data-sources.xml
2) bc4j.xcfg for every application module to use JDBC Datasources instead of JDBC URL. (Right-click, configuration on the AM)
However, for testing, the business component browser will need to use the JDBC URL connection.
I hope this helps.
Kenton

Similar Messages

  • How can i invalidate Session when a browser crashes?

    Hi
    How can i invalidate session when a browser window closed or crashed unexpectedly.
    If user closed the browser window using File->Close, then i'm calling javascript function .... and it is working fine. But when browser window is hanged and closed using ENDTASK, how can i kill that session.
    Please help
    Thanks
    -Vidyadhar

    Well you can't. Execution halts, so anything you would want to do is made impossible: that's why crashes are the #1 enemy of any software developer (that and impossible deadlines). The webserver will remove the session manually when it times out though.

  • How to kill the session after the user exit the ADF application

    Dear all
    I have a problem
    The problem is the session still exist after the user close the application and the browser. I want to kill all sessions that is not active.
    This is my test scenario:
    1- I open IE and run my ADF application that is deployed on weblogic. http://192.168.100.17:7001/myapp/faces/login
    2- At the same time I issue this SQL command to view the sessions for user 'ADFUSER' - the "ADFUSER" is the schema user.
    SELECT USERNAME,STATUS FROM v$session
    WHERE USERNAME = 'ADFUSER';QUERY RESULT IS
    USERNAME                       MODULE                                           STATUS
    ADFUSER                         JDBC Thin Client                                 INACTIVE3- Now the user close the browser
    4- Run the SQL again and I notice that the session still exist
    SELECT USERNAME,STATUS FROM v$session
    WHERE USERNAME = 'ADFUSER'RESULT:
    USERNAME                       MODULE                                           STATUS
    ADFUSER                        JDBC Thin Client                                 INACTIVE5- now the user open the URL again http://192.168.100.17:7001/myapp/faces/login
    6-Run the SQL again , and I notice that the old session still exists and a new session created too.
    SELECT USERNAME,STATUS FROM v$session
    WHERE USERNAME = 'ADFUSER'RESULT:
    USERNAME                       MODULE                                           STATUS
    ADFUSER                        JDBC Thin Client                                 INACTIVE
    ADFUSER                        JDBC Thin Client                                 INACTIVE
    2 rows selected.and every time I login to the application , a new session is open and the old session still exist
    I do not know why this happens
    I want to kill old session when the user close the application.
    These sessions are cleared only when i restart the weblogic domain.
    here is some information about my development environment:
    Jdeveloper 11.1.2.3
    WebLogic Server Version: 10.3.5.0
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    thanks in advance

    Hi,
    for performance reasons you should not use dedicated user connections to the database. Instead you use JDBC data sources (default in JDeveloper for ADF BC) that you can configure the database connection pooling for. This means that your v$session will always show a set of active session, which however are shared among users. Assuming you use ADF BC, this is what happens
    - A user requests a data bound page
    - The ADF BC checks out an AM and connects to the database using one of the database connections in the pool
    ... user work here ...
    - user exits application
    - ADF BC returns AM to pool and passivates pending user state (if application is left with dirty transaction)
    - Database connection is available in pool as soon as AM released
    This also happens between requests. Long story cut short: v$session doesn't give you a true picture
    Frank

  • How to close a session when user clicks Logout

    In my jsp page i create a session for every user's name.
    when particular user clicks logut without closing his personal page,
    the others can access his page.
    so, how to close a session when clicks logout link.?
    similarly when user gets signin one system,he will not be sigin in other system.but how can we achieve this?
    Thanks in Advance

    What is the name of the session variable that you are creating on login? When he clicks logout, set that session variable to null. Like session.setAttribute("userName",null); and check for non-null condition before proceeding with any functionality in your jsp's.
    What is the second question? You want to prevent duplicate logins from different systems? You would have to maintain a static datastructure like a HashMap for instance. Everytime a user logs in, put an entry into the HashMap...like userMap.put("userName","userName"); If an entry already exists, throw a message saying that user already logged in from another machine...

  • How to kill oracle session?

    hi there,
    Aside from using tool like TOAD is there a syntax on how to kill oracle session?
    pls help.
    tnx...

    First findout the SID, Serial No for the Particular Session ( syntax is as follows )
    SELECT sid, serial#,osuser, program FROM v$session;
    (Killing the session on SQL Prompt)
    ALTER SYSTEM KILL SESSION 'sid,serial#';
    force to kill the session by adding IMMEDIATE
    ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE;
    OS Oracle Kill Session
    First findout the SID, SPID for the Particular Session ( SQL syntax is as follows )
    SELECT s.sid,p.spid, s.osuser ,s.program
    FROM v$process p, v$session s
    WHERE p.addr = s.paddr;
    Windows OS Command for kill Session
    orakill SID SPID
    Regs,
    Naresh

  • How to close child windows when parent window closed in jsp

    how to close child windows when parent window closed in jsp
    becoz it can't be able to recognise it's parent
    with the whole application
    plz send me some sample code of it

    Hi, I have no idea how to do this is JSP.
    However createing a modal window (with javascript) would mean that the user can not use the parent window untill he closes the child window. However not sure if this is what you are searching.
    Otherwise you can detect the onClose (I think) and close the window from there.
    However both the above are JavaScript and not JSP.
    rwgards,
    sim085

  • How to kill a  session in stored procedure or trigger.

    Can anyone let me know, how to kill a particular session in stored procedure or trigger.
    Regards
    KVSS

    also you cannot attempt to kill ur own current session.
    But on what circumstances you want to kill the session.
    When anyone trys to access a table and lets suppose the trigger onthat table activates
    and you want to kill that very session which activated the trigger ???
    i dont think its possible. To kill a session definitely you should be in a different session and
    then only you can achieve that.
    pls check it out
    prakash
    [email protected]

  • Who killed my session & when?

    Hi Gurus,
    Could you tell me how can i check who killed my session and when two days before? Which table should i query?
    Any input will appreciated.
    Thank you.

    Yes indeed thanks.
    Some procedure like below
    CREATE OR REPLACE PROCEDURE kill_session_sp
              pn_sid IN number
            , pn_serial IN number)
    AS
    lv_user varchar2(30);
    BEGIN
      SELECT username INTO lv_user FROM v$session WHERE sid = pn_sid AND serial# = pn_serial;
    IF lv_user IS NOT NULL AND
        lv_user NOT IN  ('SYS','SYSTEM') AND
        lv_user NOT IN (SELECT user_name from privileged_users)  -- stop users kiiling System and DBA accounts
    THEN
      EXECUTE IMMEDIATE 'ALTER SYSTEM KILL SESSION '''||pn_sid||','||pn_serial||'''';
    ELSE
      RAISE_APPLICATION_ERROR(-20099,'Attempt to kill protected system session has been blocked for user '||lv_user);
    END IF;
    END kill_session_sp;Obviously a grant execute on that procedure should be given to someone. Normally only DBAs and production sypport may have that level of access
    Why is Oracle not record the kill processes in alert log?
    Cheers,
    Mich

  • How to invalidate old sessions when new user access appl  on same machine

    hi all,
    I am using Mozilla browser to access my web application.User one access my application using his credentials .but i left that browser open.after that I am opening the another Mozilla window and accessing my application using different credentials ex:user2 credentials .user 2 also can access my application.but when i open the first browser ..am automatically getting second user session.how can we avoid this problem.
    Application is using session identifier(jSessionID) as the URL parameter for session management.
    is it possible to invalidate the old session when new user access on same machine.
    thanks,
    Vishnu

    VishnuReddy wrote:
    hi all,
    I am using Mozilla browser to access my web application.User one access my application using his credentials .but i left that browser open.after that I am opening the another Mozilla window and accessing my application using different credentials ex:user2 credentials .user 2 also can access my application.but when i open the first browser ..am automatically getting second user session.how can we avoid this problem.That shouldn't occur. Either you explained it the wrong way (or I interpreted it the wrong way), or there's huge bug in your login/logout logic. After opening another window inside the same session, you should still be logged in as the first user.

  • How to kill Reverse session

    Hi
    I did reverse of essbase cube,Its running since 3 hrs, i want to kill the session,i did try to stop session from Operator,I got a messgae saying "Stop Failed,java.lang.NullPointerException".we are on version 10.1.3.How can i kill this session
    Please help me
    Thanks,

    If you reverse engineered using the local agent then most probably the session is already killed.
    Operator relies on the agent to update the Work repository execution logs to indicate the state of the session.
    Since, the agent (for whatever reason) couldnt update the execution log, the Operator will continue to show that the session is running.
    You can mark the session as complete/error yourself and that will update the Work rep logs.

  • How to activate save session when closing multiple tabs?

    i've opened many tabs that i want. When I close Firefox there are many tabs. Those tabs have to be restored when i open again Firefox. how to activate in firefox 4.o. In firefox 3.6 it is asking defaultly to save sessions.

    In Firefox 4 you can always restore the previous session via Firefox > History > Restore Previous Session
    You can set the warn prefs on the about:config page to true via the right-click context menu or toggle with a double left-click.
    * browser.showQuitWarning, see http://blog.zpao.com/post/3174360617/about-that-quit-dialog
    * browser.tabs.warnOnClose, see http://kb.mozillazine.org/About%3Aconfig_entries
    * browser.warnOnQuit , see http://kb.mozillazine.org/browser.warnOnQuit
    * browser.warnOnRestart , see http://kb.mozillazine.org/browser.warnOnRestart
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    * http://kb.mozillazine.org/about%3Aconfig

  • How to keep db session when navigating with a navigation button?

    Helllo,
    I have created a navigation button on an existing page (personalization). The destination URI = OA.jsp?page=/xxxe/oracle/apps/ar/webui/ShippingReportPG. In the existing (oracle) page, a tempory table is used. However, when navigating to my new page, the data in the temporary table does not seem to be available anymore. How can I show the data of the temporary table in my new page? Is there a possiblity to keep the same db session? Is it possible with the 'retainAM=Y' option?
    I tried with 'retainAM' in the destination URI and changed the AM of the page to the right AM, but nevertheless it did not seem to be retained. Any ideas?
    Thanks for your help.
    Best regards,
    Guy
    Edited by: user4790528 on Oct 9, 2008 3:47 AM
    Edited by: user4790528 on Oct 9, 2008 5:12 AM
    Edited by: user4790528 on Oct 9, 2008 5:47 AM

    Hi,
    Thanks for your reply!
    When navigating to my new page a new db session is started (with my own AM), but I would like to keep the same db-session and AM in my new page so that the temporary table can be used. There is no specific flush-code because it is standard Oracle functionality that the data is only visible within 1 db session. Any idea how I can retain the AM?
    Thx
    G

  • How to Kill BDC session

    Hi All,
    I want to know the command with we put in command window to kill batch input sessio. Could youplease help?
    Thanks
    Saurabh

    Hello,
    Put /BEND In the command window this would end BDC Session
    regards
    suresh nair

  • How to kill iTunes timeout when a CD is bad??!?!

    Ok, I have a really frustrating problem.
    Was listening to a CD in iTunes when all of a sudden playback stops, the CD is scratched and the CD Drive is trying to search the CD.
    Here's the problem, it NEVER successfully recovers from the CD scratch, which is fine, I don't expect iTunes to be able to play a damaged disc.
    What is not fine is that it takes literally TEN MINUTES before I can do anything, eject the CD, quit iTunes, force quit iTunes, eject the cd with the finder, or just in general have iTunes respond to anything, AT ALL.
    Why the **** would they program it like this? I literally waited TEN MINUTES for iTunes to decide to give me any control back, and I could eject the cd.
    This is a HUGE frustration for me, is there somewhere I can lower the amount of time iTunes takes to decide a cd is bad, like for example 15 seconds instead of 600 seconds?

    Have you tried to 'option' +  + 'esc' to Force Quit and relaunch the Finder?
    MJ

  • How to invalidate jsp sessions when using BC4J???

    Generally, this is one way of invalidating:
    <%
    if (request.getSession(false)!=null)
    session.invalidate();
    %>
    But, what is JDEV TEAM recommended way?
    session.invalidate() gives a java.lang.ClassCastException
    error in web-to-go
    Please help.
    Thanks.

    repost

Maybe you are looking for

  • PM Order Operations Default Unit of Measurement

    Halo Experts, We have a problem in UOM for PM/CS order operations. We have defined HR as default value of UOM for operations in IMG. Business wants to change at the order level to H as UOM and it is manually keyed in and saved. But when we check with

  • Looking for a clone solution for Oracle WebCenter Content, Imaging and related products

    Hi, We are looking for a manual or automated cloning solution for Oracle WebCenter Content (UCM), Imaging (ICM) and related products. Oracle FMW has T2P cloning option, but we are looking for more specific to just this product to clone and configure

  • 9iAS 1.0.2.2.2 install/migration questions

    We are migrating 9iAS 1.0.2.2.2 from two-box to three-box scenario as explained below. We have a plan of action for this migration. I want to know whether this is the proper way to do the migration. Existing Scenario : ( 9iAS 1.0.2.2.2 ) Box 1 : Port

  • TBridge must have at least one redirect command error!

    Hi there, Possibly this is a very dork question!, sorry I can't find the trick. We are connecting Tux8.0 and WLS7.0sp1 through WTC. and the following error is showed when trying to deployed WTCServer component. in the log file attached is showed that

  • Distribution Planning within SAP - APO 3.0 or SCM 4.0

    Hi, Can do any 'Distribution Planning' within SAP SCM V4.0 or V5.0.  We are trying to  improve  'decision-making' associated with selection of a particular warehouse  for shipments coming out of a specific plant. The application should be able to pro