Home > Java > Changing jBoss DefaultDS

Changing jBoss DefaultDS

jBoss Application Server 5.x comes shipped with HQSQL as default database backend  called DefaultDS. However, sometimes using HSQL isn’t a good approach when you are deploying the application server on production. The following steps will guide you to change DefaultDS to use another database backend such as PostgreSQL 8.x.

1. Create a PostgreSQL database as usual

This procedure is out-of-scope of this post.

2. Configure login-config.xml

Add the following lines to your running jBoss login-config.xml

<module-option name="principal">postgres-user</module-option>
<module-option name="userName">postgres-user</module-option>
<module-option name="password">postgres-password</module-option>
<module-option name="managedConnectionFactoryName">

3. Configure JMS

  • Copy postgresql-persistence-service.xml from the jboss_instalation/docs/examples/jms/ to jboss_instalation/server/all/deploy/messaging
  • Remove or rename hsqldb-persistence-service.xml from jboss_instalation/server/all/deploy/messaging

4. Create a new DefaultDS file

  • Create a new file called postgresql-ds.xml on the deploy folder.

(Example file. You can change it based on your needs)

<?xml version="1.0" encoding="UTF-8"?>
  • Remove or rename the hsqldb-ds.xml file on deploy folder.

5. Start jBoss and enjoy

Categories: Java
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: