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 38599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:44:00+00:00 2026-05-10T14:44:00+00:00

Does anyone have examples of how to use DBMS_APPLICATION_INFO package with JBOSS? We have

  • 0

Does anyone have examples of how to use DBMS_APPLICATION_INFO package with JBOSS?

We have a various applications which run within JBOSS and share db pools. I would like, at the start of each session these applications to identify themselves to the database using DBMS_APPLICATION_INFO so I can more easily track which sections of the application is causing database issues.

I’m not too familiar with session life cycles in JBOSS, but at the end of the day, what needs to happen is at the start and end of a transaction, this package needs to be called.

Has anyone done this before?

  • 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. 2026-05-10T14:44:00+00:00Added an answer on May 10, 2026 at 2:44 pm

    yes, you can write a wrapper class around your connection pool, and a wraper around the connection so lets say you have:

     OracleConnection conn=connectionPool.getConnection('java:scott@mydb'); 

    Change it to:

     public class LoggingConnectionPool extends ConnectionPool{     public OracleConnection getConnection(String datasourceName, String module, String action){         OracleConnection conn=getConnection(datasourceName);         CallableStatement call=conn.preparedCall('begin dbms_application_info.setModule(module_name => ?, action_name => ?); end;');         try{             call.setString(1,module);             call.setString(2,action);             call.execute();         finally{             call.close();         }         return new WrappedOracleConnection(conn);     } 

    Note the use of WrappedOracleConnection above. You need this because you need to trap the close call

     public class WrappedOracleConnection extends OracleConnection{     public void close(){         CallableStatement call=this.preparedCall('begin dbms_application_info.setModule(module_name => ?, action_name => ?); end;');         try{             call.setNull(1,Types.VARCHAR);             call.setNull(2,Types.VARCHAR);             call.execute();         finally{             call.close();         }     }      // and you need to implement every other method     //for example     public CallableStatement prepareCall(String command){         return super.prepareCall(command);     }     ... } 

    Hope this helps, I do something similar on a development server to catch connections that are not closed (not returned to the pool).

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

Sidebar

Related Questions

Does anyone have good examples of how to use a fieldset tag in HTML?
Does anyone have examples on how to create a Datatablest filter checkbox? I want
Does anyone have examples/tutorials of exception handling in R? The official documentation is very
Does anyone have any examples on how to integrate a task scheduler in Bottle.
does anyone have any examples of using NSKeyedArchiver in monotouch? i just want to
Scenario Does anyone have any good examples of peer-to-peer (p2p) networking in C++ using
Does anyone have specific examples of using the Ivy <deliver> or <publish> tasks with
Does anyone have or know of an example which demonstrates loading data via a
What's the purpose of using Singleton Enforced classes and does anyone have any examples
Does anyone have any good examples of building a tree data structure both iteratively

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.