Results 1 to 6 of 6
  1. #1
    Md Saim is offline Member
    Join Date
    Sep 2008
    Location
    Kolkata, India
    Posts
    20
    Rep Power
    0

    Post difference between PoolingDataSource and BasicDataSource

    what is the basic difference between org.apache.commons.dbcp

    p.PoolingDataSource and org.apache.commons.dbcp

    p.BasicDataSource?

    Thanks in advance.

  2. #2
    georgemc is offline Senior Member
    Join Date
    Sep 2008
    Posts
    135
    Rep Power
    0

    Default

    One of them pools connections. Can you guess which one?

  3. #3
    Md Saim is offline Member
    Join Date
    Sep 2008
    Location
    Kolkata, India
    Posts
    20
    Rep Power
    0

    Default

    Thanks for reply..

    PoolingDataSource is pools connections

    If the BasicDataSource does not use connection pooling then why does it have properties like "maxActive" which specifies "the maximum number of active connections that can be allocated from this pool at the same time".

  4. #4
    georgemc is offline Senior Member
    Join Date
    Sep 2008
    Posts
    135
    Rep Power
    0

    Default

    Actually, I tell a lie - both seem to pool connections. Which renders your question re-unanswered, I guess!

  5. #5
    Md Saim is offline Member
    Join Date
    Sep 2008
    Location
    Kolkata, India
    Posts
    20
    Rep Power
    0

    Default

    Yes.........

    But PoolingDataSource is not working in struts1.1 connection pooling.
    Because driverClassName, url, username & password parameters are not available in PoolingDataSource.

    Where do we use PoolingDataSource ?
    Last edited by Md Saim; 10-24-2008 at 09:54 AM.

  6. #6
    georgemc is offline Senior Member
    Join Date
    Sep 2008
    Posts
    135
    Rep Power
    0

    Default

    Hmm. Looking at the source, PoolingDataSource is just a thin wrapper over a generic pool that you, the developer, has to provide already full of connections, and the PDS just carries out some basic management of that. Just use the BasicDataSource, it seems to do much more.

Similar Threads

  1. difference
    By nishant in forum New To Java
    Replies: 2
    Last Post: 09-17-2008, 07:04 PM
  2. Difference between http and ftp
    By islamfunny in forum CLDC and MIDP
    Replies: 6
    Last Post: 08-14-2008, 08:12 AM
  3. Difference between browswer and appletviewer?
    By jklsemicolon in forum Java Applets
    Replies: 5
    Last Post: 08-09-2008, 06:23 AM
  4. Difference between ASP and JSP
    By barney in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 08-07-2007, 08:15 AM
  5. difference between this and super
    By mrark in forum New To Java
    Replies: 1
    Last Post: 06-27-2007, 06:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •