srikotesh
asked on
How do i configure connection pool as common for all applications
Hi Experts,
How do i configure connection pool as common for all applications.
I WANT TO MAKE it as common connection pool for all.
Application 1:
Connectin pool
maximumPoolSize is 20
Application 2:
maximumPoolSize is 20
i want to make this connection pool as common for both applications
maximumPoolSize is 40
how do i make changes
is it possible to do changes at tomcat level
How do i configure connection pool as common for all applications.
I WANT TO MAKE it as common connection pool for all.
Application 1:
Connectin pool
maximumPoolSize is 20
<bean id="zapidDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<!-- Connection properties -->
<property name="driverClass" value="com.mysql.jdbc.Driver" />
<property name="jdbcUrl" value="${zapid.jdbc.url}" />
<property name="user" value="${zapid.jdbc.username}" />
<property name="password" value="${zapid.jdbc.password}" />
<!-- Pool properties -->
<property name="initialPoolSize" value="0" />
<property name="minPoolSize" value="${c3p0.minPoolSize}" />
<property name="maxPoolSize" value="${c3p0.maximumPoolSize}" />
<!-- In milliseconds -->
<property name="checkoutTimeout" value="20000" />
<!-- In seconds -->
<property name="maxIdleTime" value="300" />
<!-- In seconds -->
<property name="maxConnectionAge" value="600" />
</bean>
Application 2:
maximumPoolSize is 20
i want to make this connection pool as common for both applications
maximumPoolSize is 40
how do i make changes
is it possible to do changes at tomcat level
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi gheist,
In which file i have to configure this JNDI datasource connection.
In which file i have to configure this JNDI datasource connection.
ASKER
http://www.journaldev.com/2905/hibernate-tomcat-jndi-datasource-example-tutorial
i have made changes by using the above link
but hibernate configuration file having issue
i have made changes by using the above link
but hibernate configuration file having issue
ASKER
http://www.journaldev.com/3531/spring-mvc-hibernate-mysql-integration-crud-example-tutorial
the above link have hibernate config file how do i change it. if i want to use jndi datasource.
the above link have hibernate config file how do i change it. if i want to use jndi datasource.
ASKER
Hibernate - what? Maybe you need ODBC, TNS and TDS pooling too?
I am telling you to set per-server JNDI datasource. (pooled by apache or c3p0 or whatever)
I am telling you to set per-server JNDI datasource. (pooled by apache or c3p0 or whatever)
ASKER
i am using spring and hibernate in my project.
so that's why I am refering those links.
I don't know about ODBC.
so that's why I am refering those links.
I don't know about ODBC.
Neither relates to first question./
ASKER
this is related to first question only.
You are configuring c3p0 JDBC pool per application.
You can make JDBC pool using apache commons pool in tomcat (or c3p0 if you like frequent failures)
It really does not matter if client is hibernate or serber is mssql or oracle.
You can make JDBC pool using apache commons pool in tomcat (or c3p0 if you like frequent failures)
It really does not matter if client is hibernate or serber is mssql or oracle.
ASKER
http://www.journaldev.com/2905/hibernate-tomcat-jndi-datasource-example-tutorial
i have made changes by refering the above link.
now I have a problem at application level cfg file.
I don't know how to change this file
please refer journal dev spring mvc project cfg file.
i have made changes by refering the above link.
now I have a problem at application level cfg file.
I don't know how to change this file
please refer journal dev spring mvc project cfg file.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Now you dont have to bundle database drivers with your applications == huge win in space....
ASKER
i am configured jndi data source connection at server level thru journal dev link
hi gheist,
thanks for ur help
hi gheist,
thanks for ur help
ASKER
under src/main/webapp/webinf folder .