Menu

#25 web harvest should be able to use external DB connection pool

2.1.0rc1-RELEASE
closed
None
7
2012-11-08
2012-09-26
No

It should be possible to integrate web harvest with some external connection pool (c3p0, dbcp, bonecp etc.)

Discussion

  • Piotr Dyraga

    Piotr Dyraga - 2012-10-15

    Introduced 'jndi:database' plugin as an alternative for 'database' plugin (from 'core' namespace). Both plugins can be used in exactly the same way, except that 'jndi:database' accepts only one attribute - database hook JNDI name ('database' plugin accepts jdbc url, driver name, username and password).

    'jndi:database' can be used only in the JNDI-enabled environment.

    <config xmlns="http://web-harvest.sourceforge.net/schema/2.1/core"
                   xmlns:jndi="http://web-harvest.sourceforge.net/schema/2.1/jndi">
    
      <set var="response">
        <jndi:database name="jdbc/czarny">
          select id, title, price from  products LIMIT 5;
        </jndi:database>
      </set>
    
    </config>
    

    Example JNDI hook:

    <Resource auth="Container" description="example database" name="jdbc/czarny" 
               maxPoolSize="20" minPoolSize="5" acquireIncrement="5" driverClass="com.mysql.jdbc.Driver" 
               jdbcUrl="jdbc:mysql://localhost:3306/testdb" 
               user="myuser" password="mypassword" factory="org.apache.naming.factory.BeanFactory" type="com.mchange.v2.c3p0.ComboPooledDataSource"/>
    
     

    Last edit: Piotr Dyraga 2012-10-22
  • Piotr Dyraga

    Piotr Dyraga - 2012-10-22
    • status: pending --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB