Isomorphic,
We are looking at connection pooling and have the following questions :
1) the Stack trace to get Oracle connection is show below:
I see the following call: com.isomorphic.sql.PoolableSQLConnectionFactory.makeUnpooledObject()
so is it returning a pooled connection or not? However in logs I see the following statement:
Also the endStack for the connection is as follows:
It has PhysicaConnection.close() call
Not exactly sure what the behavior here is.
2) The stack shows that the call for connection is from Apache dbcp. How do I make it to use Oracle connection pool instead
3) I wanted to test if the connection pool size setting works on the apache connection pool
I have the following properties:
The maxActive setting here has no effect, though I have set it to 0 only for testing purposes.
4) The commented line:
getGlobal().put("sql.Oracle.pool.enabled", "true");
has no effect. I mean with/without the stack trace and the log statement are same as in 1).
We are trying to validate the connection pooling etc. Let me know if there is standard approach to validate these.
Thanks.
We are looking at connection pooling and have the following questions :
1) the Stack trace to get Oracle connection is show below:
Code:
oracle.jdbc.pool.OracleDataSource.getConnection() com.isomorphic.sql.PoolableSQLConnectionFactory.makeUnpooledObject() com.isomorphic.sql.PoolableSQLConnectionFactory.makeObject() org.apache.commons.pool.impl.GenericObjectPool.borrowObject() com.isomorphic.pool.PoolManager.borrowObject(Object, DSRequest) com.isomorphic.sql.SQLConnectionManager.getConnection(String) com.isomorphic.sql.SQLDriver.getTransformedResults(String, Connection, String, SQLDriver, List, Map, DSRequest, DSResponse) com.isomorphic.sql.SQLDriver.executeQuery(String, List, Map, DSRequest, DSResponse) com.isomorphic.sql.SQLDataSource.executeNativeQuery(String, List, Map, DSRequest, DSResponse) com.isomorphic.sql.SQLDataSource.executeNativeQuery(String, DataSource, Map, DSRequest, DSResponse) com.isomorphic.sql.SQLDataSource.SQLExecute(DSRequest, Object) com.isomorphic.sql.SQLDataSource.processRequest(DSRequest) com.isomorphic.sql.SQLDataSource.executeFetch(DSRequest) com.isomorphic.datasource.DataSource.execute(DSRequest) com.isomorphic.application.AppBase.executeDefaultDSOperation() com.isomorphic.application.AppBase.executeAppOperation() com.isomorphic.application.AppBase.execute(DSRequest, RequestContext) com.isomorphic.datasource.DSRequest.execute() com.isomorphic.servlet.IDACall.handleDSRequest(DSRequest, RPCManager, RequestContext) com.isomorphic.servlet.IDACall.processRPCTransaction(RPCManager, RequestContext) com.isomorphic.servlet.IDACall.processRequest(HttpServletRequest, HttpServletResponse) com.isomorphic.servlet.IDACall.doPost(HttpServletRequest, HttpServletResponse) javax.servlet.http.HttpServlet.service(HttpServletRequest, HttpServletResponse) com.isomorphic.servlet.BaseServlet.service(HttpServletRequest, HttpServletResponse) javax.servlet.http.HttpServlet.service(ServletRequest, ServletResponse) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) org.apache.catalina.core.ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) com.isomorphic.servlet.CompressionFilter.doFilter(ServletRequest, ServletResponse, FilterChain) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) org.apache.catalina.core.ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) org.apache.catalina.core.StandardWrapperValve.invoke(Request, Response) org.apache.catalina.core.StandardContextValve.invoke(Request, Response) org.apache.catalina.core.StandardHostValve.invoke(Request, Response) org.apache.catalina.valves.ErrorReportValve.invoke(Request, Response) org.apache.catalina.core.StandardEngineValve.invoke(Request, Response) org.apache.catalina.connector.CoyoteAdapter.service(Request, Response) org.apache.coyote.http11.Http11AprProcessor.process(long) org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(long) org.apache.tomcat.util.net.AprEndpoint$Worker.run() java.lang.Thread.run()
so is it returning a pooled connection or not? However in logs I see the following statement:
Code:
DEBUG PoolableSQLConnectionFactory - [builtinApplication.thumbNailInfo] Returning pooled Connection
Code:
oracle.jdbc.driver.PhysicalConnection.close() org.apache.commons.dbcp.DelegatingConnection.close() org.apache.commons.dbcp.PoolableConnection.reallyClose() com.isomorphic.sql.SQLConnectionManager.free(Connection) com.isomorphic.sql.SQLDriver.freeConnection() com.isomorphic.sql.SQLDriver.clearState() com.isomorphic.sql.SQLDataSource.clearState() com.isomorphic.datasource.PoolableDataSourceFactory.destroyObject(Object, Object) com.isomorphic.pool.PoolManager.returnObject(Object, Object) com.isomorphic.datasource.DataSourceManager.free(DataSource) com.isomorphic.datasource.DataSource.freeResources(DSRequest) com.isomorphic.sql.SQLDataSource.freeResources(DSRequest) com.isomorphic.datasource.DSRequest.freeResources() com.isomorphic.datasource.DSRequest.execute() com.isomorphic.servlet.IDACall.handleDSRequest(DSRequest, RPCManager, RequestContext) com.isomorphic.servlet.IDACall.processRPCTransaction(RPCManager, RequestContext) com.isomorphic.servlet.IDACall.processRequest(HttpServletRequest, HttpServletResponse) com.isomorphic.servlet.IDACall.doPost(HttpServletRequest, HttpServletResponse) javax.servlet.http.HttpServlet.service(HttpServletRequest, HttpServletResponse) com.isomorphic.servlet.BaseServlet.service(HttpServletRequest, HttpServletResponse) javax.servlet.http.HttpServlet.service(ServletRequest, ServletResponse) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) org.apache.catalina.core.ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) com.isomorphic.servlet.CompressionFilter.doFilter(ServletRequest, ServletResponse, FilterChain) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) org.apache.catalina.core.ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) org.apache.catalina.core.StandardWrapperValve.invoke(Request, Response) org.apache.catalina.core.StandardContextValve.invoke(Request, Response) org.apache.catalina.core.StandardHostValve.invoke(Request, Response) org.apache.catalina.valves.ErrorReportValve.invoke(Request, Response) org.apache.catalina.core.StandardEngineValve.invoke(Request, Response) org.apache.catalina.connector.CoyoteAdapter.service(Request, Response) org.apache.coyote.http11.Http11AprProcessor.process(long) org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(long) org.apache.tomcat.util.net.AprEndpoint$Worker.run() java.lang.Thread.run()
Not exactly sure what the behavior here is.
2) The stack shows that the call for connection is from Apache dbcp. How do I make it to use Oracle connection pool instead
3) I wanted to test if the connection pool size setting works on the apache connection pool
I have the following properties:
Code:
getGlobal().put("sql.Oracle.interface.type","dataSource"); getGlobal().put("sql.Oracle.driver","oracle.jdbc.pool.OracleDataSource"); // getGlobal().put("sql.Oracle.pool.enabled", "true"); getGlobal().put("sql.Oracle.driver.serverName", serverName); getGlobal().put("sql.Oracle.driver.portNumber", portNumber); getGlobal().put("sql.Oracle.driver.url", url); getGlobal().put("sql.Oracle.driver.user", userName); getGlobal().put("sql.Oracle.driver.password", passWord); getGlobal().put("sql.Oracle.pool.maxActive",0);
4) The commented line:
getGlobal().put("sql.Oracle.pool.enabled", "true");
has no effect. I mean with/without the stack trace and the log statement are same as in 1).
We are trying to validate the connection pooling etc. Let me know if there is standard approach to validate these.
Thanks.
Comment