cancel
Showing results for 
Search instead for 
Did you mean: 

Connection Pooling

Former Member
0 Kudos

Hi All,

I am using MS-SQL as the database. We are querying the database in webDynpro frontend. We have implemented connection pooling.

I are getting the connection only once in the init method and I am closing in wdExit() method.

There are many calculations in the code and the database is being queried many times. There are more than 5000 reads when we run the application for a single view. There is no way we can reduce the number of reads.

Initially there was no connection pooling implemented. But the performance was very low. So I implemented connection pooling. But, after implementing connection pooling , I am getting an error as below:

com.sap.engine.services.dbpool.exceptions.BaseSQLException: ResourceException in method ConnectionFactoryImpl.getConnection(): com.sap.engine.services.connector.exceptions.BaseResourceException: Cannot get connection for 60 seconds. Possible reasons: 1) Connections are cached within SystemThread(can be any server service or any code invoked within SystemThread in the SAP J2EE Engine), 2) The pool size of adapter "WebCASDS" is not enough according to the current load of the system or 3) The specified time to wait for connection is not enough according to the pool size and current load of the system. In case 1) the solution is to check for cached connections using the Connector Service list-conns command, in case 2) to increase the size of the pool and in case 3) to increase the time to wait for connection property. In case of application thread, there is an automatic mechanism which detects unclosed connections and unfinished transactions.

Pool size is :100 and waiting time is 2 minute. I think these numbers should be sufficient.

Clould anyone help me wrt this issue.

Thanks,

Shilpa

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Ayyapparaj,

Previously, I was getting the connection like:

conn =DriverManager.getConnection(...);

But now, I have done setting in Visual Admin, and getting the connection like:

Context ctx = null;

DataSource ds = null;

String dataSource = "jdbc/ApplicationDS"; ( data source name in

ctx = new InitialContext();

ds = (DataSource) ctx.lookup(dataSource);

conn = ds.getConnection();

I am calling above lines of code in init method and in the whole program, im using "conn". When I run the application, after 3 to 4 runs im getting the error i had mentioned. Im getting the connection only once in my application.

Thanks,

Shilpa.

Former Member
0 Kudos

Hi,

I am not sure how you are using the connections..

Try to release the connections once they are used. because the lifespan is more in Webdynpro than other jsp/servlet related development

Regards

Ayyapparaj

Former Member
0 Kudos

Hi,

Initially there was no connection pooling implemented. But the performance was very low. So I implemented connection pooling. But, after implementing connection pooling

Are you using you own implementation of connection pooling?

Regards

Ayyapparaj

Former Member
0 Kudos

Hi,

Go through the following links, it may be of some help

[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7210cd90-0201-0010-eeb4-d3ae98f947b3]

[http://help.sap.com/saphelp_nw2004s/helpdata/EN/b0/6e62f30cbe9e44977c78dbdc7a6b27/frameset.htm]

[http://ww2.avispublicsduparisien.com/irj/portalapps/com.sap.portal.pdk.srv.connectorframework/docs/iv-genericconnectors_deployment.htm]

Regards

Raghu

former_member192434
Active Contributor
0 Kudos