Patrice,
I have just been pointed to online documentation for this Oracle class mentioned
below. As OracleConnectionCacheImpl implements
javax.sql.DataSource, you will have to use the <data-source> element to configure all
this. Please note that due to still existing inconsistencies you will
have to use a different syntax, though.
<?xml version="1.0"?>
<database name="myBase" engine="oracle" >
<data-source class-name="oracle.jdbc.pool.OracleConnectionCacheImpl">
<params user="user" password="pwd" minLimit="5" maxLimit="10"
cacheScheme="OracleConnectionCacheImpl.DYNAMIC_SCHEME" .... />
</data-source>
<mapping href="Mapping.xml" />
</database>
Werner
On Thu, 04 Mar 2004 09:50:57 +0100, Werner Guttmann wrote:
>
>Patrice, Bruce,
>
>whilst it is true that I have been working on an improvement for handling parameters
>for database connections, this simply would not apply to this case
>as Patrice is using the <driver> element whilst I am working on the <data-source>
>element.
>
>Patrice, can I ask you a couple of questions about OracleConnectionCacheImpl itself ?
>Is this a class that implements the javax.sql.DataSource
>interface ? Or even better, can you please point me to online docs ?
>
>Werner
>
>On Wed, 3 Mar 2004 22:20:49 -0700 (MST), Bruce Snyder wrote:
>
>>This one time, at band camp, Patrice Fleurier said:
>>
>>PF>The Oracle connections pool is not active with Castor !
>>PF>
>>PF>Without Castor the java code is:
>>PF>OracleConnectionCacheImpl ocacheimpl = new OracleConnectionCacheImpl();
>>PF>ocacheimpl.setURL("jdbc:oracle:thin:@myServer:1521:myBase");
>>PF>ocacheimpl.setUser("user");
>>PF>ocacheimpl.setPassword("pwd");
>>PF>ocacheimpl.setMinLimit(5);
>>PF>ocacheimpl.setMaxLimit(10);
>>PF>ocacheimpl.setCacheScheme(OracleConnectionCacheImpl.DYNAMIC_SCHEME);
>>PF>
>>PF>Connection conn = ocacheimpl.getConnection();
>>PF> /* HERE THE POOL IS STRATED WITH 5 ORACLE CONNECTIONS */
>>PF> /* MY ORACLE SESSION IS ACTIVE */
>>PF> /* IM WORKING */
>>PF>conn.close();
>>PF>/* MY SESSION IS CLOSED */
>>PF>/* THE POOL IS ACTIVE WITH 5 ORACLE CONNECTIONS */
>>PF>ocacheimpl.close();
>>PF>/* THE POOL IS CLOSE */
>>PF>
>>PF>
>>PF>With Castor the code is:
>>PF>
>>PF>The xml file:
>>PF><?xml version="1.0"?>
>>PF><database name="myBase" engine="oracle" >
>>PF> <driver url="jdbc:oracle:thin:@myServer:1521:myBase"
>>PF> class-name="oracle.jdbc.pool.OracleConnectionCacheImpl">
>>PF> <param name="user" value="user" />
>>PF> <param name="password" value="pwd" />
>>PF> <param name="minLimit" value="5" />
>>PF> <param name="maxLimit" value="10" />
>>PF> <param name="cacheScheme"
>>PF>value="OracleConnectionCacheImpl.DYNAMIC_SCHEME" />
>>PF> </driver>
>>PF> <mapping href="Mapping.xml" />
>>PF></database>
>>...
>>PF>Conclusion :
>>PF>In my Castor sample, the Oracle connections pooling is never active.
>>PF>For each begin (Oracle session), there is one Oracle physical
>>PF>connection.
>>PF>
>>PF>Why?
>>PF>Where is my error?
>>
>>Patrice,
>>
>>The datbase descriptor above will not currently work properly to
>>initalize the Oracle JDBC connection pool. The reason for this is
>>simple, Castor has no prior knowledge of the variables attempting
>>to be set so it just ignores them. Werner was working on a fix for
>>this exact problem. I wonder what the status of this is? Werner,
>>could you comment on this?
>>
>>Bruce
>>--
>>perl -e 'print unpack("u30","<0G)[EMAIL
>>PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
>>
>>The Castor Project
>>http://www.castor.org/
>>
>>Apache Geronimo
>>http://incubator.apache.org/projects/geronimo.html
>>
>
>-----------------------------------------------------------
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev