I'm trying to change the default datasource to Postgres. I'm using
Jboss 3.2.1 with Postgres 7.3.2. So far I've made the following changes, and everything is still being sent to Hypersonic. Any help would be appreciated.
1. I added the
jdbc postgres driver to /lib.
2. I added a postgres-ds.xml to /server/default/deploy, which contains the following:
<datasources>
<local-tx-datasource>
<depends>jboss:service=Postgres</depends>
<jndi-name>PostgresDS</jndi-name>
<connection-url>jdbc
ostgresql://localhost:5432/JBOSS</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>xxx</user-name>
<password>yyy</password>
<security-domain>PostgresDbRealm</security-domain>
</local-tx-datasource>
</datasources>
3. I changed standardjbosscmp-jdbc.xml in /server/default/conf, to have the following first two lines replaced:
<datasource>
java:/PostgresDS</datasource>
<datasource-mapping>PostgreSQL</datasource-mapping>
4. Same thing in standardjaws.xml:
<datasource>java:/PostgresDS</datasource>
<type-mapping>PostgreSQL</type-mapping>
5. In login-config.xml, I added the following:
<application-policy name = "PostgresDbRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag = "required">
<module-option name = "principal">xxx</module-option>
<module-option name = "userName">xxx</module-option>
<module-option name = "password">yyy</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=PostgresDS</module-option>
</login-module>
</authentication>
</application-policy>