Copyright © 2002 SMB GmbH
Ozone Documentation License, Version 1
This document is free software; you can redistribute it and/or modify it provided that the terms of the GNU Library General Public License as published by the Free Software Foundation version 2 of the License; and the following terms are met.
The Ozone Database Project <ozone@ozone-db.org>
Included in the ozone distribution is code and documentation made available by other copyright holders and under different licenses. All these licenses allow worldwide, royalty free distribution, whether alone or as part of a larger product. License, copyright and disclaimer of this software is included in this directory.
The document is Copyright (C) 1997-2003 by SMB GmbH, Rohrteichstr. 18, 04347 Leipzig, Germany, All rights reserved.
You must give prominent notice with each copy of the work that the document is used in it and that its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License.
The name ozone must not be used to endorse or promote software products derived from this software without prior written permission of SMB.
Software products derived from this document may not be called ozone nor may ozone appear in their names without prior written permission of SMB.
This document is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
Table of Contents
Table of Contents
The 'ozoneAdmin' and 'ozoneInst' are the commands that assist in the administration of the Ozone database. They are 'ozoneAdmin' or 'ozoneAdmin.bat' and 'ozoneInst' or 'ozoneInst.bat' depending on if the system is Windows or Unix. Just running the 'ozoneAdmin' or 'ozoneInst' without any arguments will display a full list of options. Note that on Windows systems any -name=value must be in double quotes. For example 'ozoneAdmin "-dburl=ozonedb:remote://localhost:3333"'.
The command 'ozoneInst -dDirectory' will create a new empty ozone database. The database will be created in the specified directory.
To startup ozone use the command 'ozone -dDirectory -uUser'. This will display information about the running ozone database to the screen. Typing the letter 'q' followed by Enter will stop the database. The specified User will be created as a user if it has not already been created.
The command 'ozoneAdmin shutdown -dburl=URL' will shutdown a remote database. Note that on Windows systems the -dburl=URL must be in double quotes. The default if -dburl is not specified is '-dburl=ozonedb:remote://localhost:3333'.
When the database was first created, using the 'ozoneInst -dDirectory' command, a set of directories and files were created in specified directory. This represents all of the 'persistents' of any Ozone database. Making a copy of these files, while the database is not running, can be used to backup the database.
Be sure to backup any .java files that describe the classes that are within the Ozone database. If you get a mismatch between the .java files that make up the Ozone database and the Ozone database files, you might not be able to access the data.
To restore the database, just copy the directories and files back to their original place.
There is also the 'ozoneAdmin backup > filename' command that will backup a running Ozone database. The resulting file is an XML representation of the entire Ozone database. Again, remember to backup the .java files that make up the classes when doing a backup of the database.
To restore, use the 'ozoneAdmin restore < filename' command.
'ozoneAdmin newuser -name=USERNAME -id=ID' is the command that will add the new user USERNAME with the specified ID. The ID must be a number >= 100 since zero to 99 are reserved by Ozone. Initially, the newly created user will not exist in any groups. It is not a requirement that the user be part of any group.
'ozoneAdmin newgroup -name=GROUPNAME -id=ID' will create a new group with the specified GROUPNAME and ID. Note that the ID must be >= 100 since zero to 99 are reserved by Ozone. When a group is created it will not contain any users initially.
'ozoneAdmin user2group -username=USERNAME -groupname=GROUPNAME' will add the specified USERNAME to the specified GROUPNAME.
'ozoneAdmin allgroups' will list all groups that have been created as well as showing, by id, which users are in each group.
When the database is created, there will be an administrator user in the admin group. When the database is started with the -uUSER, then the specified USER will be created if it does not already exist.
By utilizing the org.ozoneDB.ExternalDatabase.openDatabase(URL) without the username or password specified will give access to the database under the administrator user and admin group.
The org.ozoneDB.ExternalDatabase.openDatabase(URL,user,password) must be used if the objects need to be segregated by user or group.
The password parameter in the openDatabase method does not seem to do anything. Any password can be used as long as the user name matches.
The access parameter in the ExternalDatabase.createObject method can be used to specify read or update access to the object created. The org.ozoneDB.OzoneInterface class has the access bits. These bits can be combined (or them together) to give additional access.
Access Bits
Some Definitions
Parameters are set by adding parameters to the 'OZONE_ARGS=' line in the ozoneEnv or ozoneEnv.bat file (depending on if you are on Windows or Unix).
There is a file that is created called 'config.properties'. This file contains all of the parameters that were used in the creation of the Ozone database. If any parameters are changed, this file is overwritten. There are some parameters (like clusterSize) that can be changed after the database has been created, but there are others (like compressClusters) that if changed will result in a database that will not startup properly.
The following is from the Ozone developers news group written by Falco as a description of the difference between the original Classic Store and the new Wizard Store.
In short: we started out with classic store where we tried to achieve maximum flexibility by serializing each object separately and storing those binary objects into clusters. This allowed us to build and rebuild clusters whenever needed. Later we focused on XML and tried to support this better. XML brings a lot of very small objects. They are highly connected and it is very likely that the access is very "local". And, many if not all of the objects have the same access rights. So we tried to support this in the wizard store. The wizard store serializes the entire cluster together which saves a lot of memory. And the wizard store is optimized for in-cluster object-to-object accesses, which is characteristic for XML data (DOM).