connection pooling in Linux using Tomcat 5.0.x and MYSQL

Discussions

Web tier: servlets, JSP, Web frameworks: connection pooling in Linux using Tomcat 5.0.x and MYSQL

  1. hai all, i need details about how to configure Connection Pooling in Tomcat with MySQL in Linux platform... i have done in windows platform..its working well.. i followed the same concepts in linux server also.. but it is not working... can u help me in this regard.. it will be very much helpful for me if u do this.. with regards prakash

    Threaded Messages (3)

  2. Hi, Can you mention what you mean by not working.The resource configuration in application definition file will look like usernameroot password driverClassName org.gjt.mm.mysql.Driver url jdbc:mysql://localhost/unleashed So there is nothing here regarding operating system.You nee to tell us what exception or problem you are facing.
  3. connection pooling[ Go to top ]

    I am using Tomcat 5.0.5 as Web Server ,MySQL 4 as Backend ... Actually My project is an application like project it will be accessed via intranet by lot of users at the same time.. So connection related problem occurs when more than one user is trying to access the db at the same time.. So i thought of implementing Connection Pooling Concept Using jndi.. So i opened the admin page of tomcat and configured datasource for that particular web-apps.. Automatically new tags related to that jndi DataSource are generated in CATALINA-HOME/conf/server.xml file.. Then i have include tag web.xml file of my web-apps.. Then in all java and jsp files i have established connection by getting reference of DataSource as in the following segment of code.. Context envCtx = (Context) new InitialContext().lookup("java:comp/env"); DataSource ds = (DataSource) envCtx.lookup("mine"); Connection con=ds.getConnection(); where "mine" is the jndi name created in Tomcat admin page... It worked well in my system which is having OS as Windows xp... Now i have to upload the same application in Tomcat in Server where the OS is RedHat Linux... I followed the same steps as what i did in my windows machine...After making all the changes I restarted the server after which when i am calling the jsp pages in my project its working fine,if i am trying to communicate with database it throws errorpage which I had designed and another important thing I noticed is I tried to create new jndi name through tomcat admin page.but the changes are not reflecting in the usr/j-tomcat5.0/config/server.xml instead linux is creating a new xml file named as server.xml(plus date and time of creation) inthe same directory Even in that xml file also i cont see the jndi name and other changes, which i had done through admin page. i want to know how to configure the jndi name in the server.xml file since i am new to linux with tomcat i cont proceed with things, please guide me in the right direction
  4. Re: connection pooling[ Go to top ]

    check this out http://www.dynamicobjects.com/d2r/archives/002574.html cheers, http://javaicillusion.blogspot.com/