avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory MemoryCatalog.java MemoryCatalogBase.java MemoryConnector.java MemoryIterator.java MemorySession.java MemorySessionPool.java PersistentObject.java PersistentObjectHome.java PersistentRef.java TransactionalMemorySession.java
Date Sat, 02 Feb 2002 10:29:55 GMT
mcconnell    02/02/02 02:29:55

  Modified:    apps/enterprise/pss .cvsignore
               apps/enterprise/pss/dist psdl-2.0.1.jar pss-2.0.1.jar
               apps/enterprise/pss/src/java/org/apache/pss Initializer.java
               apps/enterprise/pss/src/java/org/apache/pss/compiler/generator
                        psdlToJava.java
               apps/enterprise/pss/src/java/org/apache/pss/compiler/util
                        tools.java
               apps/enterprise/pss/src/java/org/apache/pss/connector/database
                        DatabaseConnector.java DatabaseResource.java
                        TransactionalDatabaseSession.java
               apps/enterprise/pss/src/java/org/apache/pss/connector/file
                        DataManager.java FileCatalog.java
                        FileCatalogBase.java FileConnector.java
                        FileIterator.java FileKeyEnumeration.java
                        FileResource.java FileSession.java
                        FileSessionManager.java FileSessionPool.java
                        PersistentObject.java PersistentRef.java
                        TransactionalDataManager.java
                        TransactionalDataManagerSerializable.java
                        TransactionalFileSession.java
               apps/enterprise/pss/src/java/org/apache/pss/connector/memory
                        MemoryCatalog.java MemoryCatalogBase.java
                        MemoryConnector.java MemoryIterator.java
                        MemorySession.java MemorySessionPool.java
                        PersistentObject.java PersistentObjectHome.java
                        PersistentRef.java TransactionalMemorySession.java
  Log:
  updated javadoc and code enhancements
  
  Revision  Changes    Path
  1.2       +1 -1      jakarta-avalon-cornerstone/apps/enterprise/pss/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/.cvsignore,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- .cvsignore	1 Feb 2002 22:35:10 -0000	1.1
  +++ .cvsignore	2 Feb 2002 10:29:53 -0000	1.2
  @@ -1,3 +1,3 @@
   build
  -dist
   local.properties
  +dist
  
  
  
  1.2       +68 -78    jakarta-avalon-cornerstone/apps/enterprise/pss/dist/psdl-2.0.1.jar
  
  	<<Binary file>>
  
  
  1.3       +208 -195  jakarta-avalon-cornerstone/apps/enterprise/pss/dist/pss-2.0.1.jar
  
  	<<Binary file>>
  
  
  1.4       +1 -1      jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/Initializer.java
  
  Index: Initializer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/Initializer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Initializer.java	2 Feb 2002 01:19:56 -0000	1.3
  +++ Initializer.java	2 Feb 2002 10:29:54 -0000	1.4
  @@ -103,7 +103,7 @@
       /**
        * Registers inital references to the file, database and memory connectors.
        * Connectors are accessible to users through the resolve_inital_references
  -     * operation using the "PSS:OSM:xxx" where "xxx" many be one of "file", 
  +     * operation using the "PSS:APACHE:xxx" where "xxx" many be one of "file", 
        * "database" or "memory".  Clients should narrow the returned instance to 
        * Connector using ConnectorHelper.narrow.
        * @param orbinitinfo 
  
  
  
  1.3       +175 -218  jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/compiler/generator/psdlToJava.java
  
  Index: psdlToJava.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/compiler/generator/psdlToJava.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- psdlToJava.java	2 Feb 2002 01:19:57 -0000	1.2
  +++ psdlToJava.java	2 Feb 2002 10:29:54 -0000	1.3
  @@ -10,11 +10,13 @@
   
   import java.io.*;
   import org.openorb.compiler.IdlCompiler;
  +import org.openorb.compiler.parser.IdlType;
   import org.openorb.compiler.generator.IdlToJava;
   import org.openorb.compiler.object.*;
   import org.apache.pss.compiler.PsdlCompiler;
   import org.apache.pss.compiler.object.*;
   import org.apache.pss.compiler.reflect.*;
  +import org.apache.pss.compiler.parser.PsdlType;
   import org.apache.pss.wrapper.DatabaseWrapper;
   import org.apache.pss.wrapper.FileWrapper;
   import org.apache.pss.wrapper.MemoryWrapper;
  @@ -75,8 +77,8 @@
       {
           switch ( idlobject.kind() )
           {
  -            case 201:
  -            case 206:
  +            case PsdlType.e_state :
  +            case PsdlType.e_local_op:
                   for ( int i = 0; i < s.length(); i++ )
                   {
                       if ( s.charAt( i ) == '\n' )
  @@ -115,8 +117,8 @@
       {
           switch ( idlobject.kind() )
           {
  -            case 201:
  -            case 206:
  +            case PsdlType.e_state :
  +            case PsdlType.e_local_op :
                   IdlComment idlcomment = idlobject.getComment();
                   Object obj = null;
                   if ( idlcomment != null )
  @@ -134,17 +136,17 @@
                           {
                               default:
                                   break;
  -                            case 0:
  -                                // '\0'
  -                                if ( idlobject.kind() == 17 || idlobject.kind() == 16 )
  +                            case IdlCommentField._author_field:
  +                                if ( idlobject.kind() == IdlType.e_attribute  
  +                                  || idlobject.kind() == IdlType.e_operation )
                                   {
                                       printwriter.print( "    " );
                                   }
                                   printwriter.print( " * @author " );
                                   break;
  -                            case 6:
  -                                // '\006'
  -                                if ( idlobject.kind() == 17 || idlobject.kind() == 16 )
  +                            case IdlCommentField._deprecated_field :
  +                                if ( idlobject.kind() == IdlType.e_attribute 
  +                                  || idlobject.kind() == IdlType.e_operation )
                                   {
                                       printwriter.print( "    " );
                                   }
  @@ -152,47 +154,48 @@
                                   break;
                               case 1:
                                   // '\001'
  -                                if ( idlobject.kind() == 17 || idlobject.kind() == 16 )
  +                                if ( idlobject.kind() == IdlType.e_attribute 
  +                                   || idlobject.kind() == IdlType.e_operation )
                                   {
                                       printwriter.print( "    " );
                                   }
                                   printwriter.print( " * @exception " );
                                   break;
  -                            case 4:
  -                                // '\004'
  -                                if ( idlobject.kind() == 17 || idlobject.kind() == 16 )
  +                            case IdlCommentField._return_field:
  +                                if ( idlobject.kind() == IdlType.e_attribute 
  +                                   || idlobject.kind() == IdlType.e_operation )
                                   {
                                       printwriter.print( "    " );
                                   }
                                   printwriter.print( " * @return " );
                                   break;
  -                            case 3:
  -                                // '\003'
  -                                if ( idlobject.kind() == 17 || idlobject.kind() == 16 )
  +                            case IdlCommentField._param_field:
  +                                if ( idlobject.kind() == IdlType.e_attribute 
  +                                   || idlobject.kind() == IdlType.e_operation )
                                   {
                                       printwriter.print( "    " );
                                   }
                                   printwriter.print( " * @param " );
                                   break;
  -                            case 5:
  -                                // '\005'
  -                                if ( idlobject.kind() == 17 || idlobject.kind() == 16 )
  +                            case IdlCommentField._see_field:
  +                                if ( idlobject.kind() == IdlType.e_attribute 
  +                                   || idlobject.kind() == IdlType.e_operation )
                                   {
                                       printwriter.print( "    " );
                                   }
                                   printwriter.print( " * @see " );
                                   break;
  -                            case 2:
  -                                // '\002'
  -                                if ( idlobject.kind() == 17 || idlobject.kind() == 16 )
  +                            case IdlCommentField._version_field:
  +                                if ( idlobject.kind() == IdlType.e_attribute 
  +                                   || idlobject.kind() == IdlType.e_operation )
                                   {
                                       printwriter.print( "    " );
                                   }
                                   printwriter.print( " * @version " );
                                   break;
  -                            case 7:
  -                                // '\007'
  -                                if ( idlobject.kind() == 17 || idlobject.kind() == 16 )
  +                            case IdlCommentField._unknown_field:
  +                                if ( idlobject.kind() == IdlType.e_attribute 
  +                                   || idlobject.kind() == IdlType.e_operation )
                                   {
                                       printwriter.print( "    " );
                                   }
  @@ -394,14 +397,17 @@
           {
               switch ( psdlabstractstoragetype.current().kind() )
               {
  -                case 201:
  -                    translate_abstract_storagetype_local_op( ( PsdlLocalOp ) psdlabstractstoragetype.current(), printwriter );
  +                case PsdlType.e_local_op:
  +                    translate_abstract_storagetype_local_op( 
  +                      ( PsdlLocalOp ) psdlabstractstoragetype.current(), printwriter );
                       break;
  -                case 206:
  -                    translate_abstract_storagetype_state( ( PsdlState ) psdlabstractstoragetype.current(), printwriter );
  +                case PsdlType.e_state:
  +                    translate_abstract_storagetype_state( 
  +                      ( PsdlState ) psdlabstractstoragetype.current(), printwriter );
                       break;
                   default:
  -                    System.out.println( "warning number 1 : " + psdlabstractstoragetype.current().kind() );
  +                    System.out.println( "warning number 1 : " 
  +                     + psdlabstractstoragetype.current().kind() );
                       break;
               }
           }
  @@ -587,21 +593,26 @@
           }
           else
           {
  -            idlinterface.addInheritance( idlobject.returnVisibleObject( "CosPersistentState::StorageHomeBase", false ) );
  +            idlinterface.addInheritance( idlobject.returnVisibleObject( 
  +               "CosPersistentState::StorageHomeBase", false ) );
           }
           psdlabstractstoragehome.reset();
           for ( ; !psdlabstractstoragehome.end(); psdlabstractstoragehome.next() )
           {
               switch ( psdlabstractstoragehome.current().kind() )
               {
  -                case 201:
  +                case PsdlType.e_local_op :
                       idlinterface.addIdlObject( psdlabstractstoragehome.current() );
                       break;
  -                case 208:
  -                    translate_key_to_equivalent_operations( ( PsdlKey ) psdlabstractstoragehome.current(), idlinterface, psdlabstractstoragehome );
  +                case PsdlType.e_key:
  +                    translate_key_to_equivalent_operations( 
  +                      ( PsdlKey ) psdlabstractstoragehome.current(), idlinterface, 
  +                      psdlabstractstoragehome );
                       break;
  -                case 209:
  -                    translate_factory_to_equivalent_operations( ( PsdlFactory ) psdlabstractstoragehome.current(), idlinterface, psdlabstractstoragehome );
  +                case PsdlType.e_factory :
  +                    translate_factory_to_equivalent_operations( 
  +                      ( PsdlFactory ) psdlabstractstoragehome.current(), 
  +                      idlinterface, psdlabstractstoragehome );
                       break;
               }
           }
  @@ -628,19 +639,20 @@
                       printwriter.println( "" );
                   }
               }
  -            else
  -                    if ( !current_pkg.equals( "" ) )
  +            else 
               {
  -                printwriter.println( "package " + current_pkg + ";" );
  -                printwriter.println( "" );
  +                if ( !current_pkg.equals( "" ) )
  +                {
  +                    printwriter.println( "package " + current_pkg + ";" );
  +                    printwriter.println( "" );
  +                }
               }
           }
           switch ( idlobject.kind() )
           {
               default:
                   break;
  -            case 7:
  -                // '\007'
  +            case IdlType.e_const:
                   if ( idlobject.hasComment() )
                   {
                       javadoc( printwriter, idlobject );
  @@ -654,8 +666,7 @@
                       printwriter.println( "//" );
                   }
                   break;
  -            case 2:
  -                // '\002'
  +            case IdlType.e_enum:
                   if ( idlobject.hasComment() )
                   {
                       javadoc( printwriter, idlobject );
  @@ -669,7 +680,7 @@
                       printwriter.println( "//" );
                   }
                   break;
  -            case 3:
  +            case IdlType.e_struct:
                   // '\003'
                   if ( idlobject.hasComment() )
                   {
  @@ -684,8 +695,7 @@
                       printwriter.println( "//" );
                   }
                   break;
  -            case 4:
  -                // '\004'
  +            case IdlType.e_union :
                   if ( idlobject.hasComment() )
                   {
                       javadoc( printwriter, idlobject );
  @@ -699,8 +709,7 @@
                       printwriter.println( "//" );
                   }
                   break;
  -            case 14:
  -                // '\016'
  +            case IdlType.e_exception:
                   if ( idlobject.hasComment() )
                   {
                       javadoc( printwriter, idlobject );
  @@ -714,8 +723,7 @@
                       printwriter.println( "//" );
                   }
                   break;
  -            case 15:
  -                // '\017'
  +            case IdlType.e_interface:
                   if ( idlobject.hasComment() )
                   {
                       javadoc( printwriter, idlobject );
  @@ -729,8 +737,7 @@
                       printwriter.println( "//" );
                   }
                   break;
  -            case 27:
  -                // '\033'
  +            case IdlType.e_value_box:
                   if ( idlobject.hasComment() )
                   {
                       javadoc( printwriter, idlobject );
  @@ -744,8 +751,7 @@
                       printwriter.println( "//" );
                   }
                   break;
  -            case 28:
  -                // '\034'
  +            case IdlType.e_value:
                   if ( idlobject.hasComment() )
                   {
                       javadoc( printwriter, idlobject );
  @@ -759,7 +765,7 @@
                       printwriter.println( "//" );
                   }
                   break;
  -            case 204:
  +            case PsdlType.e_abstract_storagetype:
                   if ( idlobject.hasComment() )
                   {
                       javadoc( printwriter, idlobject );
  @@ -788,10 +794,10 @@
       {
           switch ( idlobject.kind() )
           {
  -            case 202:
  -            case 203:
  -            case 204:
  -            case 205:
  +            case PsdlType.e_abstract_storagetype_forward :
  +            case PsdlType.e_abstract_storagetype:
  +            case PsdlType.e_abstract_storagehome_forward :
  +            case PsdlType.e_abstract_storagehome:
                   if ( i == 0 )
                   {
                       printwriter.print( fullname( idlobject ) );
  @@ -801,7 +807,7 @@
                       printwriter.print( fullname( idlobject ) + "Holder" );
                   }
                   break;
  -            case 207:
  +            case PsdlType.e_abstract_storagetype_ref:
                   idlobject.reset();
                   if ( i == 0 )
                   {
  @@ -812,8 +818,7 @@
                       printwriter.print( fullname( idlobject.current() ) + "RefHolder" );
                   }
                   break;
  -            case 10:
  -                // '\n'
  +            case IdlType.e_ident:
                   translate_parameter( ( ( IdlIdent ) idlobject ).internalObject(), printwriter, i );
                   break;
               default:
  @@ -835,21 +840,20 @@
           idlobject.reset();
           switch ( idlobject.current().kind() )
           {
  -            case 202:
  -            case 203:
  -            case 204:
  -            case 205:
  -            case 210:
  -            case 212:
  -            case 213:
  +            case PsdlType.e_abstract_storagehome_forward :
  +            case PsdlType.e_abstract_storagehome:
  +            case PsdlType.e_abstract_storagetype :
  +            case PsdlType.e_abstract_storagetype_forward:
  +            case PsdlType.e_storagetype_forward:
  +            case PsdlType.e_storagetype :
  +            case PsdlType.e_storagehome:
                   break;
  -            case 217:
  +            case PsdlType.e_sequence_ref:
                   PrintWriter printwriter = newFile( file, idlobject.name() + "Holder" );
                   write_holder_for_sequence_ref( idlobject, printwriter );
                   printwriter.close();
                   break;
  -            case 24:
  -                // '\030'
  +            case IdlType.e_array:
                   idlobject.current().reset();
                   if ( isRefType( idlobject.current().current() ) )
                   {
  @@ -863,27 +867,22 @@
                   }
                   break;
               default:
  -                if ( idlobject.current().kind() == 10 )
  +                if ( idlobject.current().kind() == IdlType.e_ident )
                   {
                       IdlObject idlobject1 = ( ( IdlIdent ) idlobject.current() ).internalObject();
                       switch ( idlobject1.kind() )
                       {
  -                        case 206:
  -                        case 207:
  -                        case 208:
  -                        case 209:
  -                        case 211:
  +                        case PsdlType.e_abstract_storagehome_forward:
  +                        case PsdlType.e_abstract_storagehome:
  +                        case PsdlType.e_abstract_storagetype:
  +                        case PsdlType.e_abstract_storagetype_forward:
  +                        case PsdlType.e_storagetype_forward:
  +                        case PsdlType.e_storagetype:
  +                        case PsdlType.e_storagehome:
  +                            break;
                           default:
                               super.translate_typedef( idlobject, file );
                               break;
  -                        case 202:
  -                        case 203:
  -                        case 204:
  -                        case 205:
  -                        case 210:
  -                        case 212:
  -                        case 213:
  -                            break;
                       }
                   }
                   else
  @@ -901,42 +900,30 @@
        * @param idlobject 
        * @param printwriter 
        */
  -    public void translate_type( IdlObject idlobject, PrintWriter printwriter )
  +    public void translate_type( IdlObject obj, java.io.PrintWriter output )
       {
  -        switch ( idlobject.kind() )
  +        switch ( obj.kind() )
           {
  -            case 202:
  -            case 203:
  -            case 204:
  -            case 205:
  -                printwriter.print( fullname( idlobject ) );
  -                break;
  -            case 207:
  -                idlobject.reset();
  -                printwriter.print( fullname( idlobject.current() ) + "Ref" );
  -                break;
  -            case 217:
  -                idlobject.reset();
  -                idlobject.current().reset();
  -                printwriter.print( fullname( idlobject.current().current() ) + "Ref []" );
  -                break;
  -            case 206:
  -            case 208:
  -            case 209:
  -            case 210:
  -            case 211:
  -            case 212:
  -            case 213:
  -            case 214:
  -            case 215:
  -            case 216:
  -            default:
  -                super.translate_type( idlobject, printwriter );
  -                break;
  +          case PsdlType.e_abstract_storagetype_forward :
  +          case PsdlType.e_abstract_storagetype :
  +          case PsdlType.e_abstract_storagehome_forward :
  +          case PsdlType.e_abstract_storagehome :
  +            output.print( fullname( obj ) );
  +            break;
  +          case PsdlType.e_abstract_storagetype_ref :
  +            obj.reset();
  +            output.print( fullname( obj.current() ) + "Ref" );
  +            break;
  +          case PsdlType.e_sequence_ref :
  +            obj.reset();
  +            obj.current().reset();
  +            output.print( fullname( obj.current().current() ) + "Ref []" );
  +            break;
  +          default :
  +            super.translate_type( obj, output );
           }
       }
   
  -
       /**
        * Write a holder for an abstract_storagetype.
        *
  @@ -1143,7 +1130,7 @@
           }
           switch ( idlobject.kind() )
           {
  -            case 204:
  +            case PsdlType.e_abstract_storagetype:
                   PrintWriter printwriter2 = newFile( file, idlobject.name() + "Holder" );
                   write_holder_for_abstract_storagetype( idlobject, printwriter2 );
                   printwriter2.close();
  @@ -1154,7 +1141,7 @@
               default:
                   switch ( ref_type( idlobject ) )
                   {
  -                    case 217:
  +                    case PsdlType.e_sequence_ref:
                           PrintWriter printwriter3 = newFile( file, idlobject.name() + "Holder" );
                           write_holder_for_sequence_ref( idlobject, printwriter3 );
                           printwriter3.close();
  @@ -1199,47 +1186,37 @@
        * @param file 
        * @param i 
        */
  -    public void translate_object_content( IdlObject idlobject, File file, int i )
  +    public void translate_object_content( IdlObject idlobject, File file, int translateType )
       {
           switch ( idlobject.current().kind() )
           {
  -            case 203:
  -            case 205:
  -                break;
  -            case 204:
  -                if ( PsdlCompiler.generate_api && i == 0 )
  -                {
  -                    translate_abstract_storagetype( idlobject.current(), file );
  -                }
  -                break;
  -            case 202:
  -                if ( PsdlCompiler.generate_api && i == 0 )
  -                {
  -                    translate_abstract_storagehome( idlobject.current(), file );
  -                }
  -                break;
  -            case 212:
  -                if ( PsdlCompiler.generate_wrapper && i == 0 )
  -                {
  -                    wrap.map_storagetype( file, ( psdlStorageType ) idlobject.current() );
  -                }
  -                break;
  -            case 210:
  -                if ( PsdlCompiler.generate_wrapper && i == 0 )
  -                {
  -                    wrap.map_storagehome( file, ( psdlStorageHome ) idlobject.current() );
  -                }
  -                break;
  -            case 1:
  -                // '\001'
  -                super.translate_object_content( idlobject, file, i );
  -                break;
  -            default:
  -                if ( PsdlCompiler.generate_api )
  -                {
  -                    super.translate_object_content( idlobject, file, i );
  -                }
  -                break;
  +          case PsdlType.e_abstract_storagetype :
  +            if ( !PsdlCompiler.generate_api ) break;
  +            if ( translateType == 0 ) translate_abstract_storagetype( idlobject.current(), file );
  +            break;
  +          case PsdlType.e_abstract_storagetype_forward :
  +            break;
  +          case PsdlType.e_abstract_storagehome :
  +            if ( !PsdlCompiler.generate_api ) break;
  +            if ( translateType == 0 ) translate_abstract_storagehome( idlobject.current(), file );
  +            break;
  +          case PsdlType.e_abstract_storagehome_forward :
  +            break;
  +          case PsdlType.e_storagetype :
  +            if ( !PsdlCompiler.generate_wrapper ) break;
  +            if ( translateType == 0 ) wrap.map_storagetype( file, ( psdlStorageType ) idlobject.current() );
  +            break;
  +          case PsdlType.e_storagehome :
  +            if ( !PsdlCompiler.generate_wrapper ) break;
  +            if ( translateType == 0 ) wrap.map_storagehome( file, ( psdlStorageHome ) idlobject.current() );
  +            break;
  +          case PsdlType.e_module :
  +            super.translate_object_content( idlobject, file, translateType );
  +            break;
  +          default :
  +            if ( !PsdlCompiler.generate_api ) break;
  +            super.translate_object_content( idlobject, file, translateType );
  +            break;
           }
       }
   
  @@ -1260,7 +1237,8 @@
               if ( !idlobject.current().included() )
               {
                   String s = current_pkg;
  -                if ( IdlCompiler.usePrefix && idlobject.current().getPrefix() != null && idlobject.kind() == 0 )
  +                if ( IdlCompiler.usePrefix && idlobject.current().getPrefix() != null 
  +                  && idlobject.kind() == 0 )
                   {
                       if ( policy == 0 )
                       {
  @@ -1287,7 +1265,7 @@
        */
       protected boolean isRefType( IdlObject idlobject )
       {
  -        return final_kind( idlobject ) == 207;
  +        return final_kind( idlobject ) == PsdlType.e_abstract_storagetype_ref;
       }
   
   
  @@ -1312,17 +1290,12 @@
       {
           switch ( final_kind( idlobject ) )
           {
  -            case 5:
  -            // '\005'
  -            case 6:
  -            // '\006'
  -            case 8:
  -                // '\b'
  -                return true;
  -            case 7:
  -            // '\007'
  -            default:
  -                return false;
  +          case IdlType.e_simple :
  +          case IdlType.e_string :
  +          case IdlType.e_wstring :
  +            return true;
  +          default :
  +            return false;
           }
       }
   
  @@ -1376,25 +1349,22 @@
       {
           switch ( idlobject.kind() )
           {
  -            case 10:
  -                // '\n'
  -                return contains_ref( ( ( IdlIdent ) idlobject ).internalObject() );
  -            case 207:
  -            case 214:
  -            case 217:
  -                return true;
  -            case 9:
  -                // '    '
  -                idlobject.reset();
  -                return contains_ref( idlobject.current() );
  -            case 13:
  -                // '\r'
  -                return contains_ref( ( ( IdlTypeDef ) idlobject ).type() );
  +          case PsdlType.e_ident :
  +            return contains_ref( ( ( IdlIdent ) idlobject ).internalObject() );
  +          case PsdlType.e_sequence_ref :
  +          case PsdlType.e_ref_rep :
  +          case PsdlType.e_abstract_storagetype_ref :
  +            return true;
  +          case PsdlType.e_sequence :
  +            idlobject.reset();
  +            return contains_ref( idlobject.current() );
  +          case PsdlType.e_typedef :
  +            return contains_ref( ( ( IdlTypeDef ) idlobject ).type() );
  +          default :
  +            return false;
           }
  -        return false;
       }
   
  -
       /**
        * Test is the supplied object is an abstract storage type.
        *
  @@ -1405,17 +1375,14 @@
       {
           switch ( idlobject.kind() )
           {
  -            case 10:
  -                // '\n'
  +            case PsdlType.e_ident :
                   return contains_ast( ( ( IdlIdent ) idlobject ).internalObject() );
  -            case 204:
  +            case PsdlType.e_abstract_storagetype:
                   return true;
  -            case 9:
  -                // '    '
  +            case PsdlType.e_sequence:
                   idlobject.reset();
                   return contains_ast( idlobject.current() );
  -            case 13:
  -                // '\r'
  +            case PsdlType.e_typedef:
                   return contains_ast( ( ( IdlTypeDef ) idlobject ).type() );
           }
           return false;
  @@ -1432,19 +1399,12 @@
       {
           switch ( idlobject.kind() )
           {
  -            case 10:
  -                // '\n'
  +            case PsdlType.e_ident :
                   return contains_seq( ( ( IdlIdent ) idlobject ).internalObject() );
  -            case 9:
  -                // '    '
  +            case PsdlType.e_sequence:
                   return true;
  -            case 13:
  -                // '\r'
  +            case PsdlType.e_typedef:
                   return contains_seq( ( ( IdlTypeDef ) idlobject ).type() );
  -            case 11:
  -            // '\013'
  -            case 12:
  -            // '\f'
               default:
                   return false;
           }
  @@ -1461,26 +1421,23 @@
       {
           switch ( idlobject.kind() )
           {
  -            case 10:
  -                // '\n'
  +            case PsdlType.e_ident:
                   return ref_type( ( ( IdlIdent ) idlobject ).internalObject() );
  -            case 217:
  -                return 217;
  -            case 207:
  -                return 207;
  -            case 9:
  -                // '    '
  +            case PsdlType.e_sequence_ref :
  +                return PsdlType.e_sequence_ref ;
  +            case PsdlType.e_abstract_storagetype_ref:
  +                return PsdlType.e_abstract_storagetype_ref;
  +            case PsdlType.e_sequence:
                   idlobject.reset();
                   int i = ref_type( idlobject.current() );
                   switch ( i )
                   {
  -                    case 207:
  -                    case 217:
  -                        return 217;
  +                    case PsdlType.e_sequence_ref:
  +                    case PsdlType.e_abstract_storagetype_ref :
  +                        return PsdlType.e_sequence_ref;
                   }
                   return i;
  -            case 13:
  -                // '\r'
  +            case PsdlType.e_typedef:
                   return ref_type( ( ( IdlTypeDef ) idlobject ).type() );
           }
           return -1;
  
  
  
  1.3       +33 -30    jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/compiler/util/tools.java
  
  Index: tools.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/compiler/util/tools.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- tools.java	2 Feb 2002 01:19:58 -0000	1.2
  +++ tools.java	2 Feb 2002 10:29:54 -0000	1.3
  @@ -11,17 +11,20 @@
   import java.io.PrintWriter;
   import java.util.Enumeration;
   
  -import org.openorb.compiler.object.IdlObject;
  -import org.openorb.compiler.object.IdlComment;
  -import org.openorb.compiler.object.IdlCommentSection;
   import org.openorb.compiler.IdlCompiler;
   import org.openorb.compiler.idl.reflect.idlIdentifier;
   import org.openorb.compiler.idl.reflect.idlObject;
   import org.openorb.compiler.idl.reflect.idlSequence;
   import org.openorb.compiler.idl.reflect.idlTypeDef;
   import org.openorb.compiler.idl.reflect.idlType;
  +import org.openorb.compiler.object.IdlObject;
  +import org.openorb.compiler.object.IdlComment;
  +import org.openorb.compiler.object.IdlCommentSection;
  +import org.openorb.compiler.object.IdlCommentField;
  +import org.openorb.compiler.parser.IdlType;
   import org.openorb.compiler.parser.IdlParser;
   
  +import org.apache.pss.compiler.parser.PsdlType;
   import org.apache.pss.compiler.PsdlCompiler;
   import org.apache.pss.compiler.reflect.psdlRef;
   import org.apache.pss.compiler.reflect.psdlState;
  @@ -537,8 +540,8 @@
       {
           switch ( idlobject.kind() )
           {
  -            case 201:
  -            case 206:
  +            case PsdlType.e_state :
  +            case PsdlType.e_local_op:
                   for ( int i = 0; i < s.length(); i++ )
                   {
                       if ( s.charAt( i ) == '\n' )
  @@ -577,8 +580,8 @@
       {
           switch ( idlobject.kind() )
           {
  -            case 201:
  -            case 206:
  +            case PsdlType.e_state :
  +            case PsdlType.e_local_op :
                   IdlComment idlcomment = idlobject.getComment();
                   Object obj = null;
                   if ( idlcomment != null )
  @@ -596,17 +599,17 @@
                           {
                               default:
                                   break;
  -                            case 0:
  -                                // '\0'
  -                                if ( idlobject.kind() == 17 || idlobject.kind() == 16 )
  +                            case IdlCommentField._author_field:
  +                                if ( idlobject.kind() == IdlType.e_attribute  
  +                                  || idlobject.kind() == IdlType.e_operation )
                                   {
                                       printwriter.print( "    " );
                                   }
                                   printwriter.print( " * @author " );
                                   break;
  -                            case 6:
  -                                // '\006'
  -                                if ( idlobject.kind() == 17 || idlobject.kind() == 16 )
  +                            case IdlCommentField._deprecated_field :
  +                                if ( idlobject.kind() == IdlType.e_attribute 
  +                                  || idlobject.kind() == IdlType.e_operation )
                                   {
                                       printwriter.print( "    " );
                                   }
  @@ -614,48 +617,48 @@
                                   break;
                               case 1:
                                   // '\001'
  -                                if ( idlobject.kind() == 17 || idlobject.kind() == 16 )
  +                                if ( idlobject.kind() == IdlType.e_attribute 
  +                                   || idlobject.kind() == IdlType.e_operation )
                                   {
                                       printwriter.print( "    " );
                                   }
                                   printwriter.print( " * @exception " );
                                   break;
  -                            case 4:
  -                                // '\004'
  -                                if ( idlobject.kind() == 17 || idlobject.kind() == 16 )
  +                            case IdlCommentField._return_field:
  +                                if ( idlobject.kind() == IdlType.e_attribute 
  +                                   || idlobject.kind() == IdlType.e_operation )
                                   {
                                       printwriter.print( "    " );
                                   }
                                   printwriter.print( " * @return " );
  -
                                   break;
  -                            case 3:
  -                                // '\003'
  -                                if ( idlobject.kind() == 17 || idlobject.kind() == 16 )
  +                            case IdlCommentField._param_field:
  +                                if ( idlobject.kind() == IdlType.e_attribute 
  +                                   || idlobject.kind() == IdlType.e_operation )
                                   {
                                       printwriter.print( "    " );
                                   }
                                   printwriter.print( " * @param " );
                                   break;
  -                            case 5:
  -                                // '\005'
  -                                if ( idlobject.kind() == 17 || idlobject.kind() == 16 )
  +                            case IdlCommentField._see_field:
  +                                if ( idlobject.kind() == IdlType.e_attribute 
  +                                   || idlobject.kind() == IdlType.e_operation )
                                   {
                                       printwriter.print( "    " );
                                   }
                                   printwriter.print( " * @see " );
                                   break;
  -                            case 2:
  -                                // '\002'
  -                                if ( idlobject.kind() == 17 || idlobject.kind() == 16 )
  +                            case IdlCommentField._version_field:
  +                                if ( idlobject.kind() == IdlType.e_attribute 
  +                                   || idlobject.kind() == IdlType.e_operation )
                                   {
                                       printwriter.print( "    " );
                                   }
                                   printwriter.print( " * @version " );
                                   break;
  -                            case 7:
  -                                // '\007'
  -                                if ( idlobject.kind() == 17 || idlobject.kind() == 16 )
  +                            case IdlCommentField._unknown_field:
  +                                if ( idlobject.kind() == IdlType.e_attribute 
  +                                   || idlobject.kind() == IdlType.e_operation )
                                   {
                                       printwriter.print( "    " );
                                   }
  
  
  
  1.4       +3 -3      jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/database/DatabaseConnector.java
  
  Index: DatabaseConnector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/database/DatabaseConnector.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DatabaseConnector.java	2 Feb 2002 03:04:45 -0000	1.3
  +++ DatabaseConnector.java	2 Feb 2002 10:29:54 -0000	1.4
  @@ -23,6 +23,7 @@
   import org.omg.CORBA.PERSIST_STORE;
   import org.omg.CosPersistentState.*;
   import org.omg.CosTransactions.*;
  +import org.omg.CosTransactions.Status;
   import org.omg.PortableInterceptor.ORBInitInfo;
   import org.apache.pss.connector.PersistenceException;
   import org.apache.pss.connector.ConnectorBase;
  @@ -40,7 +41,7 @@
       // static
       //======================================================================
   
  -    public static final String IMPLEMENTATION_ID = "PSS:OSM:database";
  +    public static final String IMPLEMENTATION_ID = "PSS:APACHE:database";
     
       public static FlushManager manager;
   
  @@ -168,8 +169,7 @@
               Current current = CurrentHelper.narrow( obj );
               switch ( current.get_status().value() )
               {
  -                case 0:
  -                    // '\0'
  +                case Status._StatusActive:
                       Coordinator coordinator = current.get_control().get_coordinator();
                       TransactionalSession sessions[] = sessions( coordinator );
                       if ( sessions.length == 0 )
  
  
  
  1.4       +1 -1      jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/database/DatabaseResource.java
  
  Index: DatabaseResource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/database/DatabaseResource.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DatabaseResource.java	2 Feb 2002 03:04:45 -0000	1.3
  +++ DatabaseResource.java	2 Feb 2002 10:29:54 -0000	1.4
  @@ -20,7 +20,7 @@
   
   /**
    * Implementation of a simple two-phase-commit resource enabling invocation
  - * of 'end' under a transactional session.
  + * of <code>end</code> under a transactional session.
    */
   public class DatabaseResource extends ResourcePOA
   {
  
  
  
  1.4       +6 -3      jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/database/TransactionalDatabaseSession.java
  
  Index: TransactionalDatabaseSession.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/database/TransactionalDatabaseSession.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TransactionalDatabaseSession.java	2 Feb 2002 04:02:10 -0000	1.3
  +++ TransactionalDatabaseSession.java	2 Feb 2002 10:29:54 -0000	1.4
  @@ -4,6 +4,10 @@
    * Copyright: Copyright (C) The Apache Software Foundation. All rights reserved.
    * Copyright: OSM SARL 2001-2002, All Rights Reserved.
    * Copyright: 2000 (C) Intalio Inc. All Rights Reserved.
  + *
  + * Date        Author           Changes
  + * 03-JAN-02   McConnell, OSM   Clean-up of includes.
  + * 03-JAN-02   McConnell, OSM   Additional javadoc.
    */
   
   package org.apache.pss.connector.database;
  @@ -12,7 +16,6 @@
   import java.sql.SQLException;
   import java.util.Hashtable;
   
  -import org.omg.CORBA.*;
   import org.omg.CORBA.BAD_OPERATION;
   import org.omg.CORBA.INVALID_TRANSACTION;
   import org.omg.CORBA.PERSIST_STORE;
  @@ -131,7 +134,6 @@
   
       /**
        * Start a transactional session.
  -     *
        * @param coordinator 
        */
       public void start( org.omg.CosTransactions.Coordinator transaction )
  @@ -302,7 +304,8 @@
               org.omg.CORBA.Object obj = _info.resolve_initial_references( "RootPOA" );
               POA poa = POAHelper.narrow( obj );
               byte abyte0[] = poa.activate_object( databaseresource );
  -            org.omg.CosTransactions.Resource resource = ResourceHelper.narrow( poa.id_to_reference( abyte0 ) );
  +            org.omg.CosTransactions.Resource resource = ResourceHelper.narrow( 
  +              poa.id_to_reference( abyte0 ) );
               coordinator.register_resource( resource );
               _coordinator = coordinator;
           }
  
  
  
  1.4       +14 -17    jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/DataManager.java
  
  Index: DataManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/DataManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DataManager.java	2 Feb 2002 03:04:46 -0000	1.3
  +++ DataManager.java	2 Feb 2002 10:29:54 -0000	1.4
  @@ -9,6 +9,8 @@
    * 14-JAN-02   McConnell, OSM   Added implicit creation of the pss storage directory
    * 16-JAN-02   McConnell, OSM   Added context messages to several occurances of 
    *                              throw FileNotFoundException
  + * 03-FEB-02   McConnell, OSM   Marked up (###) occurances of swallowed exception
  + *                              (error handling and logging to be added)
    */
   
   package org.apache.pss.connector.file;
  @@ -192,10 +194,7 @@
        */
       public void addListener( Thread thread, TransactionalDataManagerSerializable tdms )
       {
  -        if ( _locked != null )
  -        {
  -            _locked.addListener( thread, tdms );
  -        }
  +        if ( _locked != null ) _locked.addListener( thread, tdms );
       }
   
   
  @@ -337,7 +336,7 @@
                   }
                   catch ( java.io.IOException ex )
                   {
  -                    // log this error
  +                    // ### log this error
                       ex.printStackTrace();
                   }
               }
  @@ -363,6 +362,7 @@
               }
               catch ( IOException ioexception )
               {
  +                // ### log this error
                   ioexception.printStackTrace();
               }
           }
  @@ -383,6 +383,7 @@
           }
           catch ( IOException ioexception )
           {
  +            // ### log this error
               ioexception.printStackTrace();
           }
           return _available_id;
  @@ -545,6 +546,7 @@
           }
           catch ( Exception exception )
           {
  +            // ### log this error
               exception.printStackTrace();
           }
       }
  @@ -592,6 +594,7 @@
           }
           catch ( IOException ioexception )
           {
  +            // ### log this error
               ioexception.printStackTrace();
           }
           return dataentry;
  @@ -638,6 +641,7 @@
               }
               catch ( IOException ioexception )
               {
  +                // ### log this error
                   ioexception.printStackTrace();
               }
           }
  @@ -669,6 +673,7 @@
               }
               catch ( IOException ioexception )
               {
  +                // ### log this error
                   ioexception.printStackTrace();
               }
               dataentry = read_next_entry();
  @@ -735,17 +740,15 @@
           {
               try
               {
  -                long l = _access.length();
  -                if ( l == 0L )
  -                {
  -                    l += 8L;
  -                }
  +                long idx = _access.length();
  +                if ( idx == 0L ) idx += 8L;
                   _access.seek( _access.length() );
                   _index_table.put( new String( dataentry.short_pid ), new Long( _access.getFilePointer() ) );
                   copy( _access, dataentry );
               }
               catch ( IOException ioexception )
               {
  +                // ### log this error
                   ioexception.printStackTrace();
               }
           }
  @@ -760,27 +763,21 @@
       {
           synchronized ( _access )
           {
  -
               debug.print( "Invalidate an entry into datastore for home: " + _home_name );
  -
               try
               {
                   Long index = ( Long ) _index_table.get( pid.short_value_str() );
  -
                   if ( index == null )
                   {
                       return;
                   }
  -
                   _access.seek( index.longValue() );
  -
                   _access.writeBoolean( false );
  -
                   _index_table.remove( pid.short_value_str() );
               }
               catch ( java.io.IOException e )
               {
  -                // log this error
  +                // ### log this error
                   e.printStackTrace();
               }
           }
  
  
  
  1.3       +1 -1      jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileCatalog.java
  
  Index: FileCatalog.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileCatalog.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FileCatalog.java	2 Feb 2002 01:19:59 -0000	1.2
  +++ FileCatalog.java	2 Feb 2002 10:29:54 -0000	1.3
  @@ -72,7 +72,7 @@
       /**
        * Set catalog information.
        * @param connector the file connector
  -     * @param access the access model
  +     * @param access the access mode
        * @param params parameters
        */
       public void setCatalogInfo( FileConnector connector, short access, Parameter[] params )
  
  
  
  1.4       +27 -19    jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileCatalogBase.java
  
  Index: FileCatalogBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileCatalogBase.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FileCatalogBase.java	2 Feb 2002 03:04:46 -0000	1.3
  +++ FileCatalogBase.java	2 Feb 2002 10:29:54 -0000	1.4
  @@ -4,6 +4,9 @@
    * Copyright: Copyright (C) The Apache Software Foundation. All rights reserved.
    * Copyright: OSM SARL 2001-2002, All Rights Reserved.
    * Copyright: 2000 (C) Intalio Inc. All Rights Reserved.
  + *
  + * Date        Author           Changes
  + * 03-FEB-02   McConnell, OSM   Javadoc additions and code cleanup.
    */
   
   package org.apache.pss.connector.file;
  @@ -54,25 +57,6 @@
       public abstract boolean stored( PID home_pid, PID type_pid );
   
   
  -    /**
  -     * Creates a new entry into the datastore.
  -     * @param home_pid the home PID
  -     * @param type_pid the storage type PID 
  -     * @return OutputStream
  -     */
  -    public abstract OutputStream create_new_entry( PID home_pid, PID type_pid );
  -
  -
  -    /**
  -     * Get a input access for a storagetype from the datastore
  -     * @param home_pid the home PID
  -     * @param type_pid the storage type PID 
  -     * @return InputStream
  -     * @exception NotFoundException 
  -     */
  -    public abstract InputStream entry( PID home_pid, PID type_pid )
  -        throws NotFoundException;
  -
   
       /**
        * Create a new entry into the datastore.
  @@ -129,6 +113,9 @@
        */
       public abstract StorageObject create_embedded_object( StorageHomeBase base, String id );
   
  +    //
  +    // file catalog specifics
  +    //
   
       /**
        * Returns a enumeration for a sequential access.
  @@ -136,4 +123,25 @@
        * @return Enumeration
        */
       public abstract Enumeration getSequentialAccess( PID home );
  +
  +    /**
  +     * Creates a new entry into the datastore.
  +     * @param home_pid the home PID
  +     * @param type_pid the storage type PID 
  +     * @return OutputStream
  +     */
  +    public abstract OutputStream create_new_entry( PID home_pid, PID type_pid );
  +
  +
  +    /**
  +     * Get a input access for a storagetype from the datastore
  +     * @param home_pid the home PID
  +     * @param type_pid the storage type PID 
  +     * @return InputStream
  +     * @exception NotFoundException 
  +     */
  +    public abstract InputStream entry( PID home_pid, PID type_pid )
  +        throws NotFoundException;
  +
  +
   }
  
  
  
  1.3       +8 -5      jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileConnector.java
  
  Index: FileConnector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileConnector.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FileConnector.java	2 Feb 2002 01:19:59 -0000	1.2
  +++ FileConnector.java	2 Feb 2002 10:29:54 -0000	1.3
  @@ -22,6 +22,7 @@
   import org.omg.CORBA.CompletionStatus;
   import org.omg.CORBA.PERSIST_STORE;
   import org.omg.CosPersistentState.*;
  +import org.omg.CosTransactions.Status;
   import org.omg.CosTransactions.*;
   import org.omg.PortableInterceptor.ORBInitInfo;
   
  @@ -39,7 +40,7 @@
       // static
       //======================================================================
   
  -    public static final String IMPLEMENTATION_ID = "PSS:OSM:file";
  +    public static final String IMPLEMENTATION_ID = "PSS:APACHE:file";
     
       //======================================================================
       // state
  @@ -196,8 +197,8 @@
               Current current = CurrentHelper.narrow( obj );
               switch ( current.get_status().value() )
               {
  -                case 0:
  -                    // '\0'
  +                case Status._StatusActive :
  +
                       Coordinator coordinator = current.get_control().get_coordinator();
                       TransactionalSession atransactionalsession[] = sessions( coordinator );
                       if ( atransactionalsession.length == 0 )
  @@ -237,14 +238,16 @@
           Vector vector = new Vector();
           for ( int i = 0; i < _sessions.size(); i++ )
           {
  -            TransactionalFileSession transactionalfilesession = ( TransactionalFileSession ) _sessions.elementAt( i );
  +            TransactionalFileSession transactionalfilesession = 
  +               ( TransactionalFileSession ) _sessions.elementAt( i );
               if ( transactionalfilesession.is_associated_to( coordinator ) )
               {
                   vector.addElement( transactionalfilesession );
               }
           }
   
  -        TransactionalSession atransactionalsession[] = new TransactionalSession[vector.size()];
  +        TransactionalSession atransactionalsession[] = 
  +          new TransactionalSession[vector.size()];
           for ( int j = 0; j < vector.size(); j++ )
           {
               atransactionalsession[j] = ( TransactionalSession ) vector.elementAt( j );
  
  
  
  1.3       +2 -1      jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileIterator.java
  
  Index: FileIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FileIterator.java	2 Feb 2002 01:19:59 -0000	1.2
  +++ FileIterator.java	2 Feb 2002 10:29:54 -0000	1.3
  @@ -122,7 +122,8 @@
   
       private void loadObject()
       {
  -        ( ( PersistentObject ) _object ).setPersistentLinks( PIDFactory.pid_byte_to_pid( _pids[_index] ), _home );
  +        ( ( PersistentObject ) _object ).setPersistentLinks( 
  +           PIDFactory.pid_byte_to_pid( _pids[_index] ), _home );
           ( ( PersistentObject ) _object ).refreshIncarnation();
       }
   
  
  
  
  1.3       +4 -1      jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileKeyEnumeration.java
  
  Index: FileKeyEnumeration.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileKeyEnumeration.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FileKeyEnumeration.java	2 Feb 2002 01:19:59 -0000	1.2
  +++ FileKeyEnumeration.java	2 Feb 2002 10:29:54 -0000	1.3
  @@ -82,10 +82,12 @@
               dataentry = _manager.read_entry_from_index( longholder );
               _index = longholder.value;
           } while ( !dataentry.valid );
  +
           StorageBuffer storagebuffer = new StorageBuffer( dataentry.data, 0, dataentry.data.length );
           Version version = new Version( ( byte ) 1, ( byte ) 2 );
           ORB orb = ( ( OpenORBInitInfo ) _info ).orb();
           CDRInputStream cdrinputstream;
  +
           try
           {
               java.lang.Object aobj[] = new java.lang.Object[4];
  @@ -96,7 +98,8 @@
               aclass[1] = Boolean.TYPE;
               aobj[2] = version;
               aobj[3] = storagebuffer;
  -            cdrinputstream = ( CDRInputStream ) orb.getLoader().constructClass( "iiop.CDRInputStreamClass", "org.openorb.iiop.CDRInputStream", aobj, aclass );
  +            cdrinputstream = ( CDRInputStream ) orb.getLoader().constructClass( 
  +              "iiop.CDRInputStreamClass", "org.openorb.iiop.CDRInputStream", aobj, aclass );
           }
           catch ( Exception exception )
           {
  
  
  
  1.3       +2 -1      jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileResource.java
  
  Index: FileResource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileResource.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FileResource.java	2 Feb 2002 01:19:59 -0000	1.2
  +++ FileResource.java	2 Feb 2002 10:29:54 -0000	1.3
  @@ -12,6 +12,7 @@
   import org.omg.PortableServer.POA;
   import org.omg.PortableServer.POAPackage.ObjectNotActive;
   import org.omg.PortableServer.POAPackage.WrongPolicy;
  +import org.omg.CosPersistentState.READ_ONLY;
   
   /**
    * Transaction resource representing a file.
  @@ -46,7 +47,7 @@
           throws HeuristicMixed, HeuristicHazard
       {
           _tfs.end( _coordinator, true );
  -        if ( _tfs.access_mode() == 0 )
  +        if ( _tfs.access_mode() == READ_ONLY.value  )
           {
               try
               {
  
  
  
  1.4       +4 -3      jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileSession.java
  
  Index: FileSession.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileSession.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FileSession.java	2 Feb 2002 03:04:46 -0000	1.3
  +++ FileSession.java	2 Feb 2002 10:29:54 -0000	1.4
  @@ -102,7 +102,7 @@
   
   
       /**
  -     * Sets the baseInfo attribute of the FileSession object
  +     * Sets the baseInfo for the session.
        * @param connector file connector
        * @param access the access mode
        * @param params connector parameters
  @@ -128,7 +128,8 @@
       public synchronized DataManager getDataManager( String storage_home_name )
       {
           DataManager datamanager = null;
  -        datamanager = ( DataManager ) _datastores.get( storage_home_name + getFileStorageName() );
  +        datamanager = ( DataManager ) _datastores.get( 
  +          storage_home_name + getFileStorageName() );
           if ( datamanager == null )
           {
               datamanager = new DataManager( storage_home_name, getFileStorageName(), _info );
  @@ -163,7 +164,7 @@
       {
           return new BasePID( name.hashCode(), 0L, _info );
   
  -        // replaces following code
  +        // ### replaces following code
           /*
           int high = name.hashCode();
           int low = getFileStorageName().hashCode();
  
  
  
  1.3       +24 -36    jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileSessionManager.java
  
  Index: FileSessionManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileSessionManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FileSessionManager.java	2 Feb 2002 01:19:59 -0000	1.2
  +++ FileSessionManager.java	2 Feb 2002 10:29:54 -0000	1.3
  @@ -85,18 +85,14 @@
                   Current current = CurrentHelper.narrow( obj );
                   switch ( current.get_status().value() )
                   {
  -                    default:
  -                        prepare_session( current.get_control().get_coordinator() );
  -                        break;
  -                    case 3:
  -                    // '\003'
  -                    case 4:
  -                    // '\004'
  -                    case 5:
  -                    // '\005'
  -                    case 6:
  -                        // '\006'
  -                        break;
  +                  case Status._StatusUnknown :
  +                  case Status._StatusRolledBack :
  +                  case Status._StatusCommitted :
  +                  case Status._StatusNoTransaction :
  +                    break;
  +                  default :
  +                    prepare_session( current.get_control().get_coordinator() );
  +                    break;
                   }
               }
               catch ( Exception exception )
  @@ -122,18 +118,14 @@
                   Current current = CurrentHelper.narrow( obj );
                   switch ( current.get_status().value() )
                   {
  -                    default:
  -                        suspend_session( current.get_control().get_coordinator() );
  -                        break;
  -                    case 3:
  -                    // '\003'
  -                    case 4:
  -                    // '\004'
  -                    case 5:
  -                    // '\005'
  -                    case 6:
  -                        // '\006'
  -                        break;
  +                  case org.omg.CosTransactions.Status._StatusUnknown :
  +                  case org.omg.CosTransactions.Status._StatusRolledBack :
  +                  case org.omg.CosTransactions.Status._StatusCommitted :
  +                  case org.omg.CosTransactions.Status._StatusNoTransaction :
  +                    break;
  +                  default :
  +                    suspend_session( current.get_control().get_coordinator() );
  +                    break;
                   }
               }
               catch ( Exception exception )
  @@ -170,18 +162,14 @@
                   Current current = CurrentHelper.narrow( obj );
                   switch ( current.get_status().value() )
                   {
  -                    default:
  -                        suspend_session( current.get_control().get_coordinator() );
  -                        break;
  -                    case 3:
  -                    // '\003'
  -                    case 4:
  -                    // '\004'
  -                    case 5:
  -                    // '\005'
  -                    case 6:
  -                        // '\006'
  -                        break;
  +                  case org.omg.CosTransactions.Status._StatusUnknown :
  +                  case org.omg.CosTransactions.Status._StatusRolledBack :
  +                  case org.omg.CosTransactions.Status._StatusCommitted :
  +                  case org.omg.CosTransactions.Status._StatusNoTransaction :
  +                    break;
  +                  default :
  +                    suspend_session( current.get_control().get_coordinator() );
  +                    break;
                   }
               }
               catch ( Exception exception )
  
  
  
  1.3       +63 -77    jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileSessionPool.java
  
  Index: FileSessionPool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/FileSessionPool.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FileSessionPool.java	2 Feb 2002 01:19:59 -0000	1.2
  +++ FileSessionPool.java	2 Feb 2002 10:29:54 -0000	1.3
  @@ -5,13 +5,14 @@
    * Copyright: OSM SARL 2001-2002, All Rights Reserved.
    * Copyright: 2000 (C) Intalio Inc. All Rights Reserved.
    *
  - * Name                  Date        Change
  - * S. McConnell, OSM     27-JAN-02   Removed dependence on org.openorb package
  + * Date        Author           Changes
  + * 27-JAN-02   McConnell, OSM   Removed dependence on org.openorb package
    */
   
   package org.apache.pss.connector.file;
   
   import java.util.Vector;
  +
   import org.omg.CORBA.TRANSACTION_REQUIRED;
   import org.omg.CosPersistentState.*;
   import org.omg.PortableInterceptor.ORBInitInfo;
  @@ -62,31 +63,27 @@
           int i;
           try
           {
  -            i = getParameterAsInt("PSS.File.Transaction.IsolationLevel", 1 );
  +            i = getParameterAsInt("PSS.File.Transaction.IsolationLevel", READ_COMMITTED.value);
           }
           catch( Throwable e )
           {
  -            final String error = "Could not resolve the session PSS.File.Transaction.IsolationLevel property.";
  +            final String error = "Could not resolve the PSS.File.Transaction.IsolationLevel property.";
               throw new PersistenceException( error, e );
           }
           switch ( i )
           {
  -            case 0:
  -                // '\0'
  -                _isolation_level = 0;
  -                break;
  -            case 1:
  -                // '\001'
  -                _isolation_level = 1;
  -                break;
  -            case 2:
  -                // '\002'
  -                _isolation_level = 2;
  -                break;
  -            case 3:
  -                // '\003'
  -                _isolation_level = 3;
  -                break;
  +          case 0 :
  +            _isolation_level = READ_UNCOMMITTED.value;
  +            break;
  +          case 1 :
  +            _isolation_level = READ_COMMITTED.value;
  +            break;
  +          case 2 :
  +            _isolation_level = REPEATABLE_READ.value;
  +            break;
  +          case 3 :
  +            _isolation_level = SERIALIZABLE.value;
  +            break;
           }
       }
   
  @@ -96,13 +93,13 @@
        * @param connector 
        * @param policy 
        * @param access 
  -     * @param aparameter 
  +     * @param params 
        */
       public void setBaseInfo( FileConnector connector, short policy, short access, Parameter[] params )
       {
           setCatalogInfo( connector, access, params );
           _tx_policy = policy;
  -        if ( _tx_policy == 1 )
  +        if ( _tx_policy == TRANSACTIONAL.value )
           {
               Initializer._session_manager_file.register( this );
           }
  @@ -110,75 +107,66 @@
   
   
       /**
  -     * 
  -     *
  -     * @param abyte0 
  +     * Flush entries based on a supplied set of pids.
  +     * @param pids array of pid identifiers to be flushed
        */
  -    public void flush_by_pids( byte abyte0[][] )
  +    public void flush_by_pids( byte[][] pids )
       {
  -        Object obj = null;
  -        Object obj1 = null;
  -        Object obj4 = null;
  -        if ( _tx_policy == 0 )
  +        if ( _tx_policy == NON_TRANSACTIONAL.value )
           {
  -            for ( int i = 0; i < abyte0.length; i++ )
  +            for ( int i = 0; i < pids.length; i++ )
               {
  -                PID pid = PIDFactory.pid_byte_to_pid( abyte0[i] );
  -                PersistentObjectHome persistentobjecthome = ( PersistentObjectHome ) find_home_base( pid );
  +                PID pid = PIDFactory.pid_byte_to_pid( pids[i] );
  +                PersistentObjectHome home = ( PersistentObjectHome ) find_home_base( pid );
                   try
                   {
  -                    java.lang.Object obj2 = ( ( StorageHomeBase ) persistentobjecthome ).find_by_short_pid( pid.short_value() );
  -                    persistentobjecthome.flush( ( PersistentObject ) obj2 );
  +                    Object obj2 = ( ( StorageHomeBase ) home ).find_by_short_pid( 
  +                      pid.short_value() );
  +                    home.flush( ( PersistentObject ) obj2 );
                   }
                   catch ( NotFound notfound )
                   {}
               }
  -
           }
           else
           {
  -            TransactionalSession transactionalsession = connector().current_session();
  -            if ( transactionalsession.get_association_status() == 0 )
  +            TransactionalSession session = connector().current_session();
  +            if ( session.get_association_status() == 0 )
               {
                   throw new TRANSACTION_REQUIRED();
               }
  -            for ( int j = 0; j < abyte0.length; j++ )
  +            for ( int j = 0; j < pids.length; j++ )
               {
  -                PID pid1 = PIDFactory.pid_byte_to_pid( abyte0[j] );
  -                PersistentObjectHome persistentobjecthome1 = ( PersistentObjectHome ) find_home_base( pid1 );
  +                PID pid1 = PIDFactory.pid_byte_to_pid( pids[j] );
  +                PersistentObjectHome home = ( PersistentObjectHome ) find_home_base( pid1 );
                   try
                   {
  -                    java.lang.Object obj3 = ( ( StorageHomeBase ) persistentobjecthome1 ).find_by_short_pid( pid1.short_value() );
  -                    persistentobjecthome1.flush( ( PersistentObject ) obj3 );
  +                    Object obj3 = ( ( StorageHomeBase ) home ).find_by_short_pid( pid1.short_value() );
  +                    home.flush( ( PersistentObject ) obj3 );
                   }
  -                catch ( NotFound notfound1 )
  +                catch ( NotFound notfound )
                   {}
               }
  -
           }
       }
   
   
       /**
  -     * 
  -     *
  -     * @param abyte0 
  +     * Refresh session relative to a supplied set of pids.
  +     * @param pids array of pid identifiers to be be refreshed
        */
  -    public void refresh_by_pids( byte abyte0[][] )
  +    public void refresh_by_pids( byte[][] pids )
       {
  -        Object obj = null;
  -        Object obj1 = null;
  -        Object obj4 = null;
  -        if ( _tx_policy == 0 )
  +        if ( _tx_policy == NON_TRANSACTIONAL.value )
           {
  -            for ( int i = 0; i < abyte0.length; i++ )
  +            for ( int i = 0; i < pids.length; i++ )
               {
  -                PID pid = PIDFactory.pid_byte_to_pid( abyte0[i] );
  -                PersistentObjectHome persistentobjecthome = ( PersistentObjectHome ) find_home_base( pid );
  +                PID pid = PIDFactory.pid_byte_to_pid( pids[i] );
  +                PersistentObjectHome home = ( PersistentObjectHome ) find_home_base( pid );
                   try
                   {
  -                    java.lang.Object obj2 = ( ( StorageHomeBase ) persistentobjecthome ).find_by_short_pid( pid.short_value() );
  -                    persistentobjecthome.refresh( ( PersistentObject ) obj2 );
  +                    Object object = ( ( StorageHomeBase ) home ).find_by_short_pid( pid.short_value() );
  +                    home.refresh( ( PersistentObject ) object );
                   }
                   catch ( NotFound notfound )
                   {}
  @@ -192,27 +180,25 @@
               {
                   throw new TRANSACTION_REQUIRED();
               }
  -            for ( int j = 0; j < abyte0.length; j++ )
  +            for ( int j = 0; j < pids.length; j++ )
               {
  -                PID pid1 = PIDFactory.pid_byte_to_pid( abyte0[j] );
  -                PersistentObjectHome persistentobjecthome1 = ( PersistentObjectHome ) find_home_base( pid1 );
  +                PID pid1 = PIDFactory.pid_byte_to_pid( pids[j] );
  +                PersistentObjectHome home = ( PersistentObjectHome ) find_home_base( pid1 );
                   try
                   {
  -                    java.lang.Object obj3 = ( ( StorageHomeBase ) persistentobjecthome1 ).find_by_short_pid( pid1.short_value() );
  -                    persistentobjecthome1.refresh( ( PersistentObject ) obj3 );
  +                    Object object = ( ( StorageHomeBase ) home ).find_by_short_pid( pid1.short_value() );
  +                    home.refresh( ( PersistentObject ) object );
                   }
                   catch ( NotFound notfound1 )
                   {}
               }
  -
           }
       }
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Return the transaction policy.
  +     * @return short transaction policy
        */
       public short transaction_policy()
       {
  @@ -221,18 +207,17 @@
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Return a free session.
  +     * @return TransactionalSession
        */
       public TransactionalSession prepare_free_session()
       {
           boolean flag = false;
  -        TransactionalSession transactionalsession = null;
  +        TransactionalSession session = null;
           for ( int i = 0; i < _pool.size(); i++ )
           {
  -            transactionalsession = ( TransactionalSession ) _pool.elementAt( i );
  -            if ( transactionalsession.get_association_status() != 0 )
  +            session = ( TransactionalSession ) _pool.elementAt( i );
  +            if ( session.get_association_status() != 0 )
               {
                   continue;
               }
  @@ -242,13 +227,14 @@
   
           if ( flag )
           {
  -            return transactionalsession;
  +            return session;
           }
           else
           {
  -            TransactionalSession transactionalsession1 = connector().create_transactional_session( access_mode(), _isolation_level, ( EndOfAssociationCallback ) null, parameters() );
  -            _pool.addElement( transactionalsession1 );
  -            return transactionalsession1;
  +            session = connector().create_transactional_session( 
  +              access_mode(), _isolation_level, ( EndOfAssociationCallback ) null, parameters() );
  +            _pool.addElement( session );
  +            return session;
           }
       }
   }
  
  
  
  1.4       +3 -0      jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/PersistentObject.java
  
  Index: PersistentObject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/PersistentObject.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PersistentObject.java	2 Feb 2002 04:02:10 -0000	1.3
  +++ PersistentObject.java	2 Feb 2002 10:29:54 -0000	1.4
  @@ -4,6 +4,9 @@
    * Copyright: Copyright (C) The Apache Software Foundation. All rights reserved.
    * Copyright: OSM SARL 2001-2002, All Rights Reserved.
    * Copyright: 2000 (C) Intalio Inc. All Rights Reserved.
  + *
  + * Date        Author           Changes
  + * 03-FEB-02   McConnell, OSM   Javadoc additions and code cleanup.
    */
   
   package org.apache.pss.connector.file;
  
  
  
  1.3       +4 -1      jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/PersistentRef.java
  
  Index: PersistentRef.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/PersistentRef.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PersistentRef.java	2 Feb 2002 01:19:59 -0000	1.2
  +++ PersistentRef.java	2 Feb 2002 10:29:54 -0000	1.3
  @@ -4,6 +4,9 @@
    * Copyright: Copyright (C) The Apache Software Foundation. All rights reserved.
    * Copyright: OSM SARL 2001-2002, All Rights Reserved.
    * Copyright: 2000 (C) Intalio Inc. All Rights Reserved.
  + *
  + * Date        Author           Changes
  + * 03-FEB-02   McConnell, OSM   Javadoc additions.
    */
   
   package org.apache.pss.connector.file;
  @@ -12,7 +15,7 @@
   import org.apache.pss.connector.PID;
   
   /**
  - * Interface implemented by file based peristent object implementation 
  + * Interface implemented by file based peristent object implementations 
    * that describes a reference to a storage object.
    *
    */
  
  
  
  1.4       +59 -58    jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/TransactionalDataManager.java
  
  Index: TransactionalDataManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/TransactionalDataManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TransactionalDataManager.java	2 Feb 2002 03:04:46 -0000	1.3
  +++ TransactionalDataManager.java	2 Feb 2002 10:29:54 -0000	1.4
  @@ -4,45 +4,58 @@
    * Copyright: Copyright (C) The Apache Software Foundation. All rights reserved.
    * Copyright: OSM SARL 2001-2002, All Rights Reserved.
    * Copyright: 2000 (C) Intalio Inc. All Rights Reserved.
  + *
  + * Date        Author           Changes
  + * 03-FEB-02   McConnell, OSM   Javadoc and code cleanup.
    */
   
   package org.apache.pss.connector.file;
   
  -import java.util.*;
  +import java.util.Vector;
  +import java.util.Enumeration;
  +import java.util.Hashtable;
   import org.omg.CORBA.LongHolder;
   import org.apache.pss.connector.PID;
   import org.apache.pss.connector.NotFoundException;
   
   /**
  - * Extended DataManager that provides manager support for transactional 
  - * updating of entries. 
  + * Extended DataManager this is used to write/read data into the datastore.
    */
   public class TransactionalDataManager extends DataManager
   {
   
       /**
  -     * 
  +     * Reference to the delegated DataManager.
        */
       protected DataManager _delegate;
  +
       /**
  -     * 
  +     * Flag indicating if a transaction has commenced.
        */
       protected boolean _begin;
  +
  +    /**
  +     * The modified entries.
  +     */
       private Hashtable _modified;
  +
  +    /**
  +     * The waited thread for transaction ending
  +     */
       private Vector _waited;
   
   
       /**
        * Constructor for the TransactionalDataManager object
        *
  -     * @param datamanager 
  +     * @param delegate 
        */
  -    public TransactionalDataManager( DataManager datamanager )
  +    public TransactionalDataManager( DataManager delegate )
       {
  -        _delegate = datamanager;
  +        _delegate = delegate;
           _begin = false;
           _modified = new Hashtable();
  -        _access = datamanager._access;
  +        _access = delegate._access;
           _waited = new Vector();
       }
   
  @@ -59,9 +72,8 @@
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Test if the transaction has commenced.
  +     * @return boolean
        */
       public boolean begun()
       {
  @@ -70,7 +82,7 @@
   
   
       /**
  -     * 
  +     * Begin a transaction.
        */
       public void begin()
       {
  @@ -83,7 +95,7 @@
   
   
       /**
  -     * 
  +     * Rollbal a transaction.
        */
       public void rollback()
       {
  @@ -97,7 +109,7 @@
   
   
       /**
  -     * 
  +     * Commit a transaction.
        */
       public void commit()
       {
  @@ -111,7 +123,7 @@
   
   
       /**
  -     * 
  +     * Forget the transaction.
        */
       public void forget()
       {
  @@ -122,13 +134,14 @@
   
   
       /**
  -     * 
  +     * Notification that a transaction has ended and that all threads can resume.
  +     * Empty imp[lementation that may be overridden.
        */
       public void resume_waited() { }
   
   
       /**
  -     * 
  +     * Notification signally activation of a shared value counter.
        */
       public synchronized void share()
       {
  @@ -137,9 +150,8 @@
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Test if this is a shared data manager.
  +     * @return boolean returns TRUE if this manager is shared.
        */
       public synchronized boolean shared()
       {
  @@ -148,9 +160,8 @@
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Return the hashtable key.
  +     * @return String the hashtable key
        */
       public synchronized String key()
       {
  @@ -159,16 +170,16 @@
   
   
       /**
  -     * 
  +     * Finalize method (empty implementation).
        */
       public void finalize() { }
   
   
       /**
  -     * 
  -     *
  +     * Read an entry from its PID. If the entry is already in the 
  +     * cache the cached value will be returned.
        * @param pid 
  -     * @return (doc-pending)
  +     * @return DataEntry
        * @exception NotFoundException 
        */
       public synchronized DataEntry read_entry( PID pid )
  @@ -179,8 +190,7 @@
   
   
       /**
  -     * 
  -     *
  +     * Invalidate an entry in the cache.
        * @param pid 
        */
       public synchronized void invalidate_entry( PID pid )
  @@ -194,8 +204,7 @@
   
   
       /**
  -     * 
  -     *
  +     * Add a data into the cache.
        * @param dataentry 
        */
       public synchronized void write_entry( DataEntry dataentry )
  @@ -209,7 +218,7 @@
   
   
       /**
  -     * 
  +     * Flush the cache.
        */
       public synchronized void flush()
       {
  @@ -221,7 +230,7 @@
   
   
       /**
  -     * 
  +     * Free all entires in the cache.
        */
       public synchronized void free_all()
       {
  @@ -237,7 +246,7 @@
   
   
       /**
  -     * 
  +     * Close.
        */
       public synchronized void close()
       {
  @@ -246,9 +255,8 @@
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Returns a new free ID.
  +     * @return long
        */
       public synchronized long nextFreeID()
       {
  @@ -257,7 +265,7 @@
   
   
       /**
  -     * 
  +     * Read an entry from its PID.
        *
        * @param longholder 
        * @return (doc-pending)
  @@ -269,9 +277,8 @@
   
   
       /**
  -     * 
  -     *
  -     * @param flag 
  +     * Set flush enablement.
  +     * @param flag
        */
       public synchronized void lock_flush( boolean flag )
       {
  @@ -280,9 +287,8 @@
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Return home base name.
  +     * @return String home name
        */
       public synchronized String home()
       {
  @@ -291,9 +297,8 @@
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Datastore content as an enumeration.
  +     * @return Enumeration
        */
       public synchronized Enumeration content()
       {
  @@ -302,9 +307,8 @@
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Return the datastore size.
  +     * @return long datastore size.
        */
       public synchronized long datastoreSize()
       {
  @@ -313,25 +317,22 @@
   
   
       /**
  -     * 
  +     * Return the current lock.
        *
  -     * @return (doc-pending)
  +     * @return Object the lock
        */
  -    public synchronized java.lang.Object lock()
  +    public synchronized Object lock()
       {
           return _delegate.lock();
       }
   
   
       /**
  -     * 
  +     * Invalidates all modifier entries during the transaction.
        */
       private synchronized void apply_modification()
       {
           Enumeration enumeration = _modified.keys();
  -        Object obj = null;
  -        Object obj1 = null;
  -        Object obj2 = null;
           Hashtable hashtable = get_index_table();
           while ( enumeration.hasMoreElements() )
           {
  
  
  
  1.3       +24 -21    jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/TransactionalDataManagerSerializable.java
  
  Index: TransactionalDataManagerSerializable.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/TransactionalDataManagerSerializable.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TransactionalDataManagerSerializable.java	2 Feb 2002 01:19:59 -0000	1.2
  +++ TransactionalDataManagerSerializable.java	2 Feb 2002 10:29:54 -0000	1.3
  @@ -4,6 +4,10 @@
    * Copyright: Copyright (C) The Apache Software Foundation. All rights reserved.
    * Copyright: OSM SARL 2001-2002, All Rights Reserved.
    * Copyright: 2000 (C) Intalio Inc. All Rights Reserved.
  + *
  + * Date        Author           Changes
  + * 03-JAN-02   McConnell, OSM   Clean-up of includes.
  + * 03-JAN-02   McConnell, OSM   Additional javadoc and code cleanup.
    */
   
   package org.apache.pss.connector.file;
  @@ -33,7 +37,7 @@
   
   
       /**
  -     * 
  +     * Begin a transactional session.
        */
       public void begin()
       {
  @@ -53,39 +57,38 @@
   
   
       /**
  -     * Adds a feature to the Listener attribute of the
  -     * TransactionalDataManagerSerializable object
  -     *
  -     * @param thread The feature to be added to the Listener attribute
  -     * @param transactionaldatamanagerserializable The feature to be added to
  -     *      the Listener attribute
  +     * Add a listener to the transactional session.
  +     * @param thread 
  +     * @param manager
        */
  -    public void addListener( Thread thread, TransactionalDataManagerSerializable transactionaldatamanagerserializable )
  +    public void addListener( Thread thread, TransactionalDataManagerSerializable manager )
       {
  -        Object aobj[] = new Object[2];
  -        aobj[0] = thread;
  -        aobj[1] = transactionaldatamanagerserializable;
  -        _listeners.addElement( ( ( Object ) ( aobj ) ) );
  +        Object array[] = new Object[2];
  +        array[0] = thread;
  +        array[1] = manager;
  +        _listeners.addElement( ( ( Object ) ( array) ) );
       }
   
   
       /**
  -     * 
  +     * Notifcation that the transaction has ended enabling resumption of 
  +     * of all threads.
        */
       public void resume_waited()
       {
           if ( _listeners.size() != 0 )
           {
  -            Object obj = null;
  -            Object aobj[] = ( Object[] ) _listeners.elementAt( 0 );
  -            Thread thread1 = ( Thread ) aobj[0];
  -            TransactionalDataManagerSerializable transactionaldatamanagerserializable1 = ( TransactionalDataManagerSerializable ) aobj[1];
  +            Object[] tab = ( Object[] ) _listeners.elementAt( 0 );
  +            Thread thread1 = ( Thread ) tab[0];
  +            TransactionalDataManagerSerializable manager = 
  +              ( TransactionalDataManagerSerializable ) tab[1];
               for ( int i = 1; i < _listeners.size(); i++ )
               {
  -                Object aobj1[] = ( Object[] ) _listeners.elementAt( i );
  -                Thread thread = ( Thread ) aobj1[0];
  -                TransactionalDataManagerSerializable transactionaldatamanagerserializable = ( TransactionalDataManagerSerializable ) aobj1[1];
  -                transactionaldatamanagerserializable1.addListener( thread, transactionaldatamanagerserializable );
  +                Object array[] = ( Object[] ) _listeners.elementAt( i );
  +                Thread thread = ( Thread ) array[0];
  +                TransactionalDataManagerSerializable tmz_tmp = 
  +                  ( TransactionalDataManagerSerializable ) array[1];
  +                manager.addListener( thread, tmz_tmp );
               }
   
               _listeners.removeAllElements();
  
  
  
  1.4       +103 -117  jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/TransactionalFileSession.java
  
  Index: TransactionalFileSession.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/file/TransactionalFileSession.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TransactionalFileSession.java	2 Feb 2002 04:02:10 -0000	1.3
  +++ TransactionalFileSession.java	2 Feb 2002 10:29:54 -0000	1.4
  @@ -4,6 +4,9 @@
    * Copyright: Copyright (C) The Apache Software Foundation. All rights reserved.
    * Copyright: OSM SARL 2001-2002, All Rights Reserved.
    * Copyright: 2000 (C) Intalio Inc. All Rights Reserved.
  + *
  + * Date        Author           Changes
  + * 03-FEB-02   McConnell, OSM   Javadoc additions and code cleanup.
    */
   
   package org.apache.pss.connector.file;
  @@ -17,6 +20,7 @@
   import org.omg.CosPersistentState.TransactionalSession;
   import org.omg.CosPersistentState.EndOfAssociationCallback;
   import org.omg.CosPersistentState.Parameter;
  +import org.omg.CosPersistentState.READ_COMMITTED;
   import org.omg.CosPersistentState.READ_UNCOMMITTED;
   import org.omg.CosPersistentState.REPEATABLE_READ;
   import org.omg.CosPersistentState.SERIALIZABLE;
  @@ -66,45 +70,45 @@
   
   
       /**
  -     * Sets the baseInfo attribute of the TransactionalFileSession object
  +     * Set the catalog base information.
        *
  -     * @param connector the file connector
  -     * @param word0 The new baseInfo value
  -     * @param endofassociationcallback The new baseInfo value
  -     * @param word1 The new baseInfo value
  -     * @param aparameter The new baseInfo value
  +     * @param connector the database connector
  +     * @param default_isolation_level default isolation level
  +     * @param callback the end of association callback
  +     * @param access access mode
  +     * @param parameters the connection parameters
        */
  -    public void setBaseInfo( FileConnector connector, short word0, EndOfAssociationCallback endofassociationcallback, short word1, Parameter aparameter[] )
  +    public void setBaseInfo( FileConnector connector, short default_isolation_level, EndOfAssociationCallback callback, short access, Parameter[] parameters )
       {
  -        for ( int i = 0; i < aparameter.length; i++ )
  +        for ( int i = 0; i < parameters.length; i++ )
           {
  -            if ( aparameter[i].name.equals( "HomeExtension" ) )
  +            if ( parameters[i].name.equals( "HomeExtension" ) )
               {
  -                _extension = aparameter[i].val.extract_string();
  +                _extension = parameters[i].val.extract_string();
               }
           }
   
  -        setCatalogInfo( connector, word1, aparameter );
  -        _isolation_level = word0;
  -        _callback = endofassociationcallback;
  +        setCatalogInfo( connector, access, parameters );
  +        _isolation_level = default_isolation_level;
  +        _callback = callback;
       }
   
   
       /**
  -     * Gets the dataManager attribute of the TransactionalFileSession object
  +     * Return the data manager.
        *
  -     * @param s 
  +     * @param name
        * @return The dataManager value
        */
  -    public synchronized DataManager getDataManager( String s )
  +    public synchronized DataManager getDataManager( String name )
       {
  -        java.lang.Object obj = null;
  +        Object obj = null;
           DataManager datamanager = null;
  -        datamanager = ( DataManager ) FileSession._datastores.get( s + getFileStorageName() );
  +        datamanager = ( DataManager ) FileSession._datastores.get( name + getFileStorageName() );
           if ( datamanager == null )
           {
  -            datamanager = new DataManager( s, getFileStorageName(), _info );
  -            FileSession._datastores.put( s + getFileStorageName(), datamanager );
  +            datamanager = new DataManager( name, getFileStorageName(), _info );
  +            FileSession._datastores.put( name + getFileStorageName(), datamanager );
           }
           else
           {
  @@ -112,18 +116,15 @@
           }
           switch ( _isolation_level )
           {
  -            case 0:
  -                // '\0'
  -                throw new PersistenceException( 7, CompletionStatus.COMPLETED_NO );
  -            case 1:
  -                // '\001'
  +            case READ_UNCOMMITTED.value :
  +                throw new PersistenceException( "Not supported - read is always committed.",
  +                  7, CompletionStatus.COMPLETED_NO );
  +            case READ_COMMITTED.value :
                   obj = new TransactionalDataManager( datamanager );
                   break;
  -            case 2:
  -                // '\002'
  -                throw new PersistenceException( 7, CompletionStatus.COMPLETED_NO );
  -            case 3:
  -                // '\003'
  +            case REPEATABLE_READ.value :
  +                throw new PersistenceException( "Not implemented", 7, CompletionStatus.COMPLETED_NO );
  +            case  SERIALIZABLE.value :
                   obj = new TransactionalDataManagerSerializable( datamanager );
                   break;
           }
  @@ -136,9 +137,8 @@
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Returns the association status.
  +     * @return short the association status
        */
       public short get_association_status()
       {
  @@ -147,9 +147,8 @@
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Return the transactional data managers.
  +     * @return TransactionalDataManager[]
        */
       public TransactionalDataManager[] get_data_managers()
       {
  @@ -165,25 +164,24 @@
   
   
       /**
  -     * 
  +     * Test is this session is associated with a supplied transaction.
        *
  -     * @param coordinator 
  -     * @return (doc-pending)
  +     * @param transaction 
  +     * @return boolean true if this session is associated with the transaction
        */
  -    public boolean is_associated_to( Coordinator coordinator )
  +    public boolean is_associated_to( Coordinator transaction )
       {
           if ( _coordinator == null )
           {
               return false;
           }
  -        return _coordinator.hash_transaction() == coordinator.hash_transaction();
  +        return _coordinator.hash_transaction() == transaction.hash_transaction();
       }
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Returns the default isolation level.
  +     * @return short isolation level
        */
       public short default_isolation_level()
       {
  @@ -192,110 +190,97 @@
   
   
       /**
  -     * 
  +     * Starts the transaction.
        *
  -     * @param coordinator 
  +     * @param transaction 
        */
  -    public void start( Coordinator coordinator )
  +    public void start( Coordinator transaction )
       {
           switch ( _association_status )
           {
  -            case 0:
  -                // '\0'
  -                register_file_resource( coordinator );
  -                _association_status = 1;
  -                break;
  -            case 2:
  -                // '\002'
  -                _association_status = 1;
  -                break;
  -            case 1:
  -                // '\001'
  -                throw new BAD_OPERATION();
  -            case 3:
  -                // '\003'
  -                _association_status = 1;
  -                break;
  +          case TransactionalSession.NO_ASSOCIATION :
  +            register_file_resource( transaction );
  +            _association_status = TransactionalSession.ACTIVE;
  +            break;
  +
  +        case TransactionalSession.SUSPENDED :
  +            _association_status = TransactionalSession.ACTIVE;
  +            break;
  +
  +        case TransactionalSession.ACTIVE :
  +            throw new BAD_OPERATION();
  +
  +        case TransactionalSession.ENDING :
  +            _association_status = TransactionalSession.ACTIVE;
  +            break;
           }
       }
   
   
       /**
  -     * 
  +     * Suspend the session.
        *
        * @param coordinator 
        */
  -    public void suspend( Coordinator coordinator )
  +    public void suspend( Coordinator transaction )
       {
           switch ( _association_status )
           {
  -            case 0:
  -                // '\0'
  -                throw new PersistenceException( 5, CompletionStatus.COMPLETED_NO );
  -            case 2:
  -                // '\002'
  -                throw new BAD_OPERATION();
  -            case 1:
  -                // '\001'
  -                if ( _coordinator.hash_transaction() != coordinator.hash_transaction() )
  -                {
  -                    throw new INVALID_TRANSACTION();
  -                }
  -                _association_status = 2;
  -                break;
  -            case 3:
  -                // '\003'
  -                throw new BAD_OPERATION();
  +          case TransactionalSession.NO_ASSOCIATION :
  +            throw new PersistenceException( 5, org.omg.CORBA.CompletionStatus.COMPLETED_NO );
  +          case TransactionalSession.SUSPENDED :
  +            throw new BAD_OPERATION();
  +          case TransactionalSession.ACTIVE :
  +            if ( _coordinator.hash_transaction() != transaction.hash_transaction() )
  +                throw new INVALID_TRANSACTION();
  +            _association_status = TransactionalSession.SUSPENDED;
  +            break;
  +          case TransactionalSession.ENDING :
  +            throw new BAD_OPERATION();
           }
       }
   
   
       /**
  -     * 
  +     * End the transaction.
        *
        * @param coordinator 
        * @param flag 
        */
  -    public void end( Coordinator coordinator, boolean flag )
  +    public void end( Coordinator transaction, boolean success )
       {
           switch ( _association_status )
           {
  -            case 0:
  -                // '\0'
  -                throw new PersistenceException( 5, CompletionStatus.COMPLETED_NO );
  -            case 1:
  -            // '\001'
  -            case 2:
  -                // '\002'
  -                if ( _coordinator.hash_transaction() != coordinator.hash_transaction() )
  -                {
  -                    throw new INVALID_TRANSACTION();
  -                }
  -                if ( !flag )
  -                {
  -                    try
  -                    {
  -                        _resource.rollback();
  -                    }
  -                    catch ( Exception exception )
  -                    {}
  -                }
  -                else
  +          case TransactionalSession.NO_ASSOCIATION :
  +            throw new PersistenceException( 5, org.omg.CORBA.CompletionStatus.COMPLETED_NO );
  +          case TransactionalSession.SUSPENDED :
  +          case TransactionalSession.ACTIVE :
  +            if ( _coordinator.hash_transaction() != transaction.hash_transaction() )
  +                throw new INVALID_TRANSACTION();
  +            if ( success == false )
  +            {
  +                try
                   {
  -                    flush();
  +                    _resource.rollback();
                   }
  -                break;
  -            case 3:
  -                // '\003'
  -                throw new BAD_OPERATION();
  +                catch ( java.lang.Exception ex )
  +                { }
  +            }
  +            else
  +            {
  +                flush();
  +            }
  +            break;
  +          case TransactionalSession.ENDING :
  +            throw new BAD_OPERATION();
           }
       }
   
   
       /**
  -     * 
  +     * Return the transaction.
        *
  -     * @return (doc-pending)
  +     * @return Coordinator 
        */
       public Coordinator transaction()
       {
  @@ -311,7 +296,7 @@
   
   
       /**
  -     * 
  +     * Release associations to the transaction, resource and association status.
        */
       public void remove_file_resource()
       {
  @@ -326,8 +311,7 @@
   
   
       /**
  -     * 
  -     *
  +     * Create a new transactional resource and registered it with the POA.
        * @param coordinator 
        */
       private void register_file_resource( Coordinator coordinator )
  @@ -338,7 +322,8 @@
               org.omg.CORBA.Object obj = _info.resolve_initial_references( "RootPOA" );
               POA poa = POAHelper.narrow( obj );
               byte abyte0[] = poa.activate_object( _resource );
  -            org.omg.CosTransactions.Resource resource = ResourceHelper.narrow( poa.id_to_reference( abyte0 ) );
  +            org.omg.CosTransactions.Resource resource = ResourceHelper.narrow( 
  +              poa.id_to_reference( abyte0 ) );
               coordinator.register_resource( resource );
               _coordinator = coordinator;
           }
  @@ -347,7 +332,8 @@
           Enumeration enumeration = _home_datastores.elements();
           while ( enumeration.hasMoreElements() )
           {
  -            TransactionalDataManager transactionaldatamanager = ( TransactionalDataManager ) enumeration.nextElement();
  +            TransactionalDataManager transactionaldatamanager = 
  +              ( TransactionalDataManager ) enumeration.nextElement();
               if ( !transactionaldatamanager.begun() )
               {
                   transactionaldatamanager.begin();
  
  
  
  1.3       +59 -70    jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/MemoryCatalog.java
  
  Index: MemoryCatalog.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/MemoryCatalog.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MemoryCatalog.java	2 Feb 2002 01:19:59 -0000	1.2
  +++ MemoryCatalog.java	2 Feb 2002 10:29:54 -0000	1.3
  @@ -2,8 +2,11 @@
    * File: MemoryCatalog.java
    * License: etc/LICENSE.TXT
    * Copyright: Copyright (C) The Apache Software Foundation. All rights reserved.
  - * Copyright: OSM SARL 2001-2002, All Rights Reserved.
  + * Copyright: OSM SARL 2002, All Rights Reserved.
    * Copyright: 2000 (C) Intalio Inc. All Rights Reserved.
  + *
  + * Date        Author           Changes
  + * 02-FEB-02   McConnell, OSM   Added javadoc.
    */
   
   package org.apache.pss.connector.memory;
  @@ -29,24 +32,23 @@
   
   
   /**
  - * 
  - *
  + * Impementation of a catalog for memory based persistence simulation.
    */
   public abstract class MemoryCatalog extends AbstractCatalog
   {
   
       /**
  -     * 
  +     * The connector.
        */
       protected MemoryConnector _connector;
   
       /**
  -     * 
  +     * Set of home incarnations.
        */
       protected Hashtable _home_incarnations;
   
       /**
  -     * 
  +     * Hoome pid table.
        */
       protected Hashtable _home_pid;
   
  @@ -78,25 +80,24 @@
   
   
       /**
  -     * 
  -     *
  -     * @param connector 
  -     * @param access 
  -     * @param params 
  +     * Set catalog information.
  +     * @param connector the file connector
  +     * @param access the access mode
  +     * @param params parameters
        */
  -    public void setCatalogInfo( MemoryConnector connector, short access, Parameter[] params )
  +    public void setCatalogInfo( MemoryConnector connector, short access, Parameter[] parameters )
       {
           _connector = connector;
  -        super.setCatalogInfo( connector, access, params );
  +        super.setCatalogInfo( connector, access, parameters );
       }
   
   
       /**
  -     * 
  +     * Find a stroage home given a supplied PSDL identifier.
        *
  -     * @param psdl storage home PSDL name 
  -     * @return (doc-pending)
  -     * @exception NotFound 
  +     * @param psdl the PSDL identifier for the home
  +     * @return StorageHomeBase the matching storage home base
  +     * @exception NotFound if the supplied identifer does not match a home
        */
       public StorageHomeBase find_storage_home( String psdl )
           throws NotFound
  @@ -122,7 +123,8 @@
               }
               catch ( Throwable exception )
               {
  -                final String error = "Internal error while attempting to create storage home '" + psdl + "' from class: '"
  +                final String error = "Internal error while attempting to create storage home '" 
  +                  + psdl + "' from class: '"
                     + class1.getName() + "'.";
                   throw new PersistenceException( error, 11, CompletionStatus.COMPLETED_NO, exception );
               }
  @@ -135,64 +137,58 @@
   
   
       /**
  -     * 
  -     *
  -     * @param abyte0 
  -     * @return (doc-pending)
  +     * Find a storage object in the catalog given a persistent object identifier.
  +     * @param pid persistent object identifer
  +     * @return Object the storage object
        * @exception NotFound 
        */
  -    public java.lang.Object find_by_pid( byte abyte0[] )
  +    public java.lang.Object find_by_pid( byte[] pid )
           throws NotFound
       {
           Enumeration enumeration = _home_incarnations.elements();
  -        Object obj = null;
  -        Object obj1 = null;
  -        byte abyte1[] = PIDFactory.pid_to_catalog_pid( abyte0 );
  -        byte abyte2[] = PIDFactory.pid_to_short_pid( abyte0 );
  +        byte[] catalog_pid = PIDFactory.pid_to_catalog_pid( pid );
  +        byte[] short_pid = PIDFactory.pid_to_short_pid( pid );
           while ( enumeration.hasMoreElements() )
           {
               PersistentObjectHome persistentobjecthome = ( PersistentObjectHome ) enumeration.nextElement();
  -            PID pid = persistentobjecthome.getPID();
  -            if ( pid.is_same_catalog( abyte1 ) )
  +            PID home_pid = persistentobjecthome.getPID();
  +            if ( home_pid.is_same_catalog( catalog_pid ) )
               {
                   StorageHomeBase storagehomebase = ( StorageHomeBase ) persistentobjecthome;
  -                java.lang.Object obj2 = storagehomebase.find_by_short_pid( abyte2 );
  -                if ( obj2 == null )
  +                Object object = storagehomebase.find_by_short_pid( short_pid );
  +                if ( object == null )
                   {
                       throw new NotFound();
                   }
                   else
                   {
  -                    return obj2;
  +                    return object;
                   }
               }
           }
  -        throw new NotFound();
  +        final String message = "Supplied pid does not correspond to an existing home.";
  +        throw new NotFound( message );
       }
   
   
       /**
  -     * 
  -     *
  -     * @param abyte0 
  -     * @return (doc-pending)
  +     * Find a stroage object ref in the catalog given a persistent object identifier.
  +     * @param pid persistent object identifer
  +     * @return StorageObjectRef the storage object
        * @exception NotFound 
        */
  -    public StorageObjectRef find_ref_by_pid( byte abyte0[] )
  +    public StorageObjectRef find_ref_by_pid( byte[] pid )
           throws NotFound
       {
           Enumeration enumeration = _home_incarnations.elements();
  -        Object obj = null;
  -        Object obj1 = null;
  -        byte abyte1[] = PIDFactory.pid_to_catalog_pid( abyte0 );
  -        byte abyte2[] = PIDFactory.pid_to_short_pid( abyte0 );
  +        byte[] catalog_pid = PIDFactory.pid_to_catalog_pid( pid );
           while ( enumeration.hasMoreElements() )
           {
  -            PersistentObjectHome persistentobjecthome = ( PersistentObjectHome ) enumeration.nextElement();
  -            PID pid = persistentobjecthome.getPID();
  -            if ( pid.is_same_catalog( abyte1 ) )
  +            PersistentObjectHome home = ( PersistentObjectHome ) enumeration.nextElement();
  +            PID home_pid = home.getPID();
  +            if ( home_pid.is_same_catalog( catalog_pid ) )
               {
  -                return persistentobjecthome.create_reference( abyte0 );
  +                return home.create_reference( pid );
               }
           }
           throw new NotFound();
  @@ -200,30 +196,27 @@
   
   
       /**
  -     * 
  -     *
  +     * Returns all storage type PIDs contained into a storage home
        * @param storagehomebase 
  -     * @return (doc-pending)
  +     * @return byte[][] array of persistent object identifers
        */
       public byte[][] find_all( StorageHomeBase storagehomebase )
       {
           PID pid = ( ( PersistentObjectHome ) storagehomebase ).getPID();
  -        java.lang.Object aobj[] = ( ( PersistentObjectHome ) storagehomebase ).get_incarnations();
  -        byte abyte0[][] = new byte[aobj.length][];
  -        for ( int i = 0; i < aobj.length; i++ )
  +        java.lang.Object[] array = ( ( PersistentObjectHome ) storagehomebase ).get_incarnations();
  +        byte[][] stack = new byte[array.length][];
  +        for ( int i = 0; i < array.length; i++ )
           {
  -            abyte0[i] = ( ( PersistentObject ) aobj[i] ).getPID().value();
  +            stack[i] = ( ( PersistentObject ) array[i] ).getPID().value();
           }
  -
  -        return abyte0;
  +        return stack;
       }
   
   
       /**
  -     * 
  -     *
  -     * @param storagehomebase 
  -     * @return (doc-pending)
  +     * Creates a new iterator of the storage objects in the supplied home.
  +     * @param storagehomebase the storage home base
  +     * @return Iterator storage object iterator
        */
       public Iterator iterator( StorageHomeBase storagehomebase )
       {
  @@ -232,35 +225,31 @@
   
   
       /**
  -     * 
  -     *
  +     * Clean a storage home.
        * @param storagehomebase 
        */
       public void clean( StorageHomeBase storagehomebase ) { }
   
   
       /**
  -     * 
  -     *
  +     * Destroy a storage home.
        * @param storagehomebase 
        */
       public void destroy( StorageHomeBase storagehomebase ) { }
   
   
       /**
  -     * 
  -     *
  +     * Returns a storage home base matching the supplied PID value.
        * @param pid 
  -     * @return (doc-pending)
  +     * @return StorageHomeBase
        */
       public abstract StorageHomeBase find_home_base( PID pid );
   
   
       /**
  -     * 
  -     *
  +     * Register a home incarnation with the catalog.
        * @param obj 
  -     * @param s 
  +     * @param psdl 
        */
  -    protected abstract void register_home_incarnation( java.lang.Object obj, String s );
  +    protected abstract void register_home_incarnation( Object obj, String psdl );
   }
  
  
  
  1.4       +43 -45    jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/MemoryCatalogBase.java
  
  Index: MemoryCatalogBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/MemoryCatalogBase.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MemoryCatalogBase.java	2 Feb 2002 03:04:46 -0000	1.3
  +++ MemoryCatalogBase.java	2 Feb 2002 10:29:54 -0000	1.4
  @@ -4,97 +4,95 @@
    * Copyright: Copyright (C) The Apache Software Foundation. All rights reserved.
    * Copyright: OSM SARL 2001-2002, All Rights Reserved.
    * Copyright: 2000 (C) Intalio Inc. All Rights Reserved.
  + *
  + * Date        Name             Change
  + * 02-FEB-02   McConnell, OSM   Added javadoc.
    */
   
   package org.apache.pss.connector.memory;
   
  -import org.omg.CosPersistentState.*;
  +import org.omg.CosPersistentState.Parameter;
  +import org.omg.CosPersistentState.StorageObject;
  +import org.omg.CosPersistentState.Connector;
  +import org.omg.CosPersistentState.CatalogBaseOperations;
  +import org.omg.CosPersistentState.StorageHomeBase;
   import org.apache.pss.connector.PID;
   import org.apache.pss.connector.NotFoundException;
   
   
   /**
  - * 
  - *
  + * Base interface for a memory based catalog.
    */
   public interface MemoryCatalogBase
            extends CatalogBaseOperations
   {
   
       /**
  -     * Sets the baseInfo attribute of the MemoryCatalogBase object
  -     *
  -     * @param memoryconnector The new baseInfo value
  -     * @param word0 The new baseInfo value
  -     * @param aparameter The new baseInfo value
  +     * Sets all base information required by a memory catalog.
  +     * @param connector the connector
  +     * @param access the access mode
  +     * @param params catalog parameters
        */
  -    public abstract void setBaseInfo( MemoryConnector memoryconnector, short word0, Parameter aparameter[] );
  +    public abstract void setBaseInfo( MemoryConnector connector, short access, Parameter[] params );
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Returns the catalog connector.
  +     * @return Connector catalog connector
        */
       public abstract Connector connector();
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Returns the catalog parameter.
  +     * @return Parameter[]
        */
       public abstract Parameter[] parameters();
   
   
       /**
  -     * 
  -     *
  -     * @param pid 
  -     * @param pid1 
  -     * @return (doc-pending)
  +     * Check if a storage type is already stored.
  +     * @param home_pid the home PID
  +     * @param type_pid the storage type PID 
  +     * @return boolean
        */
  -    public abstract boolean stored( PID pid, PID pid1 );
  +    public abstract boolean stored( PID home_pid, PID type_pid );
   
   
       /**
  -     * 
  -     *
  -     * @param pid 
  -     * @param pid1 
  +     * Delete a entry in the datastore.
  +     * @param home_pid 
  +     * @param type_pid 
        */
  -    public abstract void delete( PID pid, PID pid1 );
  +    public abstract void delete( PID home_pid, PID type_pid );
   
   
       /**
  -     * 
  -     *
  -     * @param storagehomebase 
  -     * @param abyte0 
  -     * @param s 
  -     * @return (doc-pending)
  +     * Incarnate a storage type
  +     * @param base 
  +     * @param pid storage type pid 
  +     * @param id the storage type id
  +     * @return StorageObject
        * @exception NotFoundException 
        */
  -    public abstract StorageObject incarnate( StorageHomeBase storagehomebase, byte abyte0[], String s )
  +    public abstract StorageObject incarnate( StorageHomeBase base, byte[] pid, String id )
           throws NotFoundException;
   
   
       /**
  -     * 
  -     *
  -     * @param storagehomebase 
  -     * @param s 
  -     * @return (doc-pending)
  +     * Create a storage type.
  +     * @param base storage home base
  +     * @param id the storage type id
  +     * @return StorageObject
        */
  -    public abstract StorageObject create_object( StorageHomeBase storagehomebase, String s );
  +    public abstract StorageObject create_object( StorageHomeBase base, String id );
   
   
       /**
  -     * 
  -     *
  -     * @param storagehomebase 
  -     * @param s 
  -     * @return (doc-pending)
  +     * Create an embedded storage type.
  +     * @param base storage home base
  +     * @param id the storage type id
  +     * @return StorageObject
        */
  -    public abstract StorageObject create_embedded_object( StorageHomeBase storagehomebase, String s );
  +    public abstract StorageObject create_embedded_object( StorageHomeBase base, String id );
   }
  
  
  
  1.3       +51 -48    jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/MemoryConnector.java
  
  Index: MemoryConnector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/MemoryConnector.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MemoryConnector.java	2 Feb 2002 01:19:59 -0000	1.2
  +++ MemoryConnector.java	2 Feb 2002 10:29:54 -0000	1.3
  @@ -8,6 +8,7 @@
    * Date        Name             Change
    * 27-JAN-02   McConnell, OSM   Removed all org.openorb dependencies
    * 27-JAN-02   McConnell, OSM   Added default configuration profile.
  + * 02-FEB-02   McConnell, OSM   Added javadoc.
    */
   
   package org.apache.pss.connector.memory;
  @@ -28,11 +29,12 @@
   import org.omg.PortableInterceptor.ORBInitInfo;
   
   import org.apache.pss.connector.ConnectorBase;
  +import org.apache.pss.connector.PersistenceException;
   import org.apache.pss.connector.PID;
   
   /**
  - * 
  - *
  + * Memory based persistence connector that provides support for the 
  + * creation of session, session pools, and transactional sessions.
    */
   public class MemoryConnector extends ConnectorBase
   {
  @@ -41,7 +43,7 @@
       // static
       //======================================================================
   
  -    public static final String IMPLEMENTATION_ID = "PSS:OSM:memory";
  +    public static final String IMPLEMENTATION_ID = "PSS:APACHE:memory";
     
       //======================================================================
       // state
  @@ -70,12 +72,11 @@
       //======================================================================
   
       /**
  -     * 
  -     *
  -     * @param obj 
  -     * @return (doc-pending)
  +     * Returns the persistent object identifier of the supplied storage object.
  +     * @param obj the storage object instance
  +     * @return byte[] object identifier
        */
  -    public byte[] get_pid( java.lang.Object obj )
  +    public byte[] get_pid( Object obj )
       {
           try
           {
  @@ -84,18 +85,17 @@
           }
           catch ( Exception exception )
           {
  -            throw new PERSIST_STORE( 1, CompletionStatus.COMPLETED_NO );
  +            throw new PersistenceException( 1, CompletionStatus.COMPLETED_NO, exception );
           }
       }
   
   
       /**
  -     * 
  -     *
  -     * @param obj 
  -     * @return (doc-pending)
  +     * Returns the short persistent object identifier of the supplied storage object.
  +     * @param  obj the storage object instance
  +     * @return  byte[] short object identifier
        */
  -    public byte[] get_short_pid( java.lang.Object obj )
  +    public byte[] get_short_pid( Object obj )
       {
           try
           {
  @@ -104,7 +104,7 @@
           }
           catch ( Exception exception )
           {
  -            throw new PERSIST_STORE( 1, CompletionStatus.COMPLETED_NO );
  +            throw new PersistenceException( 1, CompletionStatus.COMPLETED_NO, exception );
           }
       }
   
  @@ -113,10 +113,10 @@
       * The create_basic_session operation creates a basic, non-transactional, session.
       * @param access_mode the access model for the session
       * @param params will contain information such as file name or database name,
  -    * authentication information, etc. supporting connector configuration
  +    *   authentication information, etc. supporting connector configuration
       * @return Session a basic non-transactional session.
       * @exception PERSIST_STORE if the implementation cannot provide a session with
  -    * the desired access mode (or higher)
  +    *   the desired access mode (or higher)
        */
       public Session create_basic_session( short access_mode, Parameter[] params )
       {
  @@ -128,45 +128,48 @@
   
   
       /**
  -     * 
  -     *
  -     * @param word0 
  -     * @param word1 
  -     * @param endofassociationcallback 
  -     * @param s 
  -     * @param aparameter 
  -     * @return (doc-pending)
  +    * The create_transactional_session operation creates a new transactional session.
  +    * @param access the access mode for the session
  +    * @param default_isolation_level the default isolation level (ignored)
  +    * @param callback the end-of-association callback handler (ignored)
  +    * @param params will contain information such as file name or database name,
  +    *   authentication information, etc. supporting connector configuration
  +    * @return TransactionalSession a transactional session.
  +    * @exception PERSIST_STORE if the implementation cannot provide a session with
  +    * the desired access mode (or higher) or the desired isolation level
        */
  -    public TransactionalSession create_transactional_session( short word0, short word1, EndOfAssociationCallback endofassociationcallback, Parameter aparameter[] )
  +    public TransactionalSession create_transactional_session( short access, short default_isolation_level, EndOfAssociationCallback callback, Parameter[] params )
       {
  -        TransactionalMemorySession transactionalmemorysession = new TransactionalMemorySession( _info );
  -        ( ( TransactionalMemorySession ) transactionalmemorysession ).setBaseInfo( this, word0, aparameter );
  -        return transactionalmemorysession;
  +        TransactionalMemorySession session = new TransactionalMemorySession( _info );
  +        ( ( TransactionalMemorySession ) session ).setBaseInfo( this, access, params );
  +        return session;
       }
   
   
       /**
  -     * 
  -     *
  -     * @param word0 
  -     * @param word1 
  -     * @param s 
  -     * @param aparameter 
  -     * @return (doc-pending)
  +     * The create_session_pool creates a new session pool.
  +     * @param access the access mode 
  +     * @param tx_policy transaction policy (ignored)
  +     * @param params will contain information such as file name or database name,
  +     *   authentication information, etc. supporting connector configuration
  +     * @return SessionPool the session pool
        */
  -    public SessionPool create_session_pool( short word0, short word1, Parameter aparameter[] )
  +    public SessionPool create_session_pool( short access, short tx_policy, Parameter[] params )
       {
  -        pseudo_transactional_session = ( TransactionalMemorySession ) create_transactional_session( word0, ( short ) 0, null, aparameter );
  -        MemorySessionPool memorysessionpool = new MemorySessionPool( _info );
  -        ( ( MemorySessionPool ) memorysessionpool ).setBaseInfo( this, word0, aparameter );
  -        return memorysessionpool;
  +        pseudo_transactional_session = ( TransactionalMemorySession ) create_transactional_session( 
  +          access, ( short ) 0, null, params );
  +        MemorySessionPool pool = new MemorySessionPool( _info );
  +        ( ( MemorySessionPool ) pool ).setBaseInfo( this, access, params );
  +        return pool;
       }
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * The operation <code>current_session</code>
  +     * logically calls <code>sessions</code> with the transaction associated with the calling thread; if a
  +     * single session is returned, <code>current_session</code> returns it.
  +     * @return TransactionalSession the current transactional session
  +     * @exception <code>PERSIST_STORE</code> is no session is associated with the calling thread
        */
       public TransactionalSession current_session()
       {
  @@ -175,10 +178,10 @@
   
   
       /**
  -     * 
  -     *
  -     * @param coordinator 
  -     * @return (doc-pending)
  +    * The operation <code>sessions</code> returns all the transactional sessions created by this
  +    * connector that are associated with resources registered with the given transaction.
  +    * @param coordinator the transaction coordinator
  +    * @return TransactionalSessionList list of transactional sessions
        */
       public TransactionalSession[] sessions( Coordinator coordinator )
       {
  
  
  
  1.3       +16 -23    jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/MemoryIterator.java
  
  Index: MemoryIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/MemoryIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MemoryIterator.java	2 Feb 2002 01:19:59 -0000	1.2
  +++ MemoryIterator.java	2 Feb 2002 10:29:54 -0000	1.3
  @@ -13,8 +13,8 @@
   import org.apache.pss.connector.Iterator;
   
   /**
  - * 
  - *
  + * Iterator supporting iteration over the storage type instances of a storage home
  + * for memory based persistence.
    */
   public class MemoryIterator
            implements Iterator
  @@ -29,9 +29,8 @@
   
       /**
        * Constructor for the MemoryIterator object
  -     *
  -     * @param storagehomebase 
  -     * @param memorycatalog 
  +     * @param storagehomebase the storage home implementation
  +     * @param filecatalog the file catalog
        */
       public MemoryIterator( StorageHomeBase storagehomebase, MemoryCatalog memorycatalog )
       {
  @@ -43,9 +42,8 @@
   
   
       /**
  -     * 
  -     *
  -     * @param i 
  +     * Set the current position for the iterator.
  +     * @param i position
        */
       public void set( int i )
       {
  @@ -54,9 +52,8 @@
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Returns true if there are more elements in the iteration.
  +     * @return boolean true if there are more elements in the iteration.
        */
       public boolean hasMoreElements()
       {
  @@ -65,7 +62,7 @@
   
   
       /**
  -     * 
  +     * Sets the iterator to the next element in the iteration.
        */
       public void next()
       {
  @@ -74,9 +71,8 @@
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Returns the storage object at the current iterator position.
  +     * @return StorageObject the storage object at the current iterator position.
        */
       public StorageObject element()
       {
  @@ -85,9 +81,8 @@
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Returns the current element and detaches it from the iterator.
  +     * @return StorageObject the storage object at the current iterator position.
        */
       public StorageObject detach()
       {
  @@ -96,7 +91,7 @@
   
   
       /**
  -     * 
  +     * Resets the iterator to the first element of the iteration.
        */
       public void reset()
       {
  @@ -105,9 +100,8 @@
   
   
       /**
  -     * 
  -     *
  -     * @param abyte0 
  +     * Set the current element of the iterator by providing a PID.
  +     * @param pid persistent identifier
        */
       public void fetch( byte abyte0[] )
       {
  @@ -119,6 +113,5 @@
                   _index = i;
               }
           }
  -
       }
   }
  
  
  
  1.4       +105 -71   jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/MemorySession.java
  
  Index: MemorySession.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/MemorySession.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MemorySession.java	2 Feb 2002 03:04:46 -0000	1.3
  +++ MemorySession.java	2 Feb 2002 10:29:54 -0000	1.4
  @@ -4,25 +4,33 @@
    * Copyright: Copyright (C) The Apache Software Foundation. All rights reserved.
    * Copyright: OSM SARL 2001-2002, All Rights Reserved.
    * Copyright: 2000 (C) Intalio Inc. All Rights Reserved.
  + *
  + * Date        Author           Changes
  + * 14-JAN-02   McConnell, OSM   Included causal exception in place of PERSIT_STORE
  + * 14-JAN-02   McConnell, OSM   General enhancements in error management
  + * 14-JAN-02   McConnell, OSM   Code cleanup and addition of include directives
  + * 02-FEB-02   McConnell, OSM   Added javadoc
    */
   
   package org.apache.pss.connector.memory;
   
   import java.util.Enumeration;
   import java.util.Hashtable;
  +
   import org.omg.CORBA.CompletionStatus;
   import org.omg.CORBA.PERSIST_STORE;
   import org.omg.CosPersistentState.*;
   import org.omg.PortableInterceptor.ORBInitInfo;
  +
   import org.apache.pss.connector.PID;
   import org.apache.pss.connector.BasePID;
   import org.apache.pss.connector.PIDFactory;
   import org.apache.pss.connector.PersistenceException;
   import org.apache.pss.connector.NotFoundException;
  +import org.apache.pss.connector.PersistenceException;
   
   /**
  - * 
  - *
  + * Memory basic session implementation.
    */
   public class MemorySession extends MemoryCatalog
            implements Session, MemoryCatalogBase
  @@ -52,100 +60,97 @@
   
   
       /**
  -     * Sets the baseInfo attribute of the MemorySession object
  -     *
  -     * @param memoryconnector The new baseInfo value
  -     * @param word0 The new baseInfo value
  -     * @param aparameter The new baseInfo value
  +     * Sets the baseInfo for the session.
  +     * @param connector file connector
  +     * @param access the access mode
  +     * @param params connector parameters
        */
  -    public void setBaseInfo( MemoryConnector memoryconnector, short word0, Parameter aparameter[] )
  +    public void setBaseInfo( MemoryConnector connector, short access, Parameter[] params )
       {
  -        setCatalogInfo( memoryconnector, word0, aparameter );
  +        setCatalogInfo( connector, access, params );
       }
   
   
       /**
  -     * 
  -     *
  -     * @param s 
  -     * @return (doc-pending)
  +     * Create a new PID based on a supplied storage home name.
  +     * @param name the storage home name
  +     * @return PID
        */
  -    public synchronized PID createHomePID( String s )
  +    public synchronized PID createHomePID( String name )
       {
  -        int i = s.hashCode();
  +        int i = name.hashCode();
           return new BasePID( i << 32, 0L, _info );
       }
   
   
       /**
  -     * 
  -     *
  -     * @param pid 
  -     * @param l 
  -     * @return (doc-pending)
  +     * Create a new PID given a supplied home PID and index.
  +     * @param home_pid 
  +     * @param index
  +     * @return PID
        */
  -    public synchronized PID createPID( PID pid, long l )
  +    public synchronized PID createPID( PID home_pid, long index )
       {
  -        return new BasePID( pid.catalog_value(), l, _info );
  +        return new BasePID( home_pid.catalog_value(), index, _info );
       }
   
   
       /**
  -     * 
  -     *
  -     * @param pid 
  -     * @param pid1 
  +     * Delete and entry.
  +     * @param home_pid the home PID
  +     * @param type_pid the storage type PID 
        */
  -    public void delete( PID pid, PID pid1 ) { }
  -
  +    public synchronized void delete( PID home_pid, PID type_pid )
  +    {
  +    }
   
       /**
  -     * 
  -     *
  -     * @param pid 
  -     * @param pid1 
  -     * @return (doc-pending)
  +     * Check if a storage type is already stored.
  +     * @param home_pid the home PID
  +     * @param type_pid the storage type PID 
  +     * @return boolean always returns false (memory simulation)
        */
  -    public boolean stored( PID pid, PID pid1 )
  +    public synchronized boolean stored( PID home_pid, PID type_pid )
       {
           return false;
       }
   
   
       /**
  -     * 
  +     * Flush all datastores.
        */
       public void flush() { }
   
   
       /**
  -     * 
  +     * Refresh all homes.
        */
       public void refresh() { }
   
   
       /**
  -     * 
  +     * Free all datastores.
        */
       public void free_all() { }
   
   
       /**
  -     * 
  +     * Close the session.
        */
       public void close() { }
   
   
       /**
  -     * 
  -     *
  -     * @param storagehomebase 
  -     * @param abyte0 
  -     * @param s 
  -     * @return (doc-pending)
  -     * @exception NotFoundException 
  +     * Incarnate a storage type - the implememntation always returns a null value
  +     * as all instances are inherantly incarnated under a memory based simulator.
  +     * All argumements are ignored.
  +     * @param base storage home base
  +     * @param pid storage type pid 
  +     * @param id the storage type id
  +     * @return StorageObject
  +     * @exception NotFoundException (never thrown)
        */
  -    public synchronized StorageObject incarnate( StorageHomeBase storagehomebase, byte abyte0[], String s )
  +    public synchronized StorageObject incarnate( StorageHomeBase base, byte[] pid, String id )
           throws NotFoundException
       {
           return null;
  @@ -153,67 +158,96 @@
   
   
       /**
  -     * 
  -     *
  -     * @param storagehomebase 
  -     * @param s 
  +     * Create a new storage type.
  +     * @param base the storage home base 
  +     * @param psdl the PSDL storage type 
        * @return (doc-pending)
        */
  -    public synchronized StorageObject create_object( StorageHomeBase storagehomebase, String s )
  +    public synchronized StorageObject create_object( StorageHomeBase base, String psdl )
       {
  -        Class class1 = _connector.get_storage_type_factory( s );
  +        Class class1 = _connector.get_storage_type_factory( psdl );
           if ( class1 == null )
           {
  -            throw new PERSIST_STORE();
  +            throw new PersistenceException( "Storage type factory returned a null class for " + psdl );
           }
           try
           {
               java.lang.Object obj = class1.newInstance();
  -            PID pid = createPID( ( ( PersistentObjectHome ) storagehomebase ).getPID(), PIDFactory.getFreeID() );
  -            ( ( PersistentObject ) obj ).setPersistentLinks( pid, storagehomebase );
  +            PID pid = createPID( ( ( PersistentObjectHome ) base ).getPID(), PIDFactory.getFreeID() );
  +            ( ( PersistentObject ) obj ).setPersistentLinks( pid, base );
               ( ( PersistentObject ) obj ).embeddedBuilder();
               return ( StorageObject ) obj;
           }
           catch ( Exception exception )
           {
  -            throw new PERSIST_STORE( 11, CompletionStatus.COMPLETED_NO );
  +            throw new PersistenceException( 11, CompletionStatus.COMPLETED_NO, exception );
           }
       }
   
   
       /**
  -     * 
  -     *
  -     * @param storagehomebase 
  -     * @param s 
  -     * @return (doc-pending)
  +     * Creates an empty storage type.
  +     * @param base the storage home base
  +     * @param psdl the PSDL identifier 
  +     * @return StorageObject
        */
  -    public synchronized StorageObject create_embedded_object( StorageHomeBase storagehomebase, String s )
  +    public synchronized StorageObject create_empty_object( StorageHomeBase base, String psdl )
       {
  -        Class class1 = _connector.get_storage_type_factory( s );
  +        Class class1 = _connector.get_storage_type_factory( psdl );
           if ( class1 == null )
           {
  -            throw new PERSIST_STORE();
  +            throw new PersistenceException( 
  +              "Storage type factory returned a null class for " + psdl );
           }
           try
           {
               java.lang.Object obj = class1.newInstance();
  -            ( ( PersistentObject ) obj ).setPersistentLinks( null, storagehomebase );
  +            ( ( PersistentObject ) obj ).setPersistentLinks( null, base );
               ( ( PersistentObject ) obj ).embeddedBuilder();
               return ( StorageObject ) obj;
           }
           catch ( Exception exception )
           {
  -            throw new PERSIST_STORE( 11, CompletionStatus.COMPLETED_NO );
  +            throw new PersistenceException( 
  +              "Unexpected exception while creating storage object for " + psdl, 11, 
  +              CompletionStatus.COMPLETED_NO, exception );
           }
       }
   
  +    /**
  +     * Create a new embedded storage type.
  +     * @param base the storage home base of the container of the embedded instance
  +     * @param pidl the PIDL identifier of the embedded storage type 
  +     * @return StorageObject
  +     */
  +    public synchronized StorageObject create_embedded_object( StorageHomeBase base, String pidl )
  +    {
  +        java.lang.Class clz = _connector.get_storage_type_factory( pidl );
  +        if ( clz == null )
  +        {
  +            throw new PersistenceException( "Storage type factory returned a null class for " + pidl );
  +        }
  +        try
  +        {
  +            Object object = clz.newInstance();
  +            ( ( PersistentObject ) object ).setPersistentLinks( null, base );
  +            ( ( PersistentObject ) object ).embeddedBuilder();
  +            return ( StorageObject ) object;
  +        }
  +        catch ( Exception exception )
  +        {
  +            throw new PersistenceException( 
  +              "Unexpected exception while creating embedded storage object for " + pidl, 11, 
  +              CompletionStatus.COMPLETED_NO, exception );
  +        }
  +    }
   
       /**
  -     * 
  -     *
  -     * @param pid 
  -     * @return (doc-pending)
  +     * Returns an storage object home from its PID.  The implementation
  +     * used the catalog PID value of the supplied PID and ignores the
  +     * value state member.
  +     * @param pid PID value
  +     * @return StorageHomeBase
        */
       public StorageHomeBase find_home_base( PID pid )
       {
  @@ -236,7 +270,7 @@
        * @param incarnation an instance of PersistentObjectHome 
        * @param psdl the PSDL name of the the storage home
        */
  -    protected synchronized void register_home_incarnation( java.lang.Object incarnation, String psdl )
  +    protected synchronized void register_home_incarnation( Object incarnation, String psdl )
       {
           if( incarnation == null ) throw new NullPointerException(
              "Illegal null incarnation argument.");
  
  
  
  1.3       +21 -21    jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/MemorySessionPool.java
  
  Index: MemorySessionPool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/MemorySessionPool.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MemorySessionPool.java	2 Feb 2002 01:19:59 -0000	1.2
  +++ MemorySessionPool.java	2 Feb 2002 10:29:54 -0000	1.3
  @@ -4,6 +4,9 @@
    * Copyright: Copyright (C) The Apache Software Foundation. All rights reserved.
    * Copyright: OSM SARL 2001-2002, All Rights Reserved.
    * Copyright: 2000 (C) Intalio Inc. All Rights Reserved.
  + *
  + * Date        Author           Changes
  + * 02-FEB-02   McConnell, OSM   Added javadoc
    */
   
   package org.apache.pss.connector.memory;
  @@ -12,12 +15,8 @@
   import org.omg.CosPersistentState.SessionPool;
   import org.omg.PortableInterceptor.ORBInitInfo;
   
  -// Referenced classes of package org.apache.pss.connector.memory:
  -//            MemorySession
  -
   /**
  - * 
  - *
  + * Impementation of a memory based session pool.
    */
   public class MemorySessionPool extends MemorySession
            implements SessionPool
  @@ -34,35 +33,36 @@
           this( null );
       }
   
  -
       /**
        * Constructor for the MemorySessionPool object
  -     *
  -     * @param orbinitinfo 
  +     * @param info 
        */
  -    public MemorySessionPool( ORBInitInfo orbinitinfo ) { }
  -
  +    public MemorySessionPool( ORBInitInfo info ) 
  +    { 
  +    }
   
       /**
  -     * 
  -     *
  -     * @param abyte0 
  +     * Flush entries based on a supplied set of pids.
  +     * @param pids array of pid identifiers to be flushed
        */
  -    public void flush_by_pids( byte abyte0[][] ) { }
  +    public void flush_by_pids( byte[][] pids )
  +    {
  +    }
   
   
       /**
  -     * 
  -     *
  -     * @param abyte0 
  +     * Refresh session relative to a supplied set of pids.
  +     * @param pids array of pid identifiers to be be refreshed
        */
  -    public void refresh_by_pids( byte abyte0[][] ) { }
  +    public void refresh_by_pids( byte[][] pids )
  +    { 
  +    }
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Return the transaction policy.
  +     * @return short transaction policy
  +     * @exception NO_IMPLEMENT always thrown
        */
       public short transaction_policy()
       {
  
  
  
  1.3       +14 -13    jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/PersistentObject.java
  
  Index: PersistentObject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/PersistentObject.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PersistentObject.java	2 Feb 2002 01:19:59 -0000	1.2
  +++ PersistentObject.java	2 Feb 2002 10:29:54 -0000	1.3
  @@ -4,6 +4,9 @@
    * Copyright: Copyright (C) The Apache Software Foundation. All rights reserved.
    * Copyright: OSM SARL 2001-2002, All Rights Reserved.
    * Copyright: 2000 (C) Intalio Inc. All Rights Reserved.
  + *
  + * Date        Author           Changes
  + * 02-FEB-02   McConnell, OSM   Added javadoc
    */
   
   package org.apache.pss.connector.memory;
  @@ -12,39 +15,37 @@
   import org.apache.pss.connector.PID;
   
   /**
  - * 
  - *
  + * Interface implemented by generated storage types for memory persistence.
    */
   public interface PersistentObject
   {
   
       /**
  -     * Sets the persistentLinks attribute of the PersistentObject object
  +     * Sets the home base and PID for the persistent object.
        *
  -     * @param pid The new persistentLinks value
  -     * @param storagehomebase The new persistentLinks value
  +     * @param pid the PID identifer
  +     * @param storagehomebase the storage home base implementation managing this persistent object
        */
       public abstract void setPersistentLinks( PID pid, StorageHomeBase storagehomebase );
   
   
       /**
  -     * 
  +     * Gets the PID attribute of the PersistentObject object
        *
  -     * @param persistentobject 
  +     * @return PID the PID value of the instance
        */
  -    public abstract void markAsEmbedded( PersistentObject persistentobject );
  +    public abstract PID getPID();
   
   
       /**
  -     * Gets the pID attribute of the PersistentObject object
  -     *
  -     * @return The pID value
  +     * Flags a persistent object as embedded within another persistent object.
  +     * @param persistentobject the persistent object that this object is embedded within
        */
  -    public abstract PID getPID();
  +    public abstract void markAsEmbedded( PersistentObject persistentobject );
   
   
       /**
  -     * 
  +     * Invokes the embedded builder to build an embedded storage object.
        */
       public abstract void embeddedBuilder();
   }
  
  
  
  1.4       +31 -31    jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/PersistentObjectHome.java
  
  Index: PersistentObjectHome.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/PersistentObjectHome.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PersistentObjectHome.java	2 Feb 2002 03:04:46 -0000	1.3
  +++ PersistentObjectHome.java	2 Feb 2002 10:29:54 -0000	1.4
  @@ -4,6 +4,9 @@
    * Copyright: Copyright (C) The Apache Software Foundation. All rights reserved.
    * Copyright: OSM SARL 2001-2002, All Rights Reserved.
    * Copyright: 2000 (C) Intalio Inc. All Rights Reserved.
  + *
  + * Date        Author           Changes
  + * 02-FEB-02   McConnell, OSM   Added javadoc
    */
   
   package org.apache.pss.connector.memory;
  @@ -13,41 +16,30 @@
   import org.apache.pss.connector.NotFoundException;
   
   /**
  - * 
  - *
  + * Interface implemented by generated storage homes for memory persistence.
    */
   public interface PersistentObjectHome
   {
   
       /**
  -     * 
  +     * Sets the catalog and home PID for the home.
        *
  -     * @return (doc-pending)
  -     */
  -    public abstract Object[] get_incarnations();
  -
  -
  -    /**
  -     * Sets the persistentLinks attribute of the PersistentObjectHome object
  -     *
  -     * @param catalogbase The new persistentLinks value
  -     * @param pid The new persistentLinks value
  +     * @param catalogbase the catalog managing this home
  +     * @param pid the PID identifer
        */
       public abstract void setPersistentLinks( CatalogBase catalogbase, PID pid );
   
   
       /**
  -     * Gets the pID attribute of the PersistentObjectHome object
  -     *
  -     * @return The pID value
  +     * Gets the PID for this home.
  +     * @return PID the home identifier.
        */
       public abstract PID getPID();
   
   
       /**
  -     * 
  -     *
  -     * @param pid 
  +     * Remove a storage type from the home.
  +     * @param pid the PID of the storage type to remove
        * @exception NotFoundException 
        */
       public abstract void remove_storage_type( PID pid )
  @@ -55,28 +47,36 @@
   
   
       /**
  -     * 
  -     *
  -     * @param pid 
  -     * @return (doc-pending)
  +     * Check is a storage type is stored within the home.
  +     * @param pid the PID of the storage type to check
  +     * @return boolean true is the storage type is stored in this home
        */
       public abstract boolean is_stored( PID pid );
   
   
       /**
  -     * 
  -     *
  -     * @param pid 
  -     * @return (doc-pending)
  +     * Get the <code>StorageObject</code> given a supplied PID.
  +     * @param pid the PID 
  +     * @return StorageObject the corresponding storage object
        */
       public abstract StorageObject deref( PID pid );
   
   
       /**
  -     * 
  -     *
  -     * @param abyte0 
  -     * @return (doc-pending)
  +     * Create a storage object ref given a persist object identifier.
  +     * @param pid persistent object identifier  
  +     * @return StorageObjectRef
        */
       public abstract StorageObjectRef create_reference( byte abyte0[] );
  +
  +    //
  +    // memory connector specifics
  +    //
  + 
  +    /**
  +     * Returns an array of storage types managed by this home.
  +     * @return Object[]
  +     */
  +    public abstract Object[] get_incarnations();
  +
   }
  
  
  
  1.3       +13 -8     jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/PersistentRef.java
  
  Index: PersistentRef.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/PersistentRef.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PersistentRef.java	2 Feb 2002 01:19:59 -0000	1.2
  +++ PersistentRef.java	2 Feb 2002 10:29:54 -0000	1.3
  @@ -4,6 +4,10 @@
    * Copyright: Copyright (C) The Apache Software Foundation. All rights reserved.
    * Copyright: OSM SARL 2001-2002, All Rights Reserved.
    * Copyright: 2000 (C) Intalio Inc. All Rights Reserved.
  + *
  + * Date        Author           Changes
  + * 14-JAN-02   McConnell, OSM   Code cleanup and addition of include directives
  + * 02-FEB-02   McConnell, OSM   Added javadoc
    */
   
   package org.apache.pss.connector.memory;
  @@ -12,25 +16,26 @@
   import org.apache.pss.connector.PID;
   
   /**
  - * 
  - *
  + * Interface implemented by memory based peristent object implementations 
  + * that describes a reference to a storage object.
    */
   public interface PersistentRef
   {
   
       /**
  -     * Sets the persistentLinks attribute of the PersistentRef object
  +     * Sets the storage home implementation and instance PID value.
        *
  -     * @param storagehomebase The new persistentLinks value
  -     * @param pid The new persistentLinks value
  +     * @param storagehomebase the storage home managing this instance
  +     * @param pid the PID value for this instance
        */
       public abstract void setPersistentLinks( StorageHomeBase storagehomebase, PID pid );
   
   
       /**
  -     * 
  +     * Updates the PID value for this instances based on the supplied 
  +     * persitent object identifier 
        *
  -     * @param abyte0 
  +     * @param pid persistent object identifier 
        */
  -    public abstract void update( byte abyte0[] );
  +    public abstract void update( byte[] pid );
   }
  
  
  
  1.3       +20 -23    jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/TransactionalMemorySession.java
  
  Index: TransactionalMemorySession.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/enterprise/pss/src/java/org/apache/pss/connector/memory/TransactionalMemorySession.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TransactionalMemorySession.java	2 Feb 2002 01:19:59 -0000	1.2
  +++ TransactionalMemorySession.java	2 Feb 2002 10:29:54 -0000	1.3
  @@ -16,7 +16,7 @@
   
   
   /**
  - * 
  + * Transaction memory session implementation.
    *
    */
   public class TransactionalMemorySession extends MemorySession
  @@ -47,9 +47,9 @@
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Return the association status.
  +     * @return short association status
  +     * @exception NO_IMPLEMENT allway thrown
        */
       public short get_association_status()
       {
  @@ -58,9 +58,9 @@
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Return the default isolation level.
  +     * @return short isolation level
  +     * @exception NO_IMPLEMENT always thrown
        */
       public short default_isolation_level()
       {
  @@ -69,34 +69,31 @@
   
   
       /**
  -     * 
  -     *
  -     * @param coordinator 
  +     * Start (null implementation).
  +     * @param transaction 
        */
  -    public void start( Coordinator coordinator ) { }
  +    public void start( Coordinator transaction ) { }
   
   
       /**
  -     * 
  -     *
  -     * @param coordinator 
  +     * Suspend (null implementation).
  +     * @param transaction 
        */
  -    public void suspend( Coordinator coordinator ) { }
  +    public void suspend( Coordinator transaction ) { }
   
   
       /**
  -     * 
  -     *
  -     * @param coordinator 
  -     * @param flag 
  +     * End (null implementation).
  +     * @param transaction 
  +     * @param success 
        */
  -    public void end( Coordinator coordinator, boolean flag ) { }
  +    public void end( Coordinator transaction, boolean success ) { }
   
   
       /**
  -     * 
  -     *
  -     * @return (doc-pending)
  +     * Returns the transaction (not implemented).
  +     * @exception NO_IMPLEMENT always thrown
  +     * @return Coordinator
        */
       public Coordinator transaction()
       {
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message