After reading multiple documents based on jdbc connection pooling i couldnt come up to some conclusion. What connection pooling method is best for an spring application which is deployed on tomcat and connect to mariadb.
mariadb provides it own connection pooling on the other hand multiple external pooling libraries exists HikariCp, DBCP, tomcat-jdbc etc.
There does not seem to be any benchmark about MariaDB's connection pooling, so giving an answer would probably be highly opiniated, and it'd also depend on your use cases, as benchmarks can only be relevant if looking at the right data.
You'll find here https://mariadb.com/fr/node/1829 MariaDB's arguments for providing yet another implementation of Connection Pooling.
For the other CP implementations, there are plenty of benchmarks, from which HikariCP stands out as an overall better option, and is now the default in Spring Boot 2.
In the end, it comes down to you trying out MariaDB's connection pooling or relying on an already established implementation.