on 10-31-2008 3:57 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shilpa,
Check this forum link
http://help.sap.com/erp2005_ehp_03/helpdata/EN/5c/2f2c4142aef623e10000000a155106/frameset.htm
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.