commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Euclides da Silva Junior - DATAPREVRJ <Jose.Eucli...@rj.previdenciasocial.gov.br>
Subject RES: Needing help with DBCP - slow response time
Date Mon, 13 Oct 2003 14:31:05 GMT
Thank you, Dirk. I will try to capture this information and then, send it to
the list. Do you know where (URL) can i find SharedPoolDataSource &
PerUserPoolDataSource or a newer version of Jdbc2Pool...
Regards,
Euclides.

-----Mensagem original-----
De: Dirk Verbeeck [mailto:dirk.verbeeck@pandora.be]
Enviada em: sabado, 11 de outubro de 2003 10:47
Para: Jakarta Commons Developers List
Assunto: Re: Needing help with DBCP - slow response time


"The database is very slow" is a very general problem description.
What exactly is slow? getConnection, prepareStatement, execute, fetch, 
close ?
(A connectionpool only helps the "getConnection", other database(driver) 
tuning is needed for the other ones)
Can you give a small but complete example program/servlet showing the 
problem (including the timing)?

Warning: Jdbc2PoolDataSource isn't officially in v1.0 and is during the 
development of v1.1 renamed/refactored into SharedPoolDataSource & 
PerUserPoolDataSource. I strongly suggest you switch to the new version 
or use the BasicDataSource available in both versions.

Dirk


Jose Euclides da Silva Junior - DATAPREVRJ wrote:

>> Hi gurus,
>>    
>>
>>>i am still having problems with DBCP 1.0 - TomCat 4.1.18. The database
>>>      
>>>
>>connection is very slow, so i think that something can be wrong with my
>>connection pooling.
>>    
>>
>>>Some hints about what i did:
>>>1 - I didnt setted the server.xml up.
>>>2 - I am using the Oracle Thin Driver, NOT OCI
>>>3 - I ve created my own  connection pooling class, called BeanPoolConn,
>>>which returns a datasource object. See below the main statement:
>>>
>>>      DriverAdapterCPDS cpds = new DriverAdapterCPDS();
>>>      cpds.setDriver("oracle.jdbc.driver.OracleDriver");
>>>      cpds.setUrl("jdbc:oracle:thin:@uxrjo038:1526:drj1");
>>>      cpds.setUser("PORTAL_PRATICA");
>>>      cpds.setPassword("PORTAL_PRATICA00");
>>>      Jdbc2PoolDataSource tds = new Jdbc2PoolDataSource();
>>>      tds.setConnectionPoolDataSource(cpds);
>>>      tds.setDefaultMaxActive(10);
>>>      tds.setDefaultMaxWait(50);
>>>      tds.getConnection();
>>>      ds = tds;
>>>      return ds; 
>>>
>>>4 -  My main class instances this BeanPoolConn class:
>>>
>>>             if ( ds == null )
>>>                {
>>>                   BeanPoolConn bp = new BeanPoolConn();
>>>                   ds = bp.conexao();
>>>                }
>>>             con = ds.getConnection();    
>>>	... do something...
>>>	pstmt = con.prepareStatement(query);
>>>            resultcount = pstmt.executeUpdate();
>>>
>>>Question: Is it enough? Are there others steps to be done?   
>>>Thanks again, Euclides.
>>>      
>>>




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message