Hello,
 
I am just getting underway with Struts, but have done quite a bit of homework 
before submitting this query.
 
Before starting with struts, I configured my Tomcat server to handle DBCP 
through the server.xml for a web-app I configured. But now with struts, I 
notice that there is a <data-sources> element that must be filled in.
So according to the docs, for basic (not pooled)
<data-sources>
<!-- configuration for commons BasicDataSource -->
  <data-source type="org.apache.commons.dbcp.BasicDataSource">
      <set-property
        property="driverClassName"
        value="org.postgresql.Driver" />
      <set-property
        property="url"
        value="jdbc:postgresql://localhost/mydatabase" />
      <set-property
        property="username"
        value="me" />
      <set-property
        property="password"
        value="test" />
      <set-property
        property="maxActive"
        value="10" />
      <set-property
        property="maxWait"
        value="5000" />
      <set-property
        property="defaultAutoCommit"
        value="false" />
      <set-property
        property="defaultReadOnly"
        value="false" />
      <set-property
        property="validationQuery"
        value="SELECT COUNT(*) FROM market" />
     </data-source>
  </data-sources>

 
But my question of course, is I need the database pooling capability. How do I 
configure that and access connections? I have googled, but I am getting quite a 
bit of subjective matter back.
 
Could someone please lend a hand?
 
Thanks,
 

Scott K Purcell | Developer | VERTIS | 
555 Washington Ave. 4th Floor | St. Louis, MO 63101 | 
314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com 
<http://www.vertisinc.com/>  

Vertis is the premier provider of targeted advertising, media, and 
marketing services that drive consumers to marketers more effectively. 
                                                 

 

Reply via email to