Ozone 1.1

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » Ozone 1.1 
Ozone
License:
URL:http://www.ozone-db.org/
Description:The Ozone Database Project is an open source, Java based, object-oriented database management system.
Package NameComment
cli
com.nwalsh.saxon Norman Walsh's Saxon Extensions Package

Norman Walsh's Saxon Extensions Package for Saxon 6.*

This package implements Saxon extensions for XSLT.

Copyright (C) 2000 Norman Walsh

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

Except as contained in this notice, the names of individuals credited with contribution to this software shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the individuals in question.

Anything derived from this Software that is publically distributed will be identified with a different name and the version strings in any derived Software will be changed so that no possibility of confusion between the derived package and this Software will exist.

Warranty

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

com.nwalsh.xalan Norman Walsh's Xalan Extensions Package

Norman Walsh's Xalan Extensions Package for Xalan2

This package implements Xalan extensions for XSLT.

Copyright (C) 2000 Norman Walsh

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

Except as contained in this notice, the names of individuals credited with contribution to this software shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the individuals in question.

Anything derived from this Software that is publically distributed will be identified with a different name and the version strings in any derived Software will be changed so that no possibility of confusion between the derived package and this Software will exist.

Warranty

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

db
janalyzer
org.infozone.tools
org.infozone.tools.ant
org.infozone.tools.janalyzer
org.infozone.tools.logger
org.infozone.tools.xml.queries
org.infozone.tools.xml.queries.test
org.infozone.tools.xml.queries.xalan
org.infozone.tools.xml.queries.xt
org.odmg Provides interfaces and definitions of the ODMG 3.0 object database API. ozone implements a subset of this API. See {@link org.ozoneDB.odmg} for more details about the ozone implementation.
org.ozoneDB Provides the classes and interfaces of the native ozone API. The most important interfaces and classes are {@link org.ozoneDB.OzoneInterface}, which is the basic ozone API; and {@link org.ozoneDB.OzoneCompatible} / {@link org.ozoneDB.OzoneObject}, which are the base interface and a base class of all database objects.

Package Specification

Several implementations of OzoneInterface

Several classes implement the {@link OzoneInterface} interface. There are two situations where the programmer has to use this interface. Firstly, in the client to directly access database function such as {@link org.ozoneDB.OzoneInterface#createObject}. Secondly, inside the code of database classes (classes that are derived from {@link org.ozoneDB.OzoneCompatible}).

{@link Database} is the implementation of {@link OzoneInterface} that database objects obtain from their {@link org.ozoneDB.OzoneCompatible#database} method. The programmer should never need to create instances of this class.

All other implementations of {@link OzoneInterface} are derived from {@link org.ozoneDB.ExternalDatabase}. They can be used by the programmer to access a database from the client. The different classes provide different access modes to a database server but implement exactly the same interface. So in most cases the same code (except for the initialization of the database object) runs with different types of database.

{@link org.ozoneDB.RemoteDatabase} is used to access a remote database server over a socket connection. The server may reside on the same or a remote host.

{@link org.ozoneDB.LocalDatabase} is used to access a database server that resides in the same JVM as the client. Of course this does not allow multiple clients to access the server but it is faster and smaller.

{@link org.ozoneDB.ClientCacheDatabase} Maybe a cool thing that is not yet ready to be used and not yet documented.

Proxy objects

A Proxy object represents an actual database object inside client applications and inside other database objects. A proxy object can be seen as a persistent reference.

Proxy classes are generated out of the database classes. Database objects are persistent objects that run inside the server. All database classes implements the {@link org.ozoneDB.OzoneCompatible} interface. Database classes are by convention named *Impl. An external interface which extends {@link org.ozoneDB.OzoneRemote} describes the public interface of each database object. The Ozone Post Processor (OPP) tool generates the proxies out of the database classes. Proxy classes are named *Impl_Proxy.

Both database objects and proxies implement the public interface of the database object. All ozone API methods return proxies for the actual database object inside the database. So the client only deals with proxies. However the proxies provide the same interface and can be used as if they were the actual database objects.

Server side logic

ozone follows the OO paradigm that data and the corresponding operations together are objects. ozone does not only store the data of the objects but also provides an runtime environment to actually execute the methods of the database object. After invoking a method on a proxy object the parameters are marshalled and sent to the server where the corresponding method of the actual database object is invoked.

Of course, this is a time consuming operation. But in most cases this has to be done only once per 'business method' or 'business transaction'. An example: There are two business objects: UserManager and User which we want to make persistent. The UserManager holds the Users in a hashmap with the usernames as keys. Both classes, UserManager and User, have to be database objects. UserManager provides a method addUser(Name, Age, whatever) which creates a new user, fills the new object with the specified data and put it in the hashmap. Filling the User object with the data may result in many method calls. Since the User is a database object the UserManager only deals with proxies of the User database objects. So the method calls are handled via proxy objects. However, the UserManager itself is a database object and invoking a proxy from another database object (from inside the server) is much (around 1000 times) faster than invoking a database object from outside the server. Therefore it is very important to keep the ozone architecture in mind when designing and implementing an ozone application!

Transactions

By default, each client side invocation of a proxy method creates a new transaction. This transaction is implicitely aborted if the method throws an exception and commited otherwise. In the above UserManager example this is exactly what we need. Creating the new User object, filling it with data and storing it in the hashmap should run in one transaction. So the example runs as fast as possible and is transactionally correct. Or better: it runs fast because it is transactionally correct!

This means, if possible, do not use explicit transaction demarcation. This will force you to put the code that should run inside one transaction, inside one database object method, which leads to good performance!

org.ozoneDB.blob Provides classes and interfaces of the ozone BLOB sub-system. This package allows you to handle Binary Large Objects (BLOBS) in ozone. BLOBs are raw streams of data. They can be used to store images or sound or any other unstructured data in ozone. See samples/BLOB for a sample usage of the BLOB API.
org.ozoneDB.core
org.ozoneDB.core.admin
org.ozoneDB.core.classicStore
org.ozoneDB.core.DbRemote
org.ozoneDB.core.dr
org.ozoneDB.core.monitor
org.ozoneDB.core.test
org.ozoneDB.core.wizardStore
org.ozoneDB.core.xml
org.ozoneDB.data
org.ozoneDB.DxLib
org.ozoneDB.DxLib.net
org.ozoneDB.DxLib.test
org.ozoneDB.io.stream
org.ozoneDB.odmg Provides the ODMG 3.0 API ({@link org.odmg}) of ozone. In fact, this is an ODMG-like interface that tries to follow the ODMG design as far as possible. However, some of the assumptions of ODMG are simply not true for ozone. Especially the {@link org.odmg.Database#makePersistent} method cannot be implemented on top of ozone. This is due the use of proxy objects in ozone. ODMG ist not aware of such an architecture and it does not support it. Also the need to subclass database classes from {@link OzoneObject} or implement the {@link OzoneCompatible} interface is not ODMG compliant.

In other words: It is not possible to use ozone as an out-of-the-box replacement for another ODMG database without code changes. (I'm in doubt if this is possible with any combination of different ODMG implementations) But you will find the ODMG object and programming model in the ozone ODMG interface, which makes it easier to start with ozone if you are familiar with ODMG.

If you really need to keep your client code independent of ozone, we suggest to make a wrapper that hides the actual ODMG implementation classes from the client code. This wrapper should provide an explicit notion for creating objects, like the {@link OzoneODMGDatabase}. The database dependent implementation of the wrapper can decide how to actual create objects and handle other database specific things.

See also the samples included in the ozone distribution to learn how to program against the ozone ODMG API.

ODMG collections

The ozone implementations of the ODMG colllections are simple wrapper to the Java2 collections yet. That means each collection is stored as one database object. This architecture does not scale well. Future implementation have to improve this by distributing one collection over several database objects if necessery.
org.ozoneDB.test

This package provide the JUnit test framework for Ozone. This version is compatible with JUnit 3.6.

Important Classes

OzoneTestCase

OzoneTestCase is the base for all Ozone TestCase. It includes access to the database setup by the TestRunner.

The following is an example for to write a OzoneTestCase.

packge com.foo;

import junit.framework.*;
import org.ozoneDB.test.OzoneTestCase;
import org.ozoneDB.test.simple.*;

package FooTestCase extends OzoneTestCase {

  public static Test suite() {
    TestSuite suite = new TestSuite();
    suite.addTestSuite(FooTestCase.class);
    return suite;
  }

  public void testCreate() {
    // db() provide the access to database setup by TestRunner
    Auto auto = (Auto)db().createObject(AutoImpl.class.getName()); 
    assertNotNull(auto);
    // Test away!!!
  }
}

OzoneTestRunner

Once you have the TestCase written, you will want to run the Test. OzoneTestRunner provides the environment to run Unit Test for Ozone.

Usage: ojvm org.ozoneDB.test.OzoneTestRunner {-local | -remote [-host=HOST] [-port=PORT]} [-debug]
  • -local: use local database
  • -remote: use remote database
    • -host=HOST: the database server host
    • -port=PORT: the database server port
  • -debug: enable the debugging output

Note: The OzoneTestRunner's logging is control by Log4J. You can use the log4j in your TestCase.

Reference:

org.ozoneDB.test.args
org.ozoneDB.test.deadlocks
org.ozoneDB.test.multiple_access
org.ozoneDB.test.simple
org.ozoneDB.test.tx
org.ozoneDB.tools
org.ozoneDB.tools.OPP
org.ozoneDB.util
org.ozoneDB.xa Provides classes that allow ozone to be used together with an JTA transaction manager in an application server environment.

Package Specification

org.ozoneDB.xml Provides classes and interfaces that allow to use ozone as a XML document repository. Basically ozone/XML consists of a persistent DOM implementation ({@link org.ozoneDB.xml.dom}) and an API ({@link org.ozoneDB.xml.util}) that allows to store/retrieve/query XML via DOM, SAX and XPath. See the XML samples for a quick overview of the possibilities of ozone/XML.
org.ozoneDB.xml.cli
org.ozoneDB.xml.cli.resources
org.ozoneDB.xml.cli.services
org.ozoneDB.xml.core
org.ozoneDB.xml.dom
org.ozoneDB.xml.dom.html
org.ozoneDB.xml.dom.iterator
org.ozoneDB.xml.util This module provides the API. that allows to use ozone as a XML repository. Central part of this API is {@link org.ozoneDB.xml.util.XMLContainer}. This class encapsulates an XML document stored in the database. See the XML sample to get started with ozone/XML.
org.xmldb.api
org.xmldb.api.base
org.xmldb.api.modules
test.odmg
test.openxml
test.xmldb
test.xmldb.levelzero
test.xmldb.other
web
webapp
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.