I configuring mybatis and I must to choose a data source type POOLED or UNPOOLED. In that case what's the difference between data source type pooled and unpooled?
Asked
Active
Viewed 2,599 times
1 Answers
4
UNPOOLED
This implementation of DataSource simply opens and closes a connection each time it is requested. While it’s a bit slower, this is a good choice for simple applications that do not require
the performance of immediately available connections. Different databases are also different in this
performance area, so for some it may be less important to pool and this configuration will be ideal
POOLED
This implementation of DataSource pools JDBC Connection objects to avoid the initial
connection and authentication time required to create a new Connection instance. This is a popular
approach for concurrent web applications to achieve the fastest response.
From : mybatis
v. 3.3.0
User Guide

Ahmet
- 314
- 5
- 15
-
1Additional advantage: the pool puts an upper limit on how many connections your application will use. This is important for web applications; you don't want a flood of users (or a few users with lots of tabs open) to be able to use up all the database connections, preventing anything else from connecting. – Bampfer Jan 27 '16 at 14:59