ConnectionPoolManager in Tamino4.2

I have read the Java API Doc and knew that TConnectionPoolManager can now pool physical connections. According to the doc, it is highly recommended to use method addConnectionPool(String poolName, TConnectionPoolDescriptor descriptor) to create the pool.

However, I could not find out additional detail of “TConnectionPoolDescriptor”. How to define the object ?



TConnectionPoolDescriptor describes all the properties for a connection pool. Use of this method also guarantess that Tamino physical connections are pooled as specified in documentation. To create an object, here is the sample code would helpful to you…

TConnectionPoolManager pool =TConnectionPoolManager.getInstance();

TConnectionPoolDescriptor descriptor = new TConnectionPoolDescriptor();
descriptor.setDatabaseURI( databaseURI );
descriptor.setUser( user );
descriptor.setPassword( password );
descriptor.setMaxConnections( maxConnections );
descriptor.setInitConnections( initConnections );
descriptor.setTimeOut( timeOut );

connection = pool.getConnection(“MyPool”);


pool.addConnectionPool(“String poolName”,TConnectionPoolDescriptor descriptor) Adds a connection pool to the list of managed pools.
poolName is the name of the pool (identification)
descriptor is a TConnectionPoolDescriptor object describing the properties of the pool
and its connections.
and will return true on successful add, false if the pool already exists.

Hope its helpful.



Thanks a lot for the info.

Tony :slight_smile: