[ 
https://issues.apache.org/jira/browse/DBCP-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17617924#comment-17617924
 ] 

Kirk Hill commented on DBCP-587:
--------------------------------

Mark,  Thanks for the input.  So now I go an create a PoolingDataSource but 
nowhere can see how to set the FactoryClassName.

 

Here is the setup of my DataSource.  Then again maybe I need to read more on 
pooling since when I run this I only get 1 connection as opposed to when I run 
BasicDataSource I see 5 in my DB.  

 
{code:java}
// private static PoolingDataSource setupDataSource() {

    String connectURI = "jdbc:oracle:thin:hr/my_password@pdb_tac";
    ConnectionFactory connectionFactory = new 
DriverManagerConnectionFactory(connectURI, null);

    PoolableConnectionFactory poolableConnectionFactory = new 
PoolableConnectionFactory(connectionFactory, null);


    GenericObjectPoolConfig poolConfig = new GenericObjectPoolConfig();

    poolConfig.setMaxTotal(5);
    poolConfig.setMinIdle(3);
    ObjectPool objectPool = new 
GenericObjectPool(poolableConnectionFactory,poolConfig);

    System.out.println("Max connections total at setup: "
            + poolConfig.getMaxTotal());



    poolableConnectionFactory.setPool(objectPool);

    return new PoolingDataSource(objectPool);



}{code}

> DBCP and Transparent Application Continuity
> -------------------------------------------
>
>                 Key: DBCP-587
>                 URL: https://issues.apache.org/jira/browse/DBCP-587
>             Project: Commons DBCP
>          Issue Type: Bug
>    Affects Versions: 2.9.0
>            Reporter: Kirk Hill
>            Priority: Major
>
> Oracle databases have a high-availability setup that uses an item called 
> Transparent Application Continuity.  It requires using the following driver 
> class name for "oracle.jdbc.replay.OracleDataSourceImpl"  When I attempt to 
> use this driver I get the following error message.  
> SQLException occurred : Cannot create JDBC driver of class 
> 'oracle.jdbc.replay.OracleDataSourceImpl' 
> Having this as a way to create connection pools would greatly enhance your 
> product.  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to