• Post Reply Bookmark Topic Watch Topic
  • New Topic

Customizing JdbcInterceptor to set properties in v$session

 
adarsh datt
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on a custom Interceptor that overrides the values in the v$session table . Is there a way to override the values of a v$session column. Currently I am overriding the reset method in the custom Interceptor

public class ConnPoolInterceptor extends JdbcInterceptor
{
...
....
public void reset(ConnectionPool arg0, PooledConnection arg1) {
poolConn = arg1;
if(poolConn != null)
{
PoolConfiguration config = poolConn.getPoolProperties();
config.setConnectionProperties("v$session.client_info=resetclient_info;v$session.osuser=resetosuser;v$session.program=resetprogram");
//config.setConnectionProperties("v$session.p3=2;v$session.p3text=resetP3TEXT;v$session.client_info=resetclient_info;v$session.osuser=resetosuser;v$session.program=resetprogram");
try
{
poolConn.reconnect();
config = poolConn.getPoolProperties();
}
catch(Exception ex) {
ex.printStackTrace();
}
}
}
}

Also, is there any forum apart from the tomcat site where JdbcInterceptors can be understood in depth? Any help is appreciated.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!