Here are the steps to add connection pooling to OR Broker using BoneCP connection pooling in Oracle Database.
1) add the maven plugin in your pom.xml
<dependency>
<groupId>com.jolbox</groupId>
<artifactId>bonecp</artifactId>
<version>0.7.1.RELEASE</version>
</dependency>
NOTE: make sure you have the oracle driver and slf4j-log4j12 in your pom.xml
2) instantiate the BoneCPDataSource and set the property file (example and details can be found here -
http://jolbox.com/ )
val ds = new BoneCPDataSource()
ds.setJdbcUrl(jdbcUrl)
ds.setUsername(userName)
ds.setPassword(password)
ds.setMaxConnectionsPerPartition(minConnectionPerPartition)
ds.setMaxConnectionsPerPartition(maxConnectionPerPartition)
ds.setPartitionCount(partitionCount)
3) set your broker config with that data source define in step 2.
val config = new BrokerConfig(ds)
4) To verify your connection pool you can execute this command:
netstat -na | grep "1521" | sort