Postgres as default datasource with JBoss 3.0
jphekman May 6, 2002 1:26 PMI apologize for the earlier posting with no content; apparently my browser navigated the "attach files" screen poorly.
I've been trying to convince JBoss 3.0 (checked out of the repository around April 14 and built then) to use PostgresQL instead of Hypersonic as its default database. I seem to have successfully convinced JBoss to create a Postgres datasource, but it is still using the old Hypersonc database to persist data.
I have been unable to find documentation on how to do this, and the configuration has changed significantly since 2.4. If documentation exists and I've just missed it, could someone please point me at it? (I have followed the instructions at
http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ are helpful for getting the Postgres datasource installed, but not for making it the default datasource.)
The parts of the startup output which I think are relevant are below:
21:24:58,166 INFO [MainDeployer] Starting deployment of package: file:/home/jphekman/src/other/jboss-all/build/output/jboss-3.0.0beta2/server/default/deploy/postgres-service.xml
21:24:59,480 WARN [ServiceController] jboss.jca:service=LocalTxDS,name=PostgresDS does not implement any Service methods
21:24:59,482 INFO [JBossManagedConnectionPool] Creating
21:24:59,482 INFO [JBossManagedConnectionPool] Created
21:24:59,485 INFO [JBossManagedConnectionPool] Starting
21:24:59,486 INFO [JBossManagedConnectionPool] Started
21:24:59,488 INFO [MainDeployer] Successfully completed deployment of package: file:/home/jphekman/src/other/jboss-all/build/output/jboss-3.0.0beta2/server/default/deploy/postgres-service.xml
...
21:25:05,711 INFO [DefaultDS] Bound connection factory for resource adapter 'Minerva JDBC LocalTransaction ResourceAdapter' to JNDI name 'java:/DefaultDS'
...
21:25:06,452 INFO [NoTransDS] Bound connection factory for resource adapter 'Minerva JDBC LocalTransaction ResourceAdapter' to JNDI name 'java:/NoTransDS'
...
21:25:06,526 INFO [JaasSecurityManagerService] Added PostgresDbRealm, org.jboss.security.plugins.SecurityDomainContext@cf2a to map
21:25:07,801 WARN [RARDeployment] Not setting config property 'Password'
21:25:07,805 INFO [PostgresDS] Bound connection factory for resource adapter 'Minerva JDBC LocalTransaction ResourceAdapter' to JNDI name 'java:/PostgresDS'
21:25:07,805 INFO [LocalTxConnectionManager] Started
21:25:07,807 INFO [MainDeployer] Successfully completed deployment of package: file:/home/jphekman/src/other/jboss-all/build/output/jboss-3.0.0beta2/server/default/deploy/jboss-jdbc.rar
--
I am assuming that the messages along the lines of "Bound connection factory for resource adapter 'Minerva JDBC LocalTransaction ResourceAdapter'" are talking about binding to various datasources. There are three of those. It does still mention DefaultDS, although I can't find the place in the config files where references to DefaultDS haven't been commented out (well, except for new-hsqldb-default-service.xml, which defines it, but does not ask anything to USE it).
As for config files...
In deploy, we have new-hsqldb-default-service.xml, which I haven't removed; perhaps I should? There is also postgres-service.xml there.
In conf, there is standardjaws.xml, standardjbosscmp-jdbc.xml, and standardjboss.xml (I don't think the last one is relevant, but included it just in case).
In my application.ear, there is jbosscmp-jdbc.xml.
Both jbosscmp files contain this:
<!-- java:/DefaultDS -->
java:/PostgresDS
<datasource-mapping>PostgreSQL</datasource-mapping>
<!-- <datasource-mapping>Hypersonic SQL</datasource-mapping> -->
postgres-service.xml begins like so:
The top of standardjaws:
<!-- java:/DefaultDS
<type-mapping>Hypersonic SQL</type-mapping> -->
java:/PostgresDS
<type-mapping>PostgreSQL</type-mapping>
false
Does anyone have any suggestions for me?
Thanks,
Jessica