Hi,

time ago, I switched from Poolman to Jakarta DBCP.
I used the patch provided by Eric Pugh to "DbConnection.java" to get a 
DbForms relase that uses
the Jakarta commons connection pooling library instead of Poolman.

Then I tried to make a "connection pool" factory  system to switch 
between connection pool libraries (jakarta dbcp, Protomatter cpool, etc)
without modify the dbforms code.
http://www.pow2.com/download/dbforms-connectionFactory.zip

I'd like to know if:

a) the connection pool factory makes sense;
b) there is the possibility to merge the Multiple Database Connections 
contrib with the connection pool factory

Thank you,
Luca



Bradley M. Handy wrote:

>I have updated the Multiple Connections functionality for anyone who
>wishes to try this functionality out.
>
>After reading this if you would like to help test this functionality
>out, let me know.  If you're already helping test the original changes,
>e-mail me and I'll send you a new jar file with the updated TLD.
>
>Here are the changes I've made since the last test jar:
>
>1.)    Added support for backward compatibility for dbforms-config.xml
>      files.  Which gives you the options of configuring your
>       'dbconnection's like normal or by enclosing them in
>'dbconnections'
>       elements.
>2.)    Got rid of the 'jdbcUrl' attribute.  Use 'name' now like normal.
>3.)    Added an optional 'id' attribute to allow you to give your
>       'dbconnection's a name.  This would be the value you use in the
>       new 'dbConnectionName' attribute for the dbform, queryData,
>       tableData, blobContent, and getConnection tags.
>4.)    'dbconnection's are processed in order and given a unique
>integer
>       identifier whether you provide an 'id' attribute or not.  You
>may
>       also use this integer as a value for 'dbConnectionName'.
>5.)    Added an optional 'default' attribute to the 'dbconnection'
>element.
>       This indicates that a particular 'dbconnection' is to be used
>when
>       'dbConnectionName' does not exist. (BTW 'dbConnectionName' is no
>       longer required.) If no 'dbconnection's are set as the default
>then
>       the first configured 'dbconnection' is used as the default.
>
>Here are some sample configurations for new-style and current-style
>config files.
>
>-----NEW STYLE
><dbforms-config>
>  <!-- table configurations -->
>
>  <dbconnections>
>    <!-- referenced by using 'dbConnectionName="0"'. -->
>    <dbconnection
>      name = "jdbc/dbformstest"
>      isJndi = "true" />
>
>    <!-- referenced by using 'dbConnectionName="1"' or 
>         'dbConnectionName="development"'. -->
>    <dbconnection
>      id = "development"
>      name   = "jdbc:poolman://dbformstest"
>      isJndi = "false"
>      class  = "com.codestudio.sql.PoolMan" />
>
>    <!-- referenced by using 'dbConnectionName="2"' or
>         'dbConnectionName="production"' or
>         leaving 'dbConnectionName' out. -->
>    <dbconnection
>      id = "production"
>      default = "true"
>      name   = "jdbc:mysql://localhost/fashion"
>      isJndi = "false"
>      conClass  = "org.gjt.mm.mysql.Driver"            
>      username = "scott"
>      password = "tiger" />
>  </dbconnections>
></dbforms-config>
>
>-----END NEW STYLE
>
>-----CURRENT STYLE
><dbforms-config>
>  <!-- table configurations -->
>
>  <!-- referenced by using 'dbConnectionName="0"'. -->
>  <dbconnection
>    name = "jdbc/dbformstest"
>    isJndi = "true" />
>
>  <!-- referenced by using 'dbConnectionName="1"' or 
>       'dbConnectionName="development"'. -->
>  <dbconnection
>    id = "development"
>    name   = "jdbc:poolman://dbformstest"
>    isJndi = "false"
>    class  = "com.codestudio.sql.PoolMan" />
>
>  <!-- referenced by using 'dbConnectionName="2"' or
>       'dbConnectionName="production"' or
>       leaving 'dbConnectionName' out. -->
>  <dbconnection
>    id = "production"
>    default = "true"
>    name   = "jdbc:mysql://localhost/fashion"
>    isJndi = "false"
>    conClass  = "org.gjt.mm.mysql.Driver"              
>    username = "scott"
>    password = "tiger" />
>
></dbforms-config>
>
>----- END CURRENT STYLE
>
>Thanks to Dirk Kraemer for this suggestions and in helping me see the
>light on making the new functionality backward compatible.
>
>Bradley M. Handy
>Programmer/Analyst
>Spring Arbor University
>
>mailto:[EMAIL PROTECTED]
>
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]] On Behalf Of Dirk Kraemer
>Sent: August 02, 2002 10:23
>To: [EMAIL PROTECTED]
>Subject: Re: [Jdbforms-developers] Multiple Database Connections
>
>Hi Bradley,
>
>thanks for your reply. I still did not find time to
>have a look at your code to be able to make any
>really userful comments. It somehow sounds like 
>connection now (if they do not have an explicit name)
>can be accessed by a number corresponding to the order
>they appear in the config file? Well, why not....?
>
>However, the important thing for us all is the
>backward compatibility, thank you for trying to 
>reach that goal. I'll be on vacation next two weeks,
>so if you don't hear anything from me, don't think
>I'm not interested any more. I'll promise to test it out,
>I have one application that I had to split into three appls
>because three databases are used. If you have a new
>version within next two weeks I would glad to get that
>one for my test.
>
>Did you get replys from others?
>
>Regards and thanks again 
>
>Dirk
>
>BTW: Thank you also for helping with 
>  answers on the list
>
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by:ThinkGeek
>Welcome to geek heaven.
>http://thinkgeek.com/sf
>_______________________________________________
>DbForms Mailing List
>
>http://www.wap-force.net/dbforms
>
>
>
>  
>





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to