Developer Guide
This is the quick introduction to the OpenUDDI Server.
The server is built on Axis 1.4. The domain model consists of auto generated types from the UDDI WSDL files.
SETTING UP AND BUILDING
The project is an Eclipse project, and can be imported directly in Eclipse. After the first import, there will be build path errors. These are fixed by running
> ant gwtgenerate compile
This generates GWT types and creates the missing source folders.
To deploy the server directly to Tomcat, set deploy.root in a new build.properties file. The value should point to the context dir in webapps:
deploy.root=/pack/jakarta-tomcat/webapps/uddi
Further, edit src/hibernate.cfg.xml to set the correct database parameters. The server can then be deployed using
> ant gwtgenerate gwtcompile deploy
The gwt-tasks are only necessary the first time and after the admin console has been changed. The first time, you should also run
> ant schemaexport
This will generate the schema in the selected database. The database itself must be created manually.
Other useful ant tasks:
- schemaexport: Drops the current tables from the database and recreates them using the current mapping
- build-war: Create a war file for deployment
- create-install: Creates an install distributable
CODE STRUCTURE
The server consists of two main parts: The core server and an admin console. The admin console is based on GWT, and consists of a number of generated classes. The server core is pure Java, the newer parts written in Java5.
The main entry class in the core is com.novell.uddi3.Repository. This acts as a facade into the system. Therepository uses a com.novell.uddi3.storage.Storage object for accessing the data. This is a simple interfacefor retrieving and saving data. The interface is modelledafter LDAP, and has some limitations because of this.
The UDDI services are exposed using Axis. The interfaces are auto-generated, and the actual endpoints are implemented in the package com.novell.uddi3.binding. Most of the logic in these classes consists of handlingtransactions and delegating to Repository.
The admin interface and code structure is documented in doc/Server-administration.
SERVER STARTUP
When the server boots, some resources need to be configured. This happens in a ServletContextListener, com.novell.uddi3.ServerInitialization.
This class makes sure the storage is configured, that canonical models areloaded, and that singletons are instantiated.
CONFIGURATION
Server configuration happens a number of places:
- src/configuration.properties - This file contains unmodifiable parameters, which are required for the server to boot. These parameters should never be changed after the server is installed.
- src/jaas.properties - Authentication configuration. By default, users are contained in the storage itself, but the server supports other mechanisms via the JAAS api.
- src/hibernate.cfg.xml - If the Hibernate storage implementation is used, this file contains connection parameters for the database.
- Runtime configuration. This is stored in the storage object, and can be changed using the admin console. Changes takes effect immediately, and are saved in storage.
- src/log4j.properties - Logging configuration.
INSTALLER
An installation bundle can be created by executing
> ant create-install
This created a tar.gz file, which can be distributed. The file contains a base WAR file and some configuration templates. The installation process is documented in doc/Installation.odt.
The installer is an Ant-based script. When executed, the user is prompted for relevant configuration parameters. The parameters are applied to the template files, which are then added to the base WAR file. The WAR file can then be deployed to a normal application server.
UNIT TESTS
The server should have reasonable junit test coverage. Some tests require a running database in order to be executed correctly. In Eclipse, tests can be executed by right-clicking on the test-folder and
selecting Run As -> JUnit Test.