31.4. Installation Steps

jUDDI needs a minimum of configuration steps in order to be successfuly deployed inside JOnAS.

NoteNote
 

The first step can be ignored if you use the JOnAS-provided juddi.war.

31.4.1. Create the juddi Web Application

31.4.1.1. Compilation

  1. Go to the directory where the jUDDI sources are located (JUDDI_HOME).

  2. Customize the JUDDI_HOME/conf/juddi.properties configuration file.
    # jUDDI Proxy Properties (used by RegistryProxy)
    juddi.proxy.adminURL = http://localhost:9000/juddi/admin
    juddi.proxy.inquiryURL = http://localhost:9000/juddi/inquiry
    juddi.proxy.publishURL = http://localhost:9000/juddi/publish
    juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
    juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
    juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
    
    # jUDDI HTTP Proxy Properties
    juddi.httpProxySet = true
    juddi.httpProxyHost = proxy.viens.net
    juddi.httpProxyPort = 8000
    juddi.httpProxyUserName = sviens
    juddi.httpProxyPassword = password

  3. Launch the compilation with Ant WAR. This produces a juddi.war inside the JUDDI_HOME/build/ directory.

31.4.1.2. Customization

JOnAS provides a lightweight juddi.war file from which all unnecessary libraries have been removed.

The original juddi.war (created from JUDDI_HOME) has a lot of libraries inside its WEB-INF/lib that are already provided by JOnAS. These files, listed below, can safely be removed:

  • axis.jar

  • commons-discovery.jar

  • commons-logging.jar

  • jaxrpc.jar

  • saaj.jar

  • wsdl4j.jar

By default, jUDDI includes a jonas-web.xml descriptor (in JUDDI_HOME/conf). This descriptor specifies the jndi name of the DataSource used in jUDDI; its default value is jdbc/juddiDB. This value will be used in the <datasource>.properties of JOnAS.

31.4.2. Create the Database

31.4.2.1. Retrieve the SQL scripts for your database

jUDDI comes with SQL files for many databases (MySQL, DB2, HSQL, Sybase, PostgreSQL, Oracle, TotalXML, JDataStore). The SQL scripts are different for each version of jUDDI:

31.4.2.2. Set Up the Database

For the 0.8 jUDDI release, the given SQL script must be executed. Then, a publisher (the user who has the rights to modify the UDDI server) must be added manually. This is currently the only way to add a publisher for jUDDI.

For latest release (0.9rc1), execute the given scripts (table creation, tmodels insertions, and publishers insertions).

31.4.3. Configure JOnAS Datasource

As jUDDI uses a DataSource to connect to the database, JOnAS must be configured to create this DataSource:

Create a file (named ws-juddi-datasource.properties for example) and fill it in according to the database you use.

###################### MySQL DataSource configuration example
# datasource.name is the jndi-name set in jonas-web.xml
datasource.name           jdbc/juddiDB
# datasource.url is the URL where the database can be accessed
datasource.url            jdbc:mysql://localhost/db_juddi
# datasource.classname is the JDBC Driver classname
datasource.classname      com.mysql.Driver
# Set the DB username and password here
datasource.username       XXX
datasource.password       XXX
# available values:
#  rdb,rdb.postgres,rdb.oracle,rdb.oracle8,rdb.mckoi,rdb.mysql
datasource.mapper         rdb.mysql
# Add the datasource properties filename 
# (without the suffix .properties)
# in ($JONAS_BASE|$JONAS_ROOT)/conf/jonas.properties
jonas.service.dbm.datasources <datasource-filename>

31.4.4. Deploy and Test jUDDI

Deploy jUDDI on JOnAS with a command similar to the following:

$ jonas admin -a ~/juddi/juddi.war

You should see the following output:

11:53:57,984 : RegistryServlet.init : jUDDI Starting: 
   Initializing resources and subsystems.
11:53:58,282 : AbsJWebContainerServiceImpl.registerWar : War 
/home/sauthieg/sandboxes/ws-projects/ws-juddi/build/juddi.war 
   available at the context /juddi.

Open your web browser and go to the URL http://localhost:9000/juddi/happyjuddi.jsp to confirm that the juddi setup is successful.

If the URL opens, you can access your UDDI server through any UDDIv2.0 compliant browser.