I have setup a datasoure and pooling(for postgresql) in my JSP page.
The datasource works, but I am not sure if the pooling is working.
Here is what i have done:
1.) C:\jboss-4.0.4RC1\server\default\deploy\postgres-ds.xml:
------------------------------------------------------------------------
  <local-tx-datasource>
    <jndi-name>PostgresDS</jndi-name>
    <connection-url>jdbc:postgresql://pghost/sekunjalo</connection-url>
    <driver-class>org.postgresql.Driver</driver-class>
    <user-name>iis</user-name>
    
        <!-- sql to call when connection is created.  Can be anything, select 1 
is valid for PostgreSQL
        <new-connection-sql>select 1</new-connection-sql>
        -->

    <!-- Pools are lazily constructed on first use --> 
    <!-- The min connections in a pool/sub-pool -->
    <min-pool-size>1</min-pool-size> 
    <!-- The max connections in a pool/sub-pool --> 
    <max-pool-size>2</max-pool-size>
    <blocking-timeout-millis>5000</blocking-timeout-millis>
    <idle-timeout-minutes>15</idle-timeout-minutes>



        <!-- sql to call on an existing pooled connection when it is obtained 
from pool.  Can be anything, select 1 is valid for PostgreSQL
        <check-valid-connection-sql>select 1</check-valid-connection-sql>
        -->

      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml 
(optional) -->
      
         <type-mapping>PostgreSQL 7.2</type-mapping>
      
  </local-tx-datasource>


-------------------------------------------------------------------------------
2.) In my C:\jboss-4.0.4RC1\server\default\deploy\ROOT.war\WEB-INF folder, I 
have web.xml and jboss-web.xml
web.xml
-------------------------------------------------------
<resource-ref>
                <res-ref-name>jdbc/fnbDbPool</res-ref-name>
                <res-type>javax.sql.DataSource</res-type>
                <res-auth>
                        Container
                </res-auth>
        </resource-ref>
----------------------------------------------------------
jboss-web.xml
---------------------------------------------------------
<resource-ref>
                <res-ref-name>jdbc/fnbDbPool</res-ref-name>
                <res-type>javax.sql.DataSource</res-type>
                <jndi-name>java:/PostgresDS</jndi-name>
        </resource-ref>
--------------------------------------------------------

and i have my driver also in my lib folder, everything work, but is this all i 
need to do to activate or use the pooling?




View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3955225#3955225

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3955225

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to