As a newbie to both JBoss AS and JBoss Messaging, I had a somewhat difficult time configuring JBoss Messaging persistance to run against an "enterprise" database. This was primarily due to a lack of details in the "Getting Started with JBoss Messaging 1.0.1" document, which was my primary source of installation and initial configuration information. (This is not meant as a critique to the fine people at JBoss, as I understand Messaging is still somewhat a work-in-progress, and documentation updates often lag behind - especially between CR releases). After a lot of searches against the JBoss forums and Wiki pages, I was able to piece together a process that finally worked for me. I thought I'd post the steps of this process against this thread to hopefully save another newbie in my position the time is took me to figure it all out.
My goal was to take the Hypersonic SQL database "out of the picture" and make a PostgreSQL 8.1.2 database instance my "default datasource". Additionally, let me also state that I am using JBoss Messaging as a "standalone" application and I am not utilizing JBoss AS for any other purpose but to support the JBoss Messaging functionality. This process was performed using JBoss AS 4.0.4-GA and JBoss Messaging 1.0.1-CR2. In the following steps "$JBOSS_HOME" is the JBoss AS installation location and "$MESSAGING_HOME" is the directory where the JBoss Messaging release bundle was extracted. 1) Performed an install of JBoss AS 4.0.4-GA using Web Install and selecting the "default" profile. 2) Executed the Ant task $MESSAGING_HOME/util/release-admin.xml 3) Copied file $JBOSS_HOME/docs/examples/jca/postgres-ds.xml to $JBOSS_HOME/server/messaging/deploy 4) Edited $JBOSS_HOME/server/messaging/deploy/postgres-ds.xml as follows: 4a) Modified <connection-url>, <user-name> and < password > tag data per my taget database's configuration 4b) Set the <jndi-name> to "DefaultDS" 4c) Set the <type-mapping> to "PostgreSQL 8.1" [note that setting this to "PostgreSQL 8.1.2" (my actual database version) caused errors - so there is a limited set of <type-mapping> metadata values defined somewhere] 5) Removed file $JBOSS_HOME/server/messaging/deploy/hsqldb-ds.xml 6) Copied $MESSAGING_HOME/examples/config/postgresql-persistence-service.xml to $JBOSS_HOME/server/messaging/deploy/jboss-messaging.sar 7) Removed file $JBOSS_HOME/server/messaging/deploy/jboss-messaging.sar/hsqldb-persistence-service.xml 8) Obtained the appropriate PostgreSQL JDBC3 driver jar file and copied it to $JBOSS_HOME/server/messaging/lib 9) Edited the PostgreSQL pg_hba.conf configuration file to allow connections from by the JBoss database user from the localhost. I then started the server and saw no exceptions. Nine tables were also created in my database instance: hilosequences, jms_channel_mapping, jms_counter, jms_message, jms_message_reference, jms_role, jms_transaction, jms_user and timers. I was also able to successfully execute the following installation validation tests found in $MESSAGING_HOME/examples: mdb, queue, secure-socket, stateless and topic. Even though the details presented here are specific to PostgreSQL, I believe the same basic steps can be followed when configuring persistence using any of the currently databases currently supported by JBoss Messaging. JBoss experts... if I violated any "safe practices" or have llisted any redundant/unneeded steps, please critique and/or correct any information I presented. Thank you. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953615#3953615 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953615 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user