db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Poeschl <mpoes...@marmot.at>
Subject Re: which DatasourceFactory?
Date Sat, 13 Dec 2003 08:43:18 GMT
The TorqueDataSourceFactory is deprecated as it has some known bugs (it 
has been removed from cvs HEAD)

SharedPoolDataSourceFactory works great for me ... make sure commons-dbcp-1.1.jar and commons-pool-1.1.jar
are in your classpath!!

martin

Zamek wrote:

>Hi All,
>
>I have a Turbine portal on a Linux Debian and Postgresql 7.3. and sun's jvm 
>1.4.
>Which Datasourceactory is the best for me?
>
>The current setting is:
>
>torque.database.default=portal
>torque.database.portal.adapter=postgresql
>torque.dsfactory.portal.factory=org.apache.torque.dsfactory.TorqueDataSourceFactory
>torque.dsfactory.portal.pool.defaultMaxConnections=10
>torque.dsfactory.portal.pool.defaultMaxExpiryTime=3600
>torque.dsfactory.portal.pool.connectionWaitTimeout=10
>torque.dsfactory.portal.connection.driver = org.postgresql.Driver
>torque.dsfactory.portal.connection.url = jdbc:postgresql:portal?charSet=LATIN2
>torque.dsfactory.portal.connection.user = ...
>torque.dsfactory.portal.connection.password = ...
>
>This isn't ok, because it works well and I've get an error after a few time:
>Error
>org.apache.torque.TorqueException: Backend start-up failed: FATAL: Sorry, too 
>many clients already Backend start-up failed: FATAL: Sorry, too many clients 
>already at 
>org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:306)

>at org.postgresql.Driver.connect(Driver.java:122) at 
>java.sql.DriverManager.getConnection(DriverManager.java:512) at 
>java.sql.DriverManager.getConnection(DriverManager.java:171) at 
>org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnection(DriverAdapterCPDS.java:179)
>
>Restart Turbine is not good, because I use cocoon too on this server, and 
>after a restart all of cached cocoon data are missing.
>Max connection of Postgresql is 64.
>
>
>I tried SharedPoolDataSourceFactory with these settings:
>torque.database.default=portal
>
>torque.database.portal.adapter=postgresql
>torque.dsfactory.portal.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory
>torque.dsfactory.portal.pool.defaultMaxActive=30
>torque.dsfactory.portal.pool.testOnBorrow=true
>torque.dsfactory.portal.pool.validationQuery=SELECT 1
>torque.dsfactory.portal.connection.driver = org.postgresql.Driver
>torque.dsfactory.portal.connection.url = jdbc:postgresql:portal?charSet=LATIN2
>torque.dsfactory.portal.connection.user = ...
>torque.dsfactory.portal.connection.password = ...
>
>and I've get an error:
>
>java.lang.NullPointerException
>	at org.apache.turbine.Turbine.doGet(Turbine.java:876)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>	at 
>org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:450)
>	at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>	at 
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
>	at 
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>	at filters.EncodingFilter.doFilter(EncodingFilter.java:60)
>	at 
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
>	at 
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>	at 
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
>	at 
>org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>	at 
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>	at 
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
>	at 
>org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>	at 
>org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
>	at 
>org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
>	at 
>org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
>	at 
>org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
>	at 
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
>
>
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message