Hi,I have config a datasource like the following:

  <local-tx-datasource>
    <jndi-name>PostgresDS</jndi-name>
    <connection-url>jdbc:postgresql://localhost:5432/eai</connection-url>
    <driver-class>org.postgresql.Driver</driver-class>
    <user-name>postgres</user-name>
    postgres
    <min-pool-size>5</min-pool-size>
    <max-pool-size>100</max-pool-size>
    <new-connection-sql>select 1</new-connection-sql>
    <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>


Then

1, how can I get the datasource object so to get a connection ? some code 
snippet will be appreciated.

2,My web app is in the save JVM,so could i get the datasource directly without 
a jndi lookup (may fetch the datasource mbean directly ?)?

3,Is the database connections REALLY been pooled ,according the config like 
above ?

4,how to config to let jboss server initiate serveral database connection when 
startup?

I'm totally new to jboss.I have searched the web for a while but find no 
result.Anyone can help me ? Thanks!

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964832
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to