How did you check nb. of connections? Tomcat has its own setting in context.xml and this probably overwrites your java code configuration.