This discussion is archived
10 Replies Latest reply: Apr 5, 2012 1:58 AM by TimHall RSS

DRCP and JDBC

684074 Newbie
Currently Being Moderated
Hi I am trying to figure out how to use the new 11G DRCP feature (see this ) from Java. It appears that I can use the "SERVER=POOLED" syntax in the connection string, but it does not maintain a connection to the server when I call close() on the connection object. So in the end it seems to act like a regular, unpooled connection as far as I can tell.

Does anyone know of a way to access the special OCI calls to take advantage of the server side pool from Java?

FYI, here is the connect string I am using:

jdbc:oracle:oci8:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rdb02.atlnp1)(PORT=1528)))(CONNECT_DATA=(SERVICE_NAME=sd11g.atlnp1)(SERVER=POOLED)))

Thanks,
Scott

PS: This link discusses the OCI calls used to interact with the server side pool.

Edited by: user10899558 on Feb 9, 2009 1:58 PM
  • 1. Re: DRCP and JDBC
    24208 Oracle ACE
    Currently Being Moderated
    Hi Scott,

    I'm not a Java person so I could be (way) off base here.

    Anyway, I found this sample:

    http://www.colestock.com/blogs/2008/02/11g-new-feature-drcp-database-resident.html

    which looks to be using database resident connection pooling and jdbc.

    As noted in the above link, that technique is an extension of Arup's article here:

    http://www.oracle.com/technology/pub/articles/oracle-database-11g-top-features/11g-caching-pooling.html

    Perhaps something in there will be helpful.

    Regards,

    Mark
  • 2. Re: DRCP and JDBC
    684074 Newbie
    Currently Being Moderated
    Hi Mark, thanks for the help. I actually wound up opening a TAR and just got word Tuesday that the proper OCI hooks aren't exposed through the JDBC driver to take advantage of DRCP. The example you showed was one that I had looked at as well. It is true, as this example shows, that you can connect, but it effectively works like a regular connection with out connection pooling since the network connection to the server to closed each time you close the database connection.
  • 3. Re: DRCP and JDBC
    24208 Oracle ACE
    Currently Being Moderated
    Hi Scott,

    I was afraid of something like that. Well, anyway, at least you have a more definitive answer as to the current situation.

    Regards,

    Mark
  • 4. Re: DRCP and JDBC
    andy dufresne Newbie
    Currently Being Moderated
    I am trying the same usecase - DRCP and OCI JDBC driver. From the V$CPOOL_STATS view I could see even after DRCP in enabled it behaves as a dedicated server. The value in NUM_MISSES column is the same as the number of connection requests made.

    The OCI JDBC driver version I am using is 11.2.0.1.0. I could not find any oracle documentation link which would mention that the JDBC OCI driver does not support this (even if OCI supports. I was looking for a link just be sure that I am not missing anything in the configuration).

    Thanks in advance.
  • 5. Re: DRCP and JDBC
    kmohan Explorer
    Currently Being Moderated
    The JDBC driver has not yet fully exposed the DRCP functionality.
  • 6. Re: DRCP and JDBC
    andy dufresne Newbie
    Currently Being Moderated
    Can anyone share an official link which states that the OCI JDBC driver does not support DRCP? The official readme document also does not mention anything about this issue.
  • 7. Re: DRCP and JDBC
    kmohan Explorer
    Currently Being Moderated
    Hi, please see the 11g New Features guide, which mentions the addition of DRCP feature and the Oracle drivers which can be used to leverage this feature. (OCI & OCCI)
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28279/chapter1.htm#FEATURENO06948

    Open source drivers like PHP, Perl, Python also have exposed this feature. Oracle JDBC driver is yet to expose this fully. Using a JDBC client, and the connect string with (SERVER=POOLED), you can connect to a DRCP pooled server, but you do not have interfaces to share and reuse the pooled servers across multiple clients.
  • 8. Re: DRCP and JDBC
    andy dufresne Newbie
    Currently Being Moderated
    Ok. Do you mean that since DRCP is a new feature introduced in 11g, Oracle JDBC Driver would take sometime to add a support for this functionality and hence there is no bug or issue logged to track this? I was just looking for some link that officially stated that currently Oracle JDBC Driver does not support this or some link which atleast stated that it would be supported in future version of the driver.

    Thank you.

    Edited by: table1 on Apr 5, 2011 7:34 PM
  • 9. Re: DRCP and JDBC
    kmohan Explorer
    Currently Being Moderated
    That's right. It will be documented when JDBC exposes it.
  • 10. Re: DRCP and JDBC
    TimHall Oracle ACE Director
    Currently Being Moderated
    Hi.

    Sorry for the late addition to this thread, which answered my question.

    I checked on MOS for an official statement and I came up with this.

    [https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=HOWTO&id=1087381.1|https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=HOWTO&id=1087381.1]

    Thanks for the answer.

    Cheers

    Tim...

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points