Hello,

I am trying to set up 0racle connection pooling.   Some of the
parameters are reflected normally, but some are specified via a property
lists.  How do I set the property list properties using Tomcat/JNDI?  I
can set up the basic DataSource, but I cannot set the maxLimit parameter
on the max number of connections because they are in the
setConnectionCacheProperties property map, not reflected.

More specifically, here is my conf/Catalina/localhost/KMS.conf  (My web
app is KMS).

# cat /opt/tomcat/conf/Catalina/localhost/KMS.xml
<?xml version="1.0" encoding="UTF-8"?>

<Context path="/KMS" docBase="KMS" debug="5" reloadable="true"
crossContext="true">

<Resource name="jdbc/rkm" auth="Container"
    type="oracle.jdbc.pool.OracleDataSource"
    driverClassName="oracle.jdbc.OracleDriver"
    factory="oracle.jdbc.pool.OracleDataSourceFactory"
    connectionCachingEnabled="true"

    connectionCacheName="KmsConPool"
    abandonedConnectionTimeout="200"
    connectionWaitTimeout="200"

    maxLimit="20"

    url="jdbc:oracle:thin:@localhost:1521:rsakmpri"
    user="local"
    password="-THIS-SHOULD-BE-IGNORED-"
/> <!-- maxLimit ignored -->

</Context>

The problem is that parameters like connectionCachingEnabled are set
reflectively and work but some such as MaxLimit are set in property
lists.  

Specifically doing this in ordinary, easy Java, from the Oracle manual:-

    OracleDataSource ods = new OracleDataSource();

    // set cache properties in map
    java.util.Properties prop = new java.util.Properties();
    prop.setProperty("MinLimit", "2");
    prop.setProperty("MaxLimit", "10");

    // set DataSource properties
    String url = "jdbc:oracle:oci8:@";
    ods.setURL(url);
    ods.setConnectionCacheProperties (prop); //
<<<<<<<<<<<<<<<<<<<<<<<<<

    ods.setUser("hr");
    ods.setPassword("hr");
    ods.setConnectionCachingEnabled(true); 
    ods.setConnectionCacheName("ImplicitCache01"); 
    ...
    Connection conn = ods.getConnection(user, pass);

But of course this is "Enterprise" software, so it must be done in XML,
not Java.  Any ideas as to how to do this most welcome.

Anthony

PS.  I have never seen any reference to the ability to put a file like
KMS.xml in the conf area.  I certainly seems to work, and is very
necessary -- obviously one does not want site config in a war -- but
just not documented as far as I can tell.

--
Dr Anthony Berglas 
Ph. +61 7 3227 4410
Mob. +61 44 838 8874
[EMAIL PROTECTED]; [EMAIL PROTECTED]


--
Dr Anthony Berglas 
Ph. +61 7 3227 4410
Mob. +61 44 838 8874
[EMAIL PROTECTED]; [EMAIL PROTECTED]


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to