Complete this
task to use an Apache Derby database as the
database store for your UDDI registry. You can use an embedded or
network Apache Derby database, and the database store can be local
or remote.
Before you begin
The following steps use a number of variables. Before you
start, decide appropriate values to use for these variables. The variables,
and suggested values, are:
- arg1
- The path of the SQL files. On a standard installation, the path
is app_server_root/UDDIReg/databasescripts.
- arg2
- The path to
the location where you want to install the Apache
Derby database.
![[AIX Solaris HP-UX Linux Windows]](../images/dist.gif)
For example, app_server_root/profiles/profile_name/databases/com.ibm.uddi.
For example, profile_root/databases/com.ibm.uddi.
- arg3
- The name of
the Apache Derby database. A recommended value is
UDDI30, and this name is assumed throughout the UDDI information.
If you use another name, substitute that name when UDDI30 is used
in the UDDI information.
- arg4
- An optional argument. Either use the value DEFAULT, or omit this
argument. Specify DEFAULT to use the database as a default UDDI node.
This argument is case sensitive.
If
you want to create a
remote database, refer first to the database product documentation
about the relevant capabilities of the product.
About this task
You complete this task only once for each UDDI registry,
as part of setting up and deploying a UDDI registry.
Procedure
Start a Qshell session. Enter
the STRQSH command
from the IBM® i command line.
- Create a UDDI Apache Derby database by using UDDIDerbyCreate.jar. Run the following Java -jar command
from the app_server_root/UDDIReg/databaseScripts
directory.
java -Djava.ext.dirs=app_server_root/derby/lib;app_server_root/java/jre/lib/ext -jar UDDIDerbyCreate.jar
arg1 arg2 arg3 arg4
![[AIX]](../images/aixlogo.gif)
![[Linux]](../images/linux.gif)
![[HP-UX]](../images/hpux.gif)
![[Solaris]](../images/solaris.gif)
![[AIX HP-UX Solaris]](../images/unix.gif)
![[z/OS]](../images/ngzos.gif)
java -Djava.ext.dirs=app_server_root/derby/lib:app_server_root/java/jre/lib/ext -jar UDDIDerbyCreate.jar
arg1 arg2 arg3 arg4
If the Apache Derby database already exists,
you are asked if you want to re-create it. If you choose to re-create
the database, the existing database is deleted and a new one is created
in its place. If you choose not to re-create the database, the command
exits and a new database is not created.
Note: If the application server
has already accessed the existing Apache Derby database, the uddiDeploy.jacl
script cannot re-create the database. Use the uddiRemove.jacl script
to remove the database, as described in the topic about removing a
UDDI registry node, restart the server, and run the uddiDeploy.jacl
script again.
Ensure
that the database has the correct
permissions to allow WebSphere® Application
Server to access it. Run the following command: chmod -R 777 arg2/arg3
where arg2 and arg3 are
the path and name of the Apache Derby database, as described previously.
- If you are using a remote database, which requires
network
Apache Derby, or if you want to use network Apache Derby for other
reasons, for example, to use Apache Derby with a cluster, configure
the Apache Derby Network Server framework. For details, see the section
about managing the Derby Network Server in the Derby Server and Administration
Guide.
What to do next
Continue with setting up and
deploying your UDDI registry
node.