-
1. Re: How do I add Posgres 8 to JBoss 4.x
weston.price Jun 2, 2006 4:27 PM (in response to c_eric_ray)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
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossJCA
DataSources and specficially mentioned here:
http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigDataSources
Both of these are mentioned in the READ THIS FIRST post at the top of this forum. -
2. Re: How do I add Posgres 8 to JBoss 4.x
c_eric_ray Jun 2, 2006 5:21 PM (in response to c_eric_ray)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 1.3.2.1 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. -
3. Re: How do I add Posgres 8 to JBoss 4.x
weston.price Jun 2, 2006 5:24 PM (in response to c_eric_ray)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)
Regards,
Weston -
4. Re: How do I add Posgres 8 to JBoss 4.x
c_eric_ray Jun 2, 2006 5:26 PM (in response to c_eric_ray)You are the man. Thanks so much. I'll shut up now. :)
-
5. Re: How do I add Posgres 8 to JBoss 4.x
weston.price Jun 2, 2006 5:27 PM (in response to c_eric_ray)Nope, don't shut up!
Any question, comments etc, etc are always welcome.