suhov_vb Posted October 19, 2015 Share Posted October 19, 2015 We use JasperReports Server Community Edition (v. 5.2). We use jdbc source in our reports. I noticed that JasperServer opens maximum 5 connections to the source and next attempts to open a connection wait for connection release. I'd like to increase that limit. I tried to follow next document:http://community.jaspersoft.com/wiki/how-tune-number-connections-server-database-poolBut changes to context.xml (and restart tomcat) didn't affect on the number of opening connections.Please help us to set it. Link to comment Share on other sites More sharing options...
hozawa Posted October 19, 2015 Share Posted October 19, 2015 JasperReports Server uses jdbc pooling. You just need to increase the number of jdbc connections used in a pool. Link to comment Share on other sites More sharing options...
suhov_vb Posted October 19, 2015 Author Share Posted October 19, 2015 You just need to increase the number of jdbc connections used in a pool.But how to do it? I tried to control it via maxActive parameter of the Resource element in the /etc/tomcat6/Catalina/localhost/jasperserver.xml and /META-INF/context.xml in JasperServer install dir. Both didn't work. Link to comment Share on other sites More sharing options...
Solution suhov_vb Posted October 20, 2015 Author Solution Share Posted October 20, 2015 I solved the problem. There are 2 possible answers:1. Change DataSource pool size parameter (second argument) of dataSourceObjectPoolFactory bean constructor in /jasperserver/WEB-INF/applicationContext.xml file (default is 5): <bean id="dataSourceObjectPoolFactory" class="org.apache.commons.pool.impl.GenericObjectPoolFactory"> <constructor-arg type="org.apache.commons.pool.PoolableObjectFactory"><null/></constructor-arg> <constructor-arg type="int" value="15"/> </bean>Reload application after saving changes.2. Use JNDI source instead of JDBC source and set JNDI connection following JasperReports Server Admin Guide or Appache Tomcat documentation: http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now