Re: Tomcat 8 Connection Pooling

2017-07-18 Thread Riccardo Cohen
You'll find here : http://www.5flow.com/tmp/tomcatjndidb.zip a very small sample that works on my computer (with IntelliJ project). Just change the context.xml with your database. Viewing the home page will create a database, insert records, then display them. The data source is of type java

Re: Tomcat 8 Connection Pooling

2017-07-18 Thread Avinash Krishnan
Hello Riccardo, When I try using the pool properties(Without JNDI ) it gives me URL Cannot Be null error. What I have understood is that, when we make the data source as a static variable or a member variable of another class and try to use it another class's function it throws error. If I instant

Re: Tomcat 8 Connection Pooling

2017-07-18 Thread Riccardo Cohen
Can you see any info in the log : login incorrect, database not found etc. ? (There are many logs in tomcat : localhost log, catalina log, manager log, host manager log, localhost access log) On 18/07/2017 13:55, Avinash Krishnan wrote: Hello Riccardo , Thanks for the response. This didn't wo

Re: Tomcat 8 Connection Pooling

2017-07-18 Thread Avinash Krishnan
Hello Riccardo , Thanks for the response. This didn't work for me. Connections are not getting initated and I am seeing java.lang.NullPointerException on accessing getConnection. I am refering to http://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html The pool properties is also not working. On

Re: Tomcat 8 Connection Pooling

2017-07-18 Thread Riccardo Cohen
Hello Avinash I'm not expert but this is rather simple : in web/META-INF/context.xml write something like : in web/WEB-INF/web.xml add in tag : jdbc/tomcattest javax.sql.DataSource and in a java class add this : public class T3Servlet extends HttpSe

Tomcat 8 Connection Pooling

2017-07-18 Thread Avinash Krishnan
I am trying to implement Apache Tomcat 8.5.15 "Tomcat JDBC Connection Pool" using the steps mentioned in the guide. Can some one help me to understand how this connection pooling has to be done. Is the Plain Java Method,by implementing Pool Properties is an alternative to the JNDI lookup based p