[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fwd: Update on Ozone's library...]



It seems that the dev list is like of quiet.


Hi,

  Some of the library we used are newer than the default one in Ozone
(0.6.1). The following is a list.

1. Castor. We currently using Castor 0.9. The schema for OPP has been
update.

org/ozoneDB/tools/OPP/OzoneClassDescriptor.xsd

  The schema need to be rewrite to latest schema
http://www.w3.org/2000/10/XMLSchema.

2. JUnit. We are using 3.5. A couple package path has to be change.

  org/ozoneDB/core/test/LockTest.java needs to be updated.

3. Ant. We are using 1.3. One major change is that the multiple
assignment to the same property will be ignored. Ozone's build depends
on this a lot to construct variable. It needs updated as well.

  We have the update for building Ozone itself. However, this current
fails in building the sample.

The first two are attached in this message. I will post the build.xml
once the samples building problem is resolved.

Also, I'd like to suggest putting the version number of the included
jars. It makes it easier to integrate.

Thanks.

David Li
DigitalSesame
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema">

    <xsd:element name="OzoneClassDescriptor">
        <xsd:complexType>
	  <xsd:sequence>
            <xsd:element ref="name" minOccurs="1" maxOccurs="1"/>
            <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
            <xsd:element ref="package" minOccurs="0" maxOccurs="1"/>
            <xsd:element ref="superclass" minOccurs="0" maxOccurs="1"/>
            <xsd:element ref="interface" minOccurs="0" maxOccurs="1000"/>
            <xsd:element ref="constructors" minOccurs="1" maxOccurs="1"/>
            <xsd:element ref="methods" minOccurs="1" maxOccurs="1"/>
	  </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="constructors">
        <xsd:complexType>
	  <xsd:sequence>
            <xsd:element ref="publicConstructor" minOccurs="1" maxOccurs="1000"/>
	  </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="methods">
        <xsd:complexType>
	  <xsd:sequence>
            <xsd:element ref="publicMethod" minOccurs="1" maxOccurs="1000"/>
	  </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
        
    <xsd:element name="publicConstructor">
        <xsd:complexType>
	  <xsd:sequence>
            <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
            <xsd:element ref="parameter" minOccurs="0" maxOccurs="1000"/>
	  </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
    
    <xsd:element name="publicMethod">
        <xsd:complexType>
	  <xsd:sequence>
            <xsd:element ref="description" minOccurs="0" maxOccurs="1"/>
            <xsd:element ref="name" minOccurs="1" maxOccurs="1"/>
            <xsd:element ref="parameter" minOccurs="0" maxOccurs="1000"/>
            <xsd:element ref="locklevel" minOccurs="1" maxOccurs="1"/>
	  </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="parameter" type="string"/>

    <xsd:element name="name" type="string"/>

    <xsd:element name="locklevel" type="string"/>

    <xsd:element name="description" type="string"/>

    <xsd:element name="package" type="string"/>

    <xsd:element name="superclass" type="string"/>

    <xsd:element name="interface" type="string"/>

</xsd:schema>

// You can redistribute this software and/or modify it under the terms of
// the Ozone Core License version 1 published by ozone-db.org.
//
// The original code and portions created by SMB are
// Copyright (C) 1997-2000 by SMB GmbH. All rights reserved.
//
// $Id: LockTest.java,v 1.6 2000/10/28 16:55:18 daniela Exp $

package org.ozoneDB.core.test;

import java.io.*;
import org.ozoneDB.*;
import org.ozoneDB.core.*;
import org.ozoneDB.tools.*;
import junit.framework.*;


/**
 * @author <a href="/ozone-users/03-2001/http://www.softwarebuero.de/">SMB</a>
 * @version $Revision: 1.6 $Date: 2000/10/28 16:55:18 $
 */
public class LockTest extends TestCase {
    
    protected LocalDatabase db;
    
    
    public LockTest( String name ) {
        super( name );
    }
    
    
    protected void setUp() {
        try {
            // System.out.println ("setUp(): ");
            
            new LocalDatabase().create( "/tmp/db" );
            db = (LocalDatabase)ExternalDatabase.openDatabase( "ozonedb:local://" + "/tmp/db" );
        } catch (Exception e) {
            e.printStackTrace();
            throw new RuntimeException( e.toString() );
        } 
    } 
    
    
    protected void tearDown() {
        try {
            // System.out.println ("tearDown(): ");
            db.close();
        } catch (Exception e) {
            e.printStackTrace();
            throw new RuntimeException( e.toString() );
        } 
    } 
    
    
    public void testExclusiveLock() throws Exception {
        User owner = db.theEnv.userManager.userForName( db.userName );
        Transaction ta1 = db.theEnv.transactionManager.newTransaction( owner );
        Transaction ta2 = db.theEnv.transactionManager.newTransaction( owner );
        Lock lock = new ExclusiveLock();
    
    //        assert (lock.tryAcquire (ta1, Lock.LEVEL_READ));
    //        assert (lock.tryAcquire (ta1, Lock.LEVEL_READ));
    //
    //        assert (!lock.tryAcquire (ta2, Lock.LEVEL_READ));
    } 
    
    
    public void testSharedLock() {
    } 
    
    
    public void testMROWLock() {
    } 
    
    
    public static Test suite() {
        TestSuite suite = new TestSuite();
        
        suite.addTest( new LockTest( "testExclusiveLock" ) );
        suite.addTest( new LockTest( "testSharedLock" ) );
        return suite;
    } 
    
    
    public static void main( String[] args ) {
        junit.textui.TestRunner.run( LockTest.suite() );
    } 
    
}