Wednesday, January 30, 2008

Switch jUDDI on JBossESB over to Postgres

By default JBossESB uses HSQL to handle persistence for jUDDI. For production it is recommended to switch it to for example Postgres.

1. First you will need to download the Postgres JDBC driver. I selected the '8.2-507 JDBC 2EE' driver. You can copy it to either the jboss_home/server/default/lib directory, or to the jbossesb.sar/lib directory.

2. Create the juddi database. Run the pgAdmin a shown in Figure 1.



Figure 1. The Postgres Admin

and create a juddi user, which has create rights to create tables, see Figure 2.



Figure 2. Add a user called 'juddi'


3. Next you should update the datasource for jUDDI, which is defined in the jbossesb.sar/juddi-ds.xml. Comment out the Hypersonic configuration and add the postgres datasource configuration like



4. Finally we have to tell jUDDI where it can find the DDL to create the juddi schema. For this we edit the jbossesb.sar/esb.juddi.xml. Modify the 'juddi.sqlFiles' setting by replacing the 'hsqldb' occurances to 'postgresql'.



Now on startup JBossESB will create the jUDDI tables in the Postgres juddi database.

For an overview of jUDDI in JBossESB in pdf format see the Registry Guide.

2 comments:

Anonymous said...

Do you think jUDDI can be used in production? This JIRA entry says no, comparing jUDDI to Hypersonic.

- Scott Dawson

Kurt Stam said...

In terms of stability and UDDI functionality jUDDI can be (and is) used in production environments. The issue raised in the jira you referenced is that it does not implement any security policy features. For security of your services you would need to use the feature of the platform you are deploying your services on (such as an appserver). For management of both policies and UDDI look up functionality in ONE system you will need some kind of Governance system. I think for the SOA-P one of the solutions is to use SOA-Software.