Jump to content

Connection pool when using JSDriverManagerDataSource


js.um

Recommended Posts

Hi All, 

I have deployed Jasper Report Server 8.2 with external database authentication, however, when I stress testing Jasper Server, I found that the server creates lots of sessions to the database, querying the credential.

May I know if using a connection pool with external database authentication is possible? 

Thanks.

Joe

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times.

Link to comment
Share on other sites

I have successfully configured connection pooling for external database authentication.

  1. Add your datasource for authentication to webapps/{js-app}/META-INF/Context.xml
    1. <Resource name="jdbc/myAuthDs" auth="Container" type="javax.sql.DataSource" maxActive="10" maxIdle="5" maxWait="10000" username="username" password="password" driverClassName="oracle.jdbc.OracleDriver"        url="jdbcurl" factory="com.jaspersoft.jasperserver.tomcat.jndi.JSCommonsBasicDataSourceFactory"/>[/code]

       

  2. Edit your applicationContext-externalAuth.xml
    1. define your externalDataSource bean like so 
      <bean id="externalDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">    <property name="jndiName" value="java:comp/env/jdbc/myAuthDs"/></bean>[/code]
    2. Reference the bean above in externalUserDetailsService bean
      <bean id="externalUserDetailsService" class="com.jaspersoft.jasperserver.api.security.externalAuth.db.ExternalJDBCUserDetailsService">    <property name="dataSource" ref="externalDataSource"/>    ...</bean>[/code]

       

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...