title: JNDI pooled data source: Driver-based vs DataSource-based
body: <p>I'm looking to set up Tomcat to use a JNDI pooled data source for a MySQL database. HikariCP seems to be the recommended choice recently (<a href="https://stackoverflow.com/questions/20955875#21125176">at least on StackOverflow</a>).</p>
  
  <p>The documentation helpfully <a href="https://github.com/brettwooldridge/HikariCP/wiki/JNDI-DataSource-Factory-(Tomcat,-etc.)" rel="nofollow noreferrer">lists the configuration</a> (presumably for server.xml or context.xml) but divides into "Driver-based" and "DataSource-based". Couldn't find much more info about this - could anyone advise on how to make the choice?</p>