Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7546513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:13:05+00:00 2026-05-30T09:13:05+00:00

I all, I’m using jboss 5.1.0 jdk 1.6. When my WebAPP don’t have users

  • 0

I all,

I’m using jboss 5.1.0 jdk 1.6.
When my WebAPP don’t have users working, i execute the next sql to see sessions on my Oracle DB:

 SELECT A.INST_ID,A.USERNAME,A.STATUS,A.SCHEMANAME,A.MACHINE,A.PROGRAM, 
      TO_CHAR((SYSDATE -((1/86400)*LAST_CALL_ET)),'YYYY-MM-DD HH24:MI:SS') LAST_CALL, 
      TO_CHAR(A.LOGON_TIME,'YYYY-MM-DD HH24:MI:SS') LOGON_TIME, 
      A.SID,A.SERIAL#, 
A.FAILOVER_TYPE,A.FAILED_OVER, 
A.OSUSER,A.TERMINAL,A.TYPE,A.MODULE,A.SERVER,A.LOCKWAIT,A.RESOURCE_CONSUMER_GROUP 
FROM GV$SESSION A  
WHERE A.SCHEMANAME IN ('USER_DB') 
ORDER BY USERNAME,MACHINE,LAST_CALL ASC

and the result is:

1   USR_DB  INACTIVE    USR_DB  machine_name  JDBC Thin Client  2012-02-20 11:05:16 2012-02-20 11:04:46 24  5001    NONE    NO  root    unknown USER    JDBC Thin Client    DEDICATED       OTHER_GROUPS

2   USR_DB  ACTIVE      USR_DB  machine2_name  SQL Developer    2012-02-21 09:05:13 2012-02-21 09:03:23 31  3997    NONE    NO  clien2  unknown USER    SQL Developer   DEDICATED       OTHER_GROUPS

The first result, is an inactive session of my WebAPP, the second, is my active session of SQL Developer.
My question is: How can i remove or clean from the view GV$SESSION inactive sessions?. Here is my oracle-ds.xml:

   <?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
        <jndi-name>/MyDS</jndi-name>
        <connection-url>jdbc:oracle:thin:@//myhost:1521/xe</connection-url>
        <driver-class>oracle.jdbc.OracleDriver</driver-class>
        <user-name>USR_DB</user-name>
        <password>password</password>
        <min-pool-size>1</min-pool-size>
        <max-pool-size>20</max-pool-size>
        <idle-timeout-minutes>5</idle-timeout-minutes>
        <check-valid-connection-sql>SELECT 1 FROM DUAL</check-valid-connection-sql>
        <background-validation-millis>400000</background-validation-millis>
        <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
        <metadata>
          <type-mapping>Oracle9i</type-mapping>
        </metadata>
</local-tx-datasource>
</datasources>

There are an special config parameter to force inactive connecionts don’t appear or remove it in view GV$SESSION?
In my app, i’m sure that i return connections to the pool.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T09:13:07+00:00Added an answer on May 30, 2026 at 9:13 am

    Most of the time, your sessions will and should be INACTIVE.

    An INACTIVE session merely means that at that particular instant, that session is not executing any particular SQL statement. It doesn’t imply that the session needs to get cleaned up. And it has nothing to do with whether your application is returning connections to the pool. It simply means that there is an open database connection that is not at this instant executing a SQL statement.

    You could, of course, query GV$session looking for only ACTIVE sessions by adding a WHERE status = 'ACTIVE' to the query. But that will probably exclude most of the sessions opened by the middle tier since most of the time they’re not going to be executing SQL statements.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, I have some script tags that are not working in Wordpress. If I
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
All, I'm using wordpress with this and for some reason the eventDrop stopped working.
All, I have the following class so to check to see if the form
all! A question to all the users of Mac OS X who have used
All of my users are a short walk down the hall, and all of
All, I currently have two projects that are under SourceSafe that I am unable
All, See the code below: function menu() { this.menuitem=[]; this.submenu=[]; this.menuitem[0] = $('div#sivname1'); this.menuitem[1]
All of my users will be unapproved until they are approved by an admin,
All, Say I have the following bit of code: select: function(start, end, allDay) {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.