Creating the Registry
jUDDI installs as a Web application (.ear
file or .war
file) with a context of http://<host>:<port>/juddi
so you can deploy it to almost any up-to-date application server or servlet engine.
To install the jUDDI Web application, following these steps:
- Copy the Web.xml file from the <jUDDI_Home>/conf directory to the <jUDDI_Home>/webapps/juddi/WEB-INF directory
- Copy the <jUDDI_Home>/webapps/juddi directory into your application server's webapps directory
- Copy the juddi.properties file from the <jUDDI_Home>/conf directory to the <jUDDI_Home>/webapps/juddi/WEB-INF/classes directory
- Edit the juddi.properties file. jUDDI ships configured with a default JDBC driver for MySQL, in the com.mysql.jdbc.Driver package. If you are using another database or if your MySQL JDBC driver has a different package name, you will have to change the reference to it in the juddi.properties file located in the <jUDDI_Home>/conf directory. For jUDDI to use the database, add the following lines to the end of the juddi.properties file:
# required JDBC DataSource properties
juddi.dataSource = java:comp/env/jdbc/juddiDB
# required JDBC Driver properties
juddi.useConnectionPool = true
juddi.jdbcDriver = com.mysql.jdbc.Driver
juddi.jdbcURL = jdbc:mysql://localhost/juddi
juddi.jdbcUser = juddi
juddi.jdbcPassword = juddi
Creating the Data Store
- Edit the server.xml file to configure the jUDDI Web application for your specific application server, if needed.
The default implementation for the jUDDI data store uses JDBC. The setup process is fairly straightforward. Generically, you start by creating a new jUDDI database using one of the database schemas included with the jUDDI download, and then configure a JNDI Datasource named 'juddiDB
' in the application server or servlet engine to which you're deploying.
Here's a specific example using MySQL. After installing MySQL and creating a root user, create a new database called "juddi" using the MySQL command-line as follows:
mysql> create database juddi
After successfully creating the database, you must tell MySQL to use the juddi
database by typing the following on the MySQL command line:
mysql> use juddi
Now, you can populate the database using the SQL script that ships with jUDDI by typing the following on the MySQL command-line:
mysql> \. <jUDDI_Home>\dbscripts\juddi_mysql.sql
Replace the <jUDDI_Home>
fragment in the preceding command with the path to your local jUDDI installation.
Create a new user called juddi
that will be used by jUDDI for accessing the UDDI database. Make sure this user has permission to connect to, read from, and write to the UDDI database.
mysql> grant all privileges on juddi.* to juddi@"%"
-> identified by 'juddi';
mysql> grant all privileges on juddi.* to juddi@"localhost"
-> identified by 'juddi';
Now add a jUDDI publisher with a PUBLISHER_ID
representing the ID a publisher uses when authenticating, as follows:
mysql> INSERT INTO PUBLISHER (PUBLISHER_ID,PUBLISHER_NAME,ADMIN)
-> VALUES ('juddi','John Doe','false');
Finally, add the MySQL JDBC driver to the classpath of the jUDDI Web application by creating a WEB-INF/lib
directory structure under the <jUDDI_Home>/webapps/juddi
Running the Registry
To test your jUDDI installation, start your Web server and/or application server and point your browser to:
This should take you to the "jUDDI happiness page." You should see a list of jUDDI dependencies, resource files, properties files, class files, etc. Your registry is now ready to handle UDDI request messages. The jUDDI installation includes samples that you can use to send requests to the registry.
The Universal Description, Discovery and Integration (UDDI) specification and protocol work together to form one of the primary components of a complete Web services infrastructure. jUDDI is an open source Java implementation of the UDDI specification for Web services. By following the steps shown in this article, you can use jUDDI to create a private UDDI registry that handles publication, authentication, and inquiry requests.