javawaveblogs-20

Thursday, August 2, 2007

STEPS TO CONFIGURE JUDDI + JBOSS AND MY SQL




UDDI needs persistent storage as mentioned in above section.

Here we use MySQL for persistents.

Step 1:

Download MySQL-5.0.26 and install MySQL.

Set the root password to "password".

Step 2:

Install Jboss application server.

Jboss version 4.0.5 is used here

Step 3:

MySQL driver installation:

Download the corresponding drivers from the Internet and

place it in \server\default\lib folder.
Driver used here is mysql-connector-java-5.0.4-bin.jar.


Step 4:


jUDDI Deployment:


Download JUDDI version 0.9rc4

Unzip the file to some folder, say JUDY.
There will be a folder inside the unzipped package named juddi.
This folder has the folder structure as of web applications.
Copy the folder and place it inside <JBOSS_HOME>\server\default\deploy.
Rename the folder to juddi.war.

Inside JUDY where we have unzipped juddi download
there is a folder called “sql”.
There we can find the sql scripts for many databases.
In that we do have sql script for creating juddi schema for MySQL.
Run that script in installed MySQL and create the database and the tables.

Create juddi.xml: Create a file named juddi.xml in the folder

<JBOSS_HOME>\server\default\conf and with in that copy and past the following code. The password in the following code should be set to the MySQL database password.

<? Xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application
6.0//EN"  "http://www.bea.com/servers/wls600/dtd/weblogic-web-jar.dtd">
<Context path="/juddi" docBase="juddi" debug="5" reloadable="true"
crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_juddiDB_log" suffix=".txt" timestamp="true"/>
<Resource name="jdbc/juddiDB" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000" username="juddi"
password="password" driverClassName="org.gjt.mm.mysql.Driver"
url="jdbc: mysql://localhost:3306/juddi?autoReconnect=true" />
</Context>

Edit juddi.properties file located at <JBOSS_HOME>\server\default\deploy\juddi.war\web-inf\juddi.properties. Match the email address used with in the insert-publisher.sql. This should match the domine name used for the email address with in JUDDI's insert-publisher.sql file

juddi.operatorEmailAddress = yourEmail@aDomain.com


Create juddi-da.xml and place it in <JBOSS_HOME>\server\default\deploy.
Copy the following code to it and save the file.


<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>juddiDB</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/juddi</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password>password</password>
<min-pool-size>1</min-pool-size>
<max-pool-size>50</max-pool-size>
</local-tx-datasource>
</datasources>



Edit juddi-user.xml file located at <JBOSS_HOME>\server\default\deploy\juddi.war\web-inf\juddi-user.xml and change the password for the user juddi to MySQL root password (i.e., password)

Run Jboss.
Enter the URL http://<hostname>:8080/juddi/.
We will get the juddi home page. Click on validate link.
If there are any errors found in the validation page, Please follow all the steps above and validate again.
If there are no errors then it means juddi is configured successfully.



Wednesday, August 1, 2007

Design patterns

Design patterns helps us solve the problem we face in designing the application. It gives us many possible ways to solve a problem during object-oriented design. We can call it as a repatable solution to a commonly occuring problem.

Design patterns are categorized to following 3 groups:
1. Creational
2. Structural and
3. Behavioral.

diggthis