为了实现读写分离,我们需要连接池。
现在,应用程序可以获得连接池。
解决这一问题的方法是使用连接池。
The remedy for this problem would be to implement connection pooling.
每个工厂都有一个关联的空闲连接池。
让我们假设连接池的容量为2。
Let's also assume that we have the connection-pool capacity equal to two.
但空闲连接池的实际工作原理是什么?
在应用服务器启动时,连接池是空的。
When the application server starts up, the free connection pools are empty.
本文还阐述了许多连接池属性的行为。
The article also explained the behaviour of a number of connection pool properties.
接下来将为新创建的数据库创建连接池
Next you create a connection pool for the recently created database
数据源连接池和事先声明的高速缓存。
WebSphere连接池等待时间。
显示当前的实际连接池大小。
Connection pool size - Displays the current actual connection pool size.
JDBC连接池配置分析。
执行下列步骤创建连接池。
为Informix数据库创建连接池。
另一个可能受影响的资源是数据库连接池。
Another resource that can be affected is the database connection pool.
请注意,您还可以在这里指定连接池参数。
Note that you can also specify connection pooling parameters here.
它使用的连接c1将被放回空闲连接池。
The connection it was using, c1, is put back into the free connection pool.
增大最大连接池大小可以帮助缓解此问题。
Increasing the maximum connection pool size might help to alleviate the problem.
因此,应用程序采用连接池机制至关重要。
Therefore, it is very important that an application employs a connection pooling mechanism.
数据源允许利用连接池。
Data sources allow us to take advantage of connection pooling.
该模块的代码必须通过JNDI查找连接池。
The module's code must look up the connection pool through JNDI.
该变量被设计用来保存连接池对象的一个实例。
That variable is designed to hold an instance of a connection pool object.
例如,看一下清单1内所示的这个连接池单例。
For example, take a look at the connection pool singleton in Listing 1.
什么是连接池以及为何使用它?
我的连接池最好的大小是多少?
连接管理器在应用服务器中查询连接池的实例。
The connection manager looks for an instance of a connection pool in the application server.
然后,该数据源就可以连接到所选择的连接池了。
The data source then is connected to the selected connection pool.
让我们看一下连接池创建的更多细节。
Let us see Connection Pooling Creation Mechanism in more detail.
让我们看一下连接池创建的更多细节。
Let us see Connection Pooling Creation Mechanism in more detail.
应用推荐