PostgreSql 7.1.3 and Jboss-3.0.3/Tomcat
1). Copy PostgreSql driver(for examples, pgjdbc2.jar) to ${JBOSS_HOME}\server\default\lib
2). Copy postgres-service.xml from ${JBOSS_HOME}\docs\examples\jca to ${JBOSS_HOME}\server\default\deploy
3). Edit postgres-service.xml(in the ${JBOSS_HOME}\server\default\deploy directory)
a. replace "PstgresDS" by "DeafultDS"
b. modify JDBC parameters, for example,
.
.
.
<config-property name="ConnectionURL"
type="java.lang.String">jdbc:postgresql://localhost/testDB</config-property>
<config-property name="DriverClass"
type="java.lang.String">org.postgresql.Driver</config-property>
<!--set these only if you want only default logins, not through JAAS -->
<config-property name="UserName" type="java.lang.String">wade</config-property>
<config-property name="Password" type="java.lang.String">pass</config-property>
.
.
.
4). edit standardjbosscmp-jdbc.xml in the ${JBOSS_HOME}\server\default\conf
change this line to use PostgreSql
.
.
<datasource-mapping>PostgreSQL 7.2</datasource-mapping>
.
.
5). restart Jboss
Now, your CM ejbs which use "DeafultDS" will use your Psql :)