Red Hat Application Server: JOnAS User Guide | ||
---|---|---|
Prev | Chapter 31. How to Install a jUDDI Server on JOnAS | Next |
jUDDI needs a minimum of configuration steps in order to be successfuly deployed inside JOnAS.
Note | |
---|---|
The first step can be ignored if you use the JOnAS-provided juddi.war. |
Go to the directory where the jUDDI sources are located (JUDDI_HOME).
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 |
Launch the compilation with Ant WAR. This produces a juddi.war inside the JUDDI_HOME/build/ directory.
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.
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:
MySQL
0.8 : juddi_mysql.sql
0.9rc1 : create_database.sql insert_publishers.sql
DB2
0.8 : juddi_db2.sql
0.9rc1 : create_database.sql insert_publishers.sql
HSQL
0.8 : juddi_hsql.sql
0.9rc1 : create_database.sql insert_publishers.sql
Sybase
0.8 : juddi_ase.sql
0.9rc1 : create_database.sql insert_publishers.sql
PostgreSQL
0.8 : juddi_postgresql.sql
0.9rc1 : create_database.sql insert_publishers.sql
Oracle
0.8 : juddi_oracle.sql
0.9rc1 : create_database.sql insert_publishers.sql
TotalXML
0.8 : juddi_totalxml.sql
0.9rc1 : create_database.sql insert_publishers.sql
JDataStore
0.8 : juddi_jds.sql
0.9rc1 : create_database.sql insert_publishers.sql
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).
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> |
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.
inquiryURL = http://localhost:9000/juddi/inquiry
publishURL = http://localhost:9000/juddi/publish