Ok, lets take one thing at a time:
I am assuing that you don't want to replace the default datasource, but rather, use one of your own.
This is a good place to start for DataSources and JCA in general in JBoss
DataSources and specficially mentioned here:
Both of these are mentioned in the READ THIS FIRST post at the top of this forum.
From what I read this is what I do...
place this (postgres-ds.xml) file in deploy-hasingleton
<?xml version="1.0" encoding="UTF-8" ?> - <!-- ===================================================================== --> - <!-- --> - <!-- JBoss Server Configuration --> - <!-- --> - <!-- ===================================================================== --> - <!-- $Id: postgres-ds.xml,v 126.96.36.199 2006/02/07 14:23:00 acoliver Exp $ --> - <!-- ==================================================================== --> - <!-- Datasource config for Postgres --> - <!-- ==================================================================== --> - <datasources> - <local-tx-datasource> <jndi-name>PostgresDS</jndi-name> <connection-url>jdbc:postgresql://localhost:5432/test</connection-url> <driver-class>org.postgresql.Driver</driver-class> <user-name>dev</user-name> <password>dev</password> - <!-- sql to call when connection is created. Can be anything, select 1 is valid for PostgreSQL <new-connection-sql>select 1</new-connection-sql> --> - <!-- 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) --> - <metadata> <type-mapping>PostgreSQL 8.0</type-mapping> </metadata> </local-tx-datasource> </datasources>
place the postgres jdbc driver in server/all/lib
When I start JBoss I see the following in the output:
15:47:53,515 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=PostgresDS' to JNDI name 'java:PostgresDS'
Is that all there is too it? If so great, I'm ready to rock-n-roll and thanks for the help. If there's more, please let me know.
Thanks for the quick response.
Yep, that's pretty much it. If you read the Wiki pages, you will find varying ways to fine tune the pools as you see fit (transactions, min/max size, etc, etc)
You are the man. Thanks so much. I'll shut up now. :)
Nope, don't shut up!
Any question, comments etc, etc are always welcome.