You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2002/05/14 11:00:03 UTC

cvs commit: jakarta-avalon-apps/enterprise/ins/src/java/org/apache/ins BindingIteratorImpl.java CallbackManagerImpl.java CallbackRegistration.java NamingContextExImpl.java NamingProvider.java ReleaseInfo.java

mcconnell    02/05/14 02:00:02

  Modified:    enterprise/ins build.xml
               enterprise/ins/src/java/org/apache/ins
                        BindingIteratorImpl.java CallbackManagerImpl.java
                        CallbackRegistration.java NamingContextExImpl.java
                        NamingProvider.java ReleaseInfo.java
  Log:
  checkstyle compliance (380 warning down to 80)
  
  Revision  Changes    Path
  1.4       +2 -1      jakarta-avalon-apps/enterprise/ins/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/ins/build.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- build.xml	14 May 2002 07:29:14 -0000	1.3
  +++ build.xml	14 May 2002 09:00:01 -0000	1.4
  @@ -8,8 +8,9 @@
   
     <property name="enterprise.path" value=".."/>
     <property name="common.path" value="${enterprise.path}/../common"/>
  +  <property name="tools.path" value="${enterprise.path}/tools"/>
     <target name="checkstyle">
  -    <ant antfile="${common.path}/util/checkstyle.xml">
  +    <ant antfile="${tools.path}/util/checkstyle.xml">
          <property name="checkstyle.failOnViolation" value="true"/>
          <property name="build.dir" value="${build}"/>
          <property name="java.dir" value="${src}/java"/>
  
  
  
  1.2       +39 -14    jakarta-avalon-apps/enterprise/ins/src/java/org/apache/ins/BindingIteratorImpl.java
  
  Index: BindingIteratorImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/ins/src/java/org/apache/ins/BindingIteratorImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BindingIteratorImpl.java	13 Mar 2002 09:18:35 -0000	1.1
  +++ BindingIteratorImpl.java	14 May 2002 09:00:01 -0000	1.2
  @@ -7,7 +7,7 @@
    *
    * Original contribution Copyright 2000 (C) Intalio Inc. All Rights Reserved.
   *
  -* $Id: BindingIteratorImpl.java,v 1.1 2002/03/13 09:18:35 mcconnell Exp $
  +* $Id: BindingIteratorImpl.java,v 1.2 2002/05/14 09:00:01 mcconnell Exp $
   *
   * Date         Author  Changes
   */
  @@ -21,7 +21,7 @@
    * This class is the implementation of BindingIterator.
    *
    * @author <a href="mailto:mdaniel@intalio.com">Marina Daniel &lt;mdaniel@intalio.com&gt;</a>
  - * @version $Revision: 1.1 $ $Date: 2002/03/13 09:18:35 $ 
  + * @version $Revision: 1.2 $ $Date: 2002/05/14 09:00:01 $ 
    */
   
   public class BindingIteratorImpl extends org.omg.CosNaming.BindingIteratorPOA
  @@ -30,17 +30,20 @@
       /**
        * Reference to the binding list
        */
  -    private java.util.Enumeration _bl;
  +    private java.util.Enumeration m_bindingList;
   
       private Logger m_logger;
   
       /**
        * Constructor
  +     * @param orb an ORB
  +     * @param bl binding list
  +     * @param logger logging channel
        */
       public BindingIteratorImpl( org.omg.CORBA.ORB orb, java.util.Vector bl, Logger logger )
       {
   
  -        _bl = bl.elements();
  +        m_bindingList = bl.elements();
           m_logger = logger;
   
           verbose( "bl size : " + bl.size() );
  @@ -65,11 +68,19 @@
       // LogEnabled
       //=============================================================
    
  +   /**
  +    * Set the logging channel.
  +    * @param logger the logging channel
  +    */
       public void enableLogging( Logger logger )
       {
           m_logger = logger;
       }
   
  +   /**
  +    * Return the loging channel.
  +    * @return Logger the logging channel
  +    */
       protected Logger getLogger() 
       {
           return m_logger;
  @@ -81,8 +92,8 @@
   
       /**
        * This operation returns the next binding. 
  -     * 
  -     * @return If there are no more bindings, false is returned.
  +     * @param b binding holder
  +     * @return boolean If there are no more bindings, false is returned.
        */
       public boolean next_one( org.omg.CosNaming.BindingHolder b )
       {
  @@ -92,7 +103,7 @@
           try
           {
   
  -            b.value = ( org.omg.CosNaming.Binding ) _bl.nextElement();
  +            b.value = ( org.omg.CosNaming.Binding ) m_bindingList.nextElement();
   
               return true;
           }
  @@ -109,16 +120,21 @@
   
       /**
        * This operation returns at most the requested number of bindings.
  +     * @param count the request number of bindings
  +     * @param bl binding list holder
  +     * @return boolean if more bindings remain
        */
  -    public boolean next_n( int how_many, org.omg.CosNaming.BindingListHolder bl )
  +    public boolean next_n( int count, org.omg.CosNaming.BindingListHolder bl )
       {
   
           verbose( "next_n" );
  -        verbose( "how_many : " + how_many );
  -        int max = how_many;
  +        verbose( "count : " + count );
  +        int max = count;
   
           if ( max == 0 )
  +        {
               return false;
  +        }
   
           java.util.Vector bindings = new java.util.Vector();
   
  @@ -140,13 +156,18 @@
                   }
   
                   if ( bindings.size() == 0 )
  +                {
                       return false;
  +                }
                   else
  +                {
                       return true;
  +                }
               }
               else
  +            {
                   bindings.addElement( bh.value );
  -
  +            }
           }
   
   
  @@ -154,7 +175,8 @@
   
           for ( int k = 0; k < bindings.size() ; k++ )
           {
  -            bl.value[ k ] = ( org.omg.CosNaming.Binding ) bindings.elementAt( k );
  +            bl.value[ k ] = ( org.omg.CosNaming.Binding ) 
  +              bindings.elementAt( k );
           }
   
           return true;
  @@ -184,8 +206,11 @@
        */
       private void verbose( String message )
       {
  -        if ( getLogger().isDebugEnabled() ) getLogger().debug(
  -            "[ ITERATOR " + message + " ]" );
  +        if ( getLogger().isDebugEnabled() ) 
  +        {
  +            getLogger().debug(
  +              "[ ITERATOR " + message + " ]" );
  +        }
       }
   
   }
  
  
  
  1.2       +31 -21    jakarta-avalon-apps/enterprise/ins/src/java/org/apache/ins/CallbackManagerImpl.java
  
  Index: CallbackManagerImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/ins/src/java/org/apache/ins/CallbackManagerImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CallbackManagerImpl.java	13 Mar 2002 09:18:35 -0000	1.1
  +++ CallbackManagerImpl.java	14 May 2002 09:00:01 -0000	1.2
  @@ -7,7 +7,7 @@
    *
    * Original contribution Copyright 2000 (C) Intalio Inc. All Rights Reserved.
   *
  -* $Id: CallbackManagerImpl.java,v 1.1 2002/03/13 09:18:35 mcconnell Exp $
  +* $Id: CallbackManagerImpl.java,v 1.2 2002/05/14 09:00:01 mcconnell Exp $
   *
   * Date         Author  Changes
   */
  @@ -18,7 +18,7 @@
    * This class implements the NS Callback Manager.
    * 
    * @author <a href="mailto:mdaniel@intalio.com">Marina Daniel &lt;mdaniel@intalio.com&gt;</a>
  - * @version $Revision: 1.1 $ $Date: 2002/03/13 09:18:35 $ 
  + * @version $Revision: 1.2 $ $Date: 2002/05/14 09:00:01 $ 
    */
   
   public class CallbackManagerImpl extends org.apache.ins.callback.CallbackManagerPOA
  @@ -26,70 +26,80 @@
       /**
        * Callback list
        */
  -    private java.util.Vector _callback;
  +    private java.util.Vector m_callback;
   
  +   /**
  +    * Creation of a new callback manager.
  +    */
       public CallbackManagerImpl()
       {
  -        _callback = new java.util.Vector();
  +        m_callback = new java.util.Vector();
       }
   
       /**
        * Add a callback
  +     * @param callback value
        */
       public void add_callback( org.apache.ins.callback.Callback callback )
       {
  -        _callback.addElement( callback );
  +        m_callback.addElement( callback );
       }
   
       /**
        * Remove a callback
  +     * @param callback value
        */
       public void remove_callback( org.apache.ins.callback.Callback callback )
       {
  -        _callback.removeElement( callback );
  +        m_callback.removeElement( callback );
       }
   
       /**
        * Report an object event to listener
  +     * @param name name component
  +     * @param event the event
  +     * @param obj the object
        */
       public void report_object_event( org.omg.CosNaming.NameComponent [] name,
  -                                     org.apache.ins.callback.EventType event,
  -                                     org.omg.CORBA.Object obj )
  +      org.apache.ins.callback.EventType event,
  +      org.omg.CORBA.Object obj )
       {
  -        for ( int i = 0; i < _callback.size(); i++ )
  +        for ( int i = 0; i < m_callback.size(); i++ )
           {
               try
               {
  -                org.apache.ins.callback.Callback callback = ( org.apache.ins.callback.Callback ) _callback.elementAt( i );
  +                org.apache.ins.callback.Callback callback = 
  +                 ( org.apache.ins.callback.Callback ) m_callback.elementAt( i );
   
                   callback.object_event( name, event, obj );
               }
               catch ( org.omg.CORBA.SystemException ex )
  -            { }
  -
  +            { 
  +            }
           }
  -
       }
   
       /**
        * Report a naming context event to listener
  +     * @param name name component
  +     * @param event the event
        */
  -    public void report_naming_context_event( org.omg.CosNaming.NameComponent [] name,
  -            org.apache.ins.callback.EventType event )
  +    public void report_naming_context_event( 
  +       org.omg.CosNaming.NameComponent [] name,
  +       org.apache.ins.callback.EventType event )
       {
  -        for ( int i = 0; i < _callback.size(); i++ )
  +        for ( int i = 0; i < m_callback.size(); i++ )
           {
               try
               {
  -                org.apache.ins.callback.Callback callback = ( org.apache.ins.callback.Callback ) _callback.elementAt( i );
  -
  +                org.apache.ins.callback.Callback callback = 
  +                  ( org.apache.ins.callback.Callback ) m_callback.elementAt( i );
                   callback.naming_context_event( name, event );
               }
               catch ( org.omg.CORBA.SystemException ex )
  -            { }
  -
  +            { 
  +            }
           }
  -
       }
   
   }
  
  
  
  1.2       +14 -9     jakarta-avalon-apps/enterprise/ins/src/java/org/apache/ins/CallbackRegistration.java
  
  Index: CallbackRegistration.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/ins/src/java/org/apache/ins/CallbackRegistration.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CallbackRegistration.java	13 Mar 2002 09:18:35 -0000	1.1
  +++ CallbackRegistration.java	14 May 2002 09:00:01 -0000	1.2
  @@ -7,7 +7,7 @@
    *
    * Original contribution Copyright 2000 (C) Intalio Inc. All Rights Reserved.
   *
  -* $Id: CallbackRegistration.java,v 1.1 2002/03/13 09:18:35 mcconnell Exp $
  +* $Id: CallbackRegistration.java,v 1.2 2002/05/14 09:00:01 mcconnell Exp $
   *
   * Date         Author  Changes
   */
  @@ -18,23 +18,23 @@
    * This class initializes the callback manager in a specific thread
    * 
    * @author <a href="mailto:mdaniel@intalio.com">Marina Daniel &lt;mdaniel@intalio.com&gt;</a>
  - * @version $Revision: 1.1 $ $Date: 2002/03/13 09:18:35 $ 
  + * @version $Revision: 1.2 $ $Date: 2002/05/14 09:00:01 $ 
    */
  -
   public class CallbackRegistration extends java.lang.Thread
   {
   
       /**
        * The reference to the callback manager
        */
  -    private org.apache.ins.callback.CallbackManager callback;
  +    private org.apache.ins.callback.CallbackManager m_callback;
   
       /**
        * Constructor
  +     * @param callback the callback
        */
       public CallbackRegistration( org.apache.ins.callback.CallbackManager callback )
       {
  -        this.callback = callback;
  +        m_callback = callback;
       }
   
       /**
  @@ -48,7 +48,8 @@
       }
   
       /**
  -     * register the callback manager into the Naming Context COS/NamingService/CallbackManager.
  +     * register the callback manager into the Naming Context 
  +     * COS/NamingService/CallbackManager.
        */
       private void registration()
       {
  @@ -62,14 +63,18 @@
           }
           catch( org.omg.CORBA.ORBPackage.InvalidName ex )
           {
  -            System.out.println( "A NameService has not been registerd with the ORB. Try passing the following parameter to this app:" );
  -            System.out.println( "java org.openorb.ccs.Server -ORBInitRef NameService=corbaloc::HOST:PORT/NameService" );
  +            System.out.println( 
  +               "A NameService has not been registerd with the ORB. "
  +               + "Try passing the following parameter to this app:" );
  +            System.out.println( 
  +               "java org.openorb.ccs.Server -ORBInitRef " 
  +               + "NameService=corbaloc::HOST:PORT/NameService" );
               System.exit( -1 );
           }
   
           try
           {
  -            nc.rebind( nc.to_name( "COS/NamingService/CallbackManager" ), callback );
  +            nc.rebind( nc.to_name( "COS/NamingService/CallbackManager" ), m_callback );
           }
           catch( Exception ex )
           {
  
  
  
  1.2       +296 -179  jakarta-avalon-apps/enterprise/ins/src/java/org/apache/ins/NamingContextExImpl.java
  
  Index: NamingContextExImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/ins/src/java/org/apache/ins/NamingContextExImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NamingContextExImpl.java	13 Mar 2002 09:18:35 -0000	1.1
  +++ NamingContextExImpl.java	14 May 2002 09:00:01 -0000	1.2
  @@ -7,7 +7,7 @@
    *
    * Original contribution Copyright 2000 (C) Intalio Inc. All Rights Reserved.
   *
  -* $Id: NamingContextExImpl.java,v 1.1 2002/03/13 09:18:35 mcconnell Exp $
  +* $Id: NamingContextExImpl.java,v 1.2 2002/05/14 09:00:01 mcconnell Exp $
   *
   * Date         Author  Changes
   */
  @@ -22,9 +22,9 @@
    * This class is the implementation of the NamingContextExt.
    *
    * @author <a href="mailto:mdaniel@intalio.com">Marina Daniel &lt;mdaniel@intalio.com&gt;</a>
  - * @version $Revision: 1.1 $ $Date: 2002/03/13 09:18:35 $ 
  + * @author <a href="mailto:mcconnell@osm.net">Stephen McConnell &lt;mcconnell@osm.net&gt;</a>
  + * @version $Revision: 1.2 $ $Date: 2002/05/14 09:00:01 $ 
    */
  -
   public class NamingContextExImpl extends org.omg.CosNaming.NamingContextExtPOA
       implements LogEnabled
   {
  @@ -32,35 +32,35 @@
       /**
        * The reference to the orb
        */
  -    private org.omg.CORBA.ORB _orb;
  +    private org.omg.CORBA.ORB m_orb;
   
       /**
        * The reference to the callback manager
        */
  -    private org.apache.ins.CallbackManagerImpl _callback;
  +    private org.apache.ins.CallbackManagerImpl m_callback;
   
       /**
        * the reference to the NamingContext factory to create and find persistent NamingContext
        */
  -    private namingPersistence.NamingContextHome _nc_home;
  +    private namingPersistence.NamingContextHome m_ncHome;
   
       /**
        * the reference to the NamingObject factory to create and find persistent NamingObject
        */
  -    private namingPersistence.NamingObjectHome _no_home;
  +    private namingPersistence.NamingObjectHome m_noHome;
   
       /**
  -     * The reference to the ProxyNamingContext factory to create and find persistent ProxyNamingContext
  +     * The reference to the ProxyNamingContext factory to create and find 
  +     * persistent ProxyNamingContext
        */
  -    private namingPersistence.ProxyNamingContextHome _pnc_home;
  +    private namingPersistence.ProxyNamingContextHome m_pncHome;
   
  -    public static boolean _shutdown = false;
  +    private static boolean c_shutdown = false;  // changed from _shutdown to c_shutdown + private
   
  -    public namingPersistence.NamingContext nc_root;
  +    private namingPersistence.NamingContext m_root; // changed from nc_root to m_root + private
   
       private Logger m_logger;
   
  -
       /**
        * Constructor
        */
  @@ -70,11 +70,11 @@
         namingPersistence.NamingObjectHome no_home,
         namingPersistence.ProxyNamingContextHome pnc_home )
       {
  -        _orb = orb;
  -        _callback = callback;
  -        _nc_home = nc_home;
  -        _no_home = no_home;
  -        _pnc_home = pnc_home;
  +        m_orb = orb;
  +        m_callback = callback;
  +        m_ncHome = nc_home;
  +        m_noHome = no_home;
  +        m_pncHome = pnc_home;
       }
   
       //=============================================================
  @@ -122,11 +122,15 @@
        *        an argument.
        */
       public void bind( org.omg.CosNaming.NameComponent[] n, org.omg.CORBA.Object obj )
  -    throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName, org.omg.CosNaming.NamingContextPackage.AlreadyBound
  +    throws org.omg.CosNaming.NamingContextPackage.NotFound,       org.omg.CosNaming.NamingContextPackage.CannotProceed, 
  +      org.omg.CosNaming.NamingContextPackage.InvalidName, 
  +      org.omg.CosNaming.NamingContextPackage.AlreadyBound
       {
   
           if ( n.length == 0 )
  +        {
               throw new org.omg.CosNaming.NamingContextPackage.InvalidName();
  +        }
   
           verbose( "\nBind an object ( " + n[ n.length - 1 ].id + " )" );
   
  @@ -134,7 +138,8 @@
           // get the complete component name of the object
           org.omg.CosNaming.NameComponent[] componentName = getNameComponent( n );
   
  -        String componentName_str = org.openorb.util.NamingUtils.to_string ( componentName );
  +        String componentName_str = org.openorb.util.NamingUtils.to_string ( 
  +          componentName );
   
           verbose( "componentName :" + componentName_str );
   
  @@ -142,7 +147,8 @@
           {
   
               // search whether the persistent naming object already exists
  -            namingPersistence.NamingObject no = _no_home.find_by_componentName( componentName_str );
  +            namingPersistence.NamingObject no = m_noHome.find_by_componentName( 
  +              componentName_str );
               verbose( " NamingObject already bound " + componentName_str );
               throw new org.omg.CosNaming.NamingContextPackage.AlreadyBound();
   
  @@ -151,14 +157,16 @@
           {
   
               // create the persistent naming object
  -            namingPersistence.NamingObject no = ( ( NamingObjectHome ) _no_home ).create( componentName_str, obj );
  +            namingPersistence.NamingObject no = 
  +              ( ( NamingObjectHome ) m_noHome ).create( componentName_str, obj );
   
               // add the object to the children list of its parent
               addNamingObject ( componentName );
   
               // Report event...
   
  -            _callback.report_object_event( getPath ( componentName ), org.apache.ins.callback.EventType.ADD, obj );
  +            m_callback.report_object_event( 
  +               getPath ( componentName ), org.apache.ins.callback.EventType.ADD, obj );
           }
   
       }
  @@ -191,18 +199,22 @@
        *        an argument.
        */
       public void rebind( org.omg.CosNaming.NameComponent[] n, org.omg.CORBA.Object obj )
  -    throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
  +    throws org.omg.CosNaming.NamingContextPackage.NotFound, 
  +      org.omg.CosNaming.NamingContextPackage.CannotProceed, 
  +      org.omg.CosNaming.NamingContextPackage.InvalidName
       {
   
           if ( n.length == 0 )
  +        {
               throw new org.omg.CosNaming.NamingContextPackage.InvalidName();
  -
  +        }
           verbose( "\nRebind an object ( " + n[ n.length - 1 ].id + " )" );
   
           // get the complete componentName of the object to bind
           org.omg.CosNaming.NameComponent[] componentName = getNameComponent( n );
   
  -        String componentName_str = org.openorb.util.NamingUtils.to_string ( componentName );
  +        String componentName_str = org.openorb.util.NamingUtils.to_string ( 
  +          componentName );
   
           verbose( "componentName : " + componentName_str );
   
  @@ -210,7 +222,8 @@
           {
   
               // search whether the persistent naming object already exists
  -            namingPersistence.NamingObject no = _no_home.find_by_componentName( componentName_str );
  +            namingPersistence.NamingObject no = m_noHome.find_by_componentName( 
  +              componentName_str );
               verbose( " NamingObject already exist " + componentName_str );
               no.namingObj ( obj );
   
  @@ -218,14 +231,17 @@
           catch ( org.omg.CosPersistentState.NotFound ex )
           {
               // create the persistent naming object
  -            namingPersistence.NamingObject namingObject = _no_home.create( componentName_str, obj );
  +            namingPersistence.NamingObject namingObject = m_noHome.create( 
  +              componentName_str, obj );
   
               // add the object to the children list of its parent
               addNamingObject ( componentName );
           }
   
           // Report event...
  -        _callback.report_object_event( getPath ( componentName ), org.apache.ins.callback.EventType.UPDATE, obj ); // Modified 9/12/00
  +        m_callback.report_object_event( 
  +           getPath ( componentName ), 
  +           org.apache.ins.callback.EventType.UPDATE, obj ); // Modified 9/12/00
       }
   
   
  @@ -235,7 +251,7 @@
        * when compound names are passed to be resolved.
        *
        * @param n The compound name for the naming context to bind
  -     * @param obj The naming context to bind 
  +     * @param nc The naming context to bind 
        *
        * @exception NotFound  Indicates the name does not identify a binding.
        * @exception CannotProceed Indicates that the implementation has
  @@ -254,8 +270,12 @@
        *        name and rebind the name to the object passed as
        *        an argument.
        */
  -    public void bind_context( org.omg.CosNaming.NameComponent[] n, org.omg.CosNaming.NamingContext nc )
  -    throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName, org.omg.CosNaming.NamingContextPackage.AlreadyBound
  +    public void bind_context( org.omg.CosNaming.NameComponent[] n, 
  +       org.omg.CosNaming.NamingContext nc )
  +    throws org.omg.CosNaming.NamingContextPackage.NotFound, 
  +       org.omg.CosNaming.NamingContextPackage.CannotProceed, 
  +       org.omg.CosNaming.NamingContextPackage.InvalidName, 
  +       org.omg.CosNaming.NamingContextPackage.AlreadyBound
       {
   
           if ( n.length == 0 )
  @@ -280,7 +300,8 @@
               try
               {
                   // search whether the Naming context already exists
  -                namingPersistence.NamingContext namingContext = _nc_home.find_by_componentName( componentName_str );
  +                namingPersistence.NamingContext namingContext = 
  +                 m_ncHome.find_by_componentName( componentName_str );
                   verbose ( " NamingContext already exist " + componentName_str );
                   throw new org.omg.CosNaming.NamingContextPackage.AlreadyBound();
   
  @@ -292,7 +313,8 @@
                   {
                       // set the nameComponent to the namingContext
                       byte[] id = _poa().reference_to_id( nc );
  -                    namingPersistence.NamingContext namingContext = getNamingContext( id );
  +                    namingPersistence.NamingContext namingContext = 
  +                      getNamingContext( id );
                       namingContext.componentName ( componentName_str );
   
                       // add the naming context to its parent
  @@ -306,7 +328,6 @@
                   {
                       p.printStackTrace();
                   }
  -
               }
           }
           else
  @@ -315,15 +336,15 @@
               try
               {
                   // search whether the ProxyNamingContext already exists
  -                namingPersistence.ProxyNamingContext no = _pnc_home.find_by_componentName( componentName_str );
  +                namingPersistence.ProxyNamingContext no = 
  +                 m_pncHome.find_by_componentName( componentName_str );
                   verbose( " ProxyNamingContext already exist : " + componentName_str );
                   throw new org.omg.CosNaming.NamingContextPackage.AlreadyBound();
               }
               catch ( org.omg.CosPersistentState.NotFound ex )
               {
  -
                   // create the ProxyNamingContext
  -                _pnc_home.create( componentName_str , nc );
  +                m_pncHome.create( componentName_str , nc );
                   // add the Proxy Naming Context to its parent.
                   addProxyNamingContext ( componentName );
               }
  @@ -332,7 +353,8 @@
           // Report event...
           verbose( "CALLBACK BIND" );
   
  -        _callback.report_naming_context_event( getPath ( componentName ) , org.apache.ins.callback.EventType.ADD );
  +        m_callback.report_naming_context_event( 
  +          getPath ( componentName ) , org.apache.ins.callback.EventType.ADD );
       }
   
       /**
  @@ -342,7 +364,7 @@
        * name resolution when compound names are passed to be resolved.
        *
        * @param n The compound name for the naming context to rebind
  -     * @param obj The naming context to rebind   
  +     * @param nc The naming context to rebind   
        *
        * @exception NotFound  Indicates the name does not identify a binding.
        * @exception CannotProceed Indicates that the implementation has
  @@ -361,8 +383,11 @@
        *        name and rebind the name to the object passed as
        *        an argument.
        */
  -    public void rebind_context( org.omg.CosNaming.NameComponent[] n, org.omg.CosNaming.NamingContext nc )
  -    throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
  +    public void rebind_context( org.omg.CosNaming.NameComponent[] n, 
  +        org.omg.CosNaming.NamingContext nc )
  +    throws org.omg.CosNaming.NamingContextPackage.NotFound, 
  +      org.omg.CosNaming.NamingContextPackage.CannotProceed, 
  +      org.omg.CosNaming.NamingContextPackage.InvalidName
       {
           if ( n.length == 0 )
               throw new org.omg.CosNaming.NamingContextPackage.InvalidName();
  @@ -382,14 +407,16 @@
               try
               {
                   // search whether the Naming context already exists
  -                namingPersistence.NamingContext namingContext = _nc_home.find_by_componentName( componentName_str );
  +                namingPersistence.NamingContext namingContext = 
  +                  m_ncHome.find_by_componentName( componentName_str );
                   verbose ( " NamingContext already exist " + componentName_str );
                   // if a naming context already exist, it must be unbound.
                   unbind( n );
   
               }
               catch ( org.omg.CosPersistentState.NotFound ex )
  -            {}
  +            {
  +            }
   
               try
               {
  @@ -398,10 +425,10 @@
                   namingPersistence.NamingContext namingContext = getNamingContext( id );
                   // case of a rebind of a Naming Context that is already bound somewhere else.
                   if ( !namingContext.componentName().equals( "" ) )
  +                {
                       throw new org.omg.CosNaming.NamingContextPackage.CannotProceed( nc, n );
  -
  +                }
                   namingContext.componentName ( componentName_str );
  -
                   addNamingContext ( componentName );
               }
               catch ( org.omg.PortableServer.POAPackage.WrongAdapter e )
  @@ -412,19 +439,18 @@
               {
                   p.printStackTrace();
               }
  -
           }
           else
           {
  -
               // create the Proxy naming context
  -            _pnc_home.create( componentName_str , nc );
  +            m_pncHome.create( componentName_str , nc );
               // add the Proxy Naming Context to its parent.
               addProxyNamingContext ( componentName );
           }
   
           // Report event...
  -        _callback.report_naming_context_event( getPath ( componentName ) , org.apache.ins.callback.EventType.UPDATE );
  +        m_callback.report_naming_context_event( 
  +          getPath ( componentName ) , org.apache.ins.callback.EventType.UPDATE );
       }
   
       /**
  @@ -443,24 +469,29 @@
        *        other restrictions on names.)
        */
       public org.omg.CORBA.Object resolve( org.omg.CosNaming.NameComponent[] n )
  -    throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
  +    throws org.omg.CosNaming.NamingContextPackage.NotFound, 
  +       org.omg.CosNaming.NamingContextPackage.CannotProceed, 
  +       org.omg.CosNaming.NamingContextPackage.InvalidName
       {
   
           if ( n.length == 0 )
  +        {
               throw new org.omg.CosNaming.NamingContextPackage.InvalidName();
  -
  +        }
           verbose( "Resolve an object ( " + n[ n.length - 1 ].id + " )" );
   
           // get the complete componentName of the persistent naming object to resolve
           org.omg.CosNaming.NameComponent[] componentName = getNameComponent( n );
   
  -        String componentName_str = org.openorb.util.NamingUtils.to_string ( componentName );
  +        String componentName_str = org.openorb.util.NamingUtils.to_string ( 
  +          componentName );
   
           verbose( "componentName : " + componentName_str );
   
           try
           {
  -            namingPersistence.NamingObject no = _no_home.find_by_componentName( componentName_str );
  +            namingPersistence.NamingObject no = m_noHome.find_by_componentName( 
  +              componentName_str );
               return no.namingObj();
   
           }
  @@ -468,25 +499,26 @@
           {
               try
               {
  -                namingPersistence.NamingContext nc = _nc_home.find_by_componentName( componentName_str );
  +                namingPersistence.NamingContext nc = m_ncHome.find_by_componentName( 
  +                  componentName_str );
                   return createReference( nc );
               }
               catch ( org.omg.CosPersistentState.NotFound ex )
               {
                   try
                   {
  -                    namingPersistence.ProxyNamingContext pnc = _pnc_home.find_by_componentName ( componentName_str );
  +                    namingPersistence.ProxyNamingContext pnc = 
  +                     m_pncHome.find_by_componentName ( componentName_str );
                       return pnc.ctx();
                   }
                   catch ( org.omg.CosPersistentState.NotFound nf )
                   {
  -
                       verbose( " Object not found " + componentName_str );
  -                    throw new org.omg.CosNaming.NamingContextPackage.NotFound( org.omg.CosNaming.NamingContextPackage.NotFoundReason.missing_node, n );
  +                    throw new org.omg.CosNaming.NamingContextPackage.NotFound( 
  +                      org.omg.CosNaming.NamingContextPackage.NotFoundReason.missing_node, n );
                   }
               }
           }
  -
       }
   
       /**
  @@ -505,11 +537,14 @@
        *        other restrictions on names.)
        */
       public void unbind( org.omg.CosNaming.NameComponent[] n )
  -    throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
  +    throws org.omg.CosNaming.NamingContextPackage.NotFound, 
  +      org.omg.CosNaming.NamingContextPackage.CannotProceed, 
  +      org.omg.CosNaming.NamingContextPackage.InvalidName
       {
           if ( n.length == 0 )
  +        {
               throw new org.omg.CosNaming.NamingContextPackage.InvalidName();
  -
  +        }
           verbose( "Unbind ( " + n[ n.length - 1 ].id + " )" );
   
           // get the complete component Name of the naming object to unbind
  @@ -523,7 +558,8 @@
           {
   
               // find if the node to unbind is a NamingContext
  -            namingPersistence.NamingContext nc = _nc_home.find_by_componentName( componentName_str );
  +            namingPersistence.NamingContext nc = 
  +              m_ncHome.find_by_componentName( componentName_str );
               verbose( "unbind the namingContext : " + componentName_str );
   
               // remove the naming context from the children list of its parent
  @@ -531,7 +567,8 @@
               nc.componentName( "" );
   
               //report event
  -            _callback.report_naming_context_event( getPath ( componentName ) , org.apache.ins.callback.EventType.REMOVE );
  +            m_callback.report_naming_context_event( 
  +              getPath ( componentName ) , org.apache.ins.callback.EventType.REMOVE );
           }
           catch ( org.omg.CosPersistentState.NotFound ex )
           {
  @@ -539,7 +576,8 @@
               try
               {
                   // find if the node to unbind is a ProxyNamingContext
  -                namingPersistence.ProxyNamingContext pnc = _pnc_home.find_by_componentName( componentName_str );
  +                namingPersistence.ProxyNamingContext pnc = 
  +                 m_pncHome.find_by_componentName( componentName_str );
                   verbose( "unbind the ProxyNamingContext : " + componentName_str );
   
                   // remove the proxy naming context from the children list of its parent
  @@ -547,7 +585,8 @@
                   pnc.destroy_object();
   
                   //report event
  -                _callback.report_naming_context_event( getPath ( componentName ) , org.apache.ins.callback.EventType.REMOVE );
  +                m_callback.report_naming_context_event( 
  +                  getPath ( componentName ) , org.apache.ins.callback.EventType.REMOVE );
   
               }
               catch ( org.omg.CosPersistentState.NotFound e )
  @@ -557,7 +596,8 @@
                   {
   
                       // find if the node to unbind is a naming object
  -                    namingPersistence.NamingObject no = _no_home.find_by_componentName( componentName_str );
  +                    namingPersistence.NamingObject no = 
  +                      m_noHome.find_by_componentName( componentName_str );
                       verbose( "unbind the naming object : " + componentName_str );
   
                       // remove the naming object from the children list of its parent
  @@ -565,12 +605,14 @@
                       no.destroy_object();
   
                       //report event
  -                    _callback.report_naming_context_event( getPath ( componentName ), org.apache.ins.callback.EventType.REMOVE );
  +                    m_callback.report_naming_context_event( 
  +                       getPath ( componentName ), org.apache.ins.callback.EventType.REMOVE );
                   }
                   catch ( org.omg.CosPersistentState.NotFound e2 )
                   {
                       verbose( " node not found : " + componentName_str );
  -                    throw new org.omg.CosNaming.NamingContextPackage.NotFound( org.omg.CosNaming.NamingContextPackage.NotFoundReason.not_context, n );
  +                    throw new org.omg.CosNaming.NamingContextPackage.NotFound( 
  +                      org.omg.CosNaming.NamingContextPackage.NotFoundReason.not_context, n );
                   }
               }
   
  @@ -590,11 +632,15 @@
       {
           verbose( "Create a new context" );
   
  -        namingPersistence.NamingContextRef[] nc_children = new namingPersistence.NamingContextRef[ 0 ];
  -        namingPersistence.NamingObjectRef[] no_children = new namingPersistence.NamingObjectRef[ 0 ];
  -        namingPersistence.ProxyNamingContextRef[] pnc_children = new namingPersistence.ProxyNamingContextRef[ 0 ];
  +        namingPersistence.NamingContextRef[] nc_children = 
  +           new namingPersistence.NamingContextRef[ 0 ];
  +        namingPersistence.NamingObjectRef[] no_children = 
  +           new namingPersistence.NamingObjectRef[ 0 ];
  +        namingPersistence.ProxyNamingContextRef[] pnc_children = 
  +           new namingPersistence.ProxyNamingContextRef[ 0 ];
   
  -        namingPersistence.NamingContext newNamingContext = _nc_home.create( "", nc_children, no_children, pnc_children );
  +        namingPersistence.NamingContext newNamingContext = 
  +           m_ncHome.create( "", nc_children, no_children, pnc_children );
           return createReference( newNamingContext );
   
       }
  @@ -620,13 +666,18 @@
        *        the specified name. Only one object can be bound
        *        to a particular name in a context.
        */
  -    public org.omg.CosNaming.NamingContext bind_new_context( org.omg.CosNaming.NameComponent[] n )
  -    throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.AlreadyBound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
  +    public org.omg.CosNaming.NamingContext bind_new_context( 
  +      org.omg.CosNaming.NameComponent[] n )
  +    throws org.omg.CosNaming.NamingContextPackage.NotFound, 
  +      org.omg.CosNaming.NamingContextPackage.AlreadyBound, 
  +      org.omg.CosNaming.NamingContextPackage.CannotProceed,
  +      org.omg.CosNaming.NamingContextPackage.InvalidName
       {
   
           if ( n.length == 0 )
  +        {
               throw new org.omg.CosNaming.NamingContextPackage.InvalidName();
  -
  +        }
           verbose( "bind_new_context : " + org.openorb.util.NamingUtils.to_string( n ) );
   
           org.omg.CosNaming.NamingContext nc = new_context();
  @@ -655,9 +706,9 @@
               // Case of a destroy action on the root naming context
               nc = getNamingContext();
   
  -            if ( nc.equals ( nc_root ) )
  +            if ( nc.equals ( m_root ) )
               {
  -                if ( _shutdown )
  +                if ( c_shutdown )
                   {
                       _orb().shutdown ( false );
                       return ;
  @@ -674,7 +725,8 @@
   
               ProxyNamingContextRef[] pnc_children = nc.pnc_children();
   
  -            if ( ( nc_children.length == 0 ) && ( no_children.length == 0 ) && ( pnc_children.length == 0 ) )
  +            if ( ( nc_children.length == 0 ) && ( no_children.length == 0 ) 
  +              && ( pnc_children.length == 0 ) )
               {
   
                   // if the Naming Context is not empty
  @@ -693,7 +745,6 @@
                       return ;
                   }
   
  -
                   // remove the reference of the Naming context from the list of children of the parent
                   removeNamingContext ( componentName );
   
  @@ -701,19 +752,20 @@
                   nc.destroy_object();
   
                   //Report event ...
  -                org.omg.CosNaming.NameComponent[] path = new org.omg.CosNaming.NameComponent[ componentName.length - 1 ];
  +                org.omg.CosNaming.NameComponent[] path = 
  +                  new org.omg.CosNaming.NameComponent[ componentName.length - 1 ];
   
                   for ( int k = 1; k < componentName.length ; k++ )
                   {
                       path[ k - 1 ] = componentName[ k ];
                   }
   
  -                _callback.report_naming_context_event( path, org.apache.ins.callback.EventType.REMOVE );
  +                m_callback.report_naming_context_event( 
  +                   path, org.apache.ins.callback.EventType.REMOVE );
               }
               else
               {
                   throw new org.omg.CosNaming.NamingContextPackage.NotEmpty();
  -
               }
   
           }
  @@ -737,7 +789,8 @@
   
                   try
                   {
  -                    componentName = org.openorb.util.NamingUtils.to_name( componentName_str );
  +                    componentName = org.openorb.util.NamingUtils.to_name( 
  +                      componentName_str );
                   }
                   catch ( org.omg.CosNaming.NamingContextPackage.InvalidName in )
                   {
  @@ -745,25 +798,22 @@
                       return ;
                   }
   
  -                _callback.report_naming_context_event( getPath ( componentName ) , org.apache.ins.callback.EventType.REMOVE );
  +                m_callback.report_naming_context_event( 
  +                   getPath ( componentName ) , org.apache.ins.callback.EventType.REMOVE );
               }
               catch ( org.omg.CosNaming.NamingContextPackage.NotFound ex )
               {
                   System.out.println( " Binding not found ! " );
                   return ;
               }
  -
           }
  -
  -
  -
       }
   
       /**
        * The list operation allows a client to iterate through a set of
        * bindings in a naming context.
        *
  -     * @param how_many Maximum number of elements into the binding list.
  +     * @param count Maximum number of elements into the binding list.
        * @param bl This parameter returns a list that contains all node of
        *             the naming context
        * @param bi This parameter returns a binding iterator to iterate in
  @@ -776,7 +826,8 @@
        *    naming context does not contain additional bindings, the
        *    binding iterator is a nil object reference.
        */
  -    public void list( int how_many, org.omg.CosNaming.BindingListHolder bl, org.omg.CosNaming.BindingIteratorHolder bi )
  +    public void list( int count, org.omg.CosNaming.BindingListHolder bl, 
  +       org.omg.CosNaming.BindingIteratorHolder bi )
       {
   
           verbose( "List all objects" );
  @@ -810,29 +861,36 @@
   
               namingPersistence.NamingObjectRef child = no_children[ i ];
   
  -            namingPersistence.NamingObject namingObject = ( namingPersistence.NamingObject ) child.deref();
  +            namingPersistence.NamingObject namingObject = ( 
  +              namingPersistence.NamingObject ) child.deref();
   
               bindings[ i ] = getBinding ( namingObject );
           }
   
           for ( int i = 0; i < nc_children.length; i++ )
           {
  -            namingPersistence.NamingContext namingContext = ( namingPersistence.NamingContext ) nc_children[ i ].deref();
  +            namingPersistence.NamingContext namingContext = ( 
  +              namingPersistence.NamingContext ) nc_children[ i ].deref();
               bindings[ i + no_children.length ] = getBinding ( namingContext );
           }
   
           for ( int i = 0; i < pnc_children.length; i++ )
           {
  -            namingPersistence.ProxyNamingContext proxyNamingContext = ( namingPersistence.ProxyNamingContext ) pnc_children[ i ].deref();
  +            namingPersistence.ProxyNamingContext proxyNamingContext = ( 
  +              namingPersistence.ProxyNamingContext ) pnc_children[ i ].deref();
               bindings[ i - pnc_children.length ] = getBinding ( proxyNamingContext );
           }
   
   
   
  -        if ( bindings_size < how_many )
  +        if ( bindings_size < count )
  +        {
               max = bindings_size;
  +        }
           else
  -            max = how_many;
  +        {
  +            max = count;
  +        }
   
           verbose( "max : " + max );
   
  @@ -843,29 +901,27 @@
               bl.value[ k ] = bindings[ k ];
           }
   
  -        verbose( "how_many : " + how_many );
  +        verbose( "how_many : " + count );
           verbose( "bindings_size : " + bindings_size );
   
  -        if ( how_many < bindings_size )
  +        if ( count < bindings_size )
           {
               java.util.Vector next = new java.util.Vector();
   
  -            for ( int i = how_many; i < bindings_size; i++ )
  +            for ( int i = count; i < bindings_size; i++ )
               {
                   next.addElement( bindings[ i ] );
               }
   
               verbose( " next size : " + next.size() );
  -            BindingIteratorImpl b = new BindingIteratorImpl( _orb, next, getLogger() );
  +            BindingIteratorImpl b = new BindingIteratorImpl( m_orb, next, getLogger() );
               bi.value = b._this();
           }
           else
           {
  -
  -            bi.value = new BindingIteratorImpl ( _orb, new java.util.Vector(), getLogger() )._this();
  -
  +            bi.value = new BindingIteratorImpl( 
  +              m_orb, new java.util.Vector(), getLogger() )._this();
           }
  -
       }
   
   
  @@ -879,7 +935,6 @@
       public java.lang.String to_string( org.omg.CosNaming.NameComponent[] n )
       throws org.omg.CosNaming.NamingContextPackage.InvalidName
       {
  -
           return org.openorb.util.NamingUtils.to_string ( n );
       }
   
  @@ -907,7 +962,7 @@
        *
        * @param  addr the address ( for example myhost.xyz.com )
        * @param  sn  the stringified name to add to the URL
  -     * @return  the URL string format.
  +     * @return String the URL string format.
        *
        * @exception InvalidAddress This exception is raises if a address
        *                is invalid ( it means that the address does not
  @@ -917,10 +972,10 @@
        *         violates an implementation limit.
        */
       public java.lang.String to_url( java.lang.String addr, java.lang.String sn )
  -    throws org.omg.CosNaming.NamingContextExtPackage.InvalidAddress, org.omg.CosNaming.NamingContextPackage.InvalidName
  +    throws org.omg.CosNaming.NamingContextExtPackage.InvalidAddress, 
  +      org.omg.CosNaming.NamingContextPackage.InvalidName
       {
           verbose( "Get an URL" );
  -
           return org.openorb.util.NamingUtils.to_url( addr, sn );
       }
   
  @@ -929,8 +984,8 @@
        * same manner as NamingContext::resolve.  It accepts a stringified
        * name as an argument instead of a Name.
        *
  -     * @param  n the stringified name of the object ( or naming context ) to resolve
  -     * @return  the resolved object.
  +     * @param n the stringified name of the object ( or naming context ) to resolve
  +     * @return org.omg.CORBA.Object the resolved object.
        *
        * @exception  NotFound  Indicates the name does not identify a binding.
        * @exception  CannotProceed Indicates that the implementation has given up for some reason. The
  @@ -940,32 +995,42 @@
        *         implementations may place other restrictions on names.)
        */
       public org.omg.CORBA.Object resolve_str( java.lang.String n )
  -    throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
  +    throws org.omg.CosNaming.NamingContextPackage.NotFound, 
  +      org.omg.CosNaming.NamingContextPackage.CannotProceed, 
  +      org.omg.CosNaming.NamingContextPackage.InvalidName
       {
  -        org.omg.CosNaming.NameComponent [] name = org.openorb.util.NamingUtils.to_name( n );
  -
  +        org.omg.CosNaming.NameComponent [] name = 
  +          org.openorb.util.NamingUtils.to_name( n );
           return resolve( name );
       }
   
   
       /**
        * This function adapt a Name for a stringified form
  +     * @param n stringified form
  +     * @return String name
        */
       private String adaptName( String n )
       {
           String str = "";
  -
           for ( int i = 0; i < n.length(); i++ )
           {
               if ( n.charAt( i ) == '/' )
  +            {
                   str = str + "\\/";
  +            }
               else
  +            {
                   if ( n.charAt( i ) == '.' )
  +                {
                       str = str + "\\.";
  +                }
                   else
  +                {
                       str = str + n.charAt( i );
  +                }
  +            }
           }
  -
           return str;
       }
   
  @@ -979,9 +1044,13 @@
           for ( int i = 0; i < n.length(); i++ )
           {
               if ( n.charAt( i ) == '\\' )
  +            {
                   continue;
  +            }
               else
  +            {
                   str = str + n.charAt( i );
  +            }
           }
   
           return str;
  @@ -1009,13 +1078,11 @@
                   if ( index == -1 )
                   {
                       list.addElement( addr.substring( old ) );
  -
                       break;
                   }
                   else
                   {
                       list.addElement( addr.substring( old, index ) );
  -
                       old = index + 1;
                   }
               }
  @@ -1024,16 +1091,16 @@
               for ( int i = 0; i < list.size(); i++ )
               {
                   ad = ( String ) list.elementAt( i );
  -
                   index = addr.indexOf( "@" );
   
                   // Is there a version data ?
                   if ( index != -1 )
                   {
                       index = ad.substring( 0, index ).indexOf( "." );
  -
                       if ( index == -1 )
  +                    {
                           throw new org.omg.CosNaming.NamingContextExtPackage.InvalidAddress();
  +                    }
                   }
               }
           }
  @@ -1066,9 +1133,11 @@
   
           try
           {
  -            org.omg.CosNaming.NameComponent [] currentName = org.openorb.util.NamingUtils.to_name( p_namingContext.componentName() );
  +            org.omg.CosNaming.NameComponent [] currentName = 
  +              org.openorb.util.NamingUtils.to_name( p_namingContext.componentName() );
   
  -            org.omg.CosNaming.NameComponent [] nameComponent = new org.omg.CosNaming.NameComponent[ n.length + currentName.length ];
  +            org.omg.CosNaming.NameComponent [] nameComponent = 
  +              new org.omg.CosNaming.NameComponent[ n.length + currentName.length ];
   
               for ( int k = 0; k < currentName.length; k++ )
               {
  @@ -1096,9 +1165,7 @@
       private namingPersistence.NamingContext getNamingContext()
       throws org.omg.CosNaming.NamingContextPackage.NotFound
       {
  -
           return getNamingContext ( this._object_id() );
  -
       }
   
       /**
  @@ -1108,12 +1175,11 @@
       private namingPersistence.NamingContext getNamingContext( byte[] pid )
       throws org.omg.CosNaming.NamingContextPackage.NotFound
       {
  -
           verbose( "getNamingContext" );
  -
           try
           {
  -            return ( namingPersistence.NamingContext ) _nc_home.get_catalog().find_by_pid ( pid );
  +            return ( namingPersistence.NamingContext ) 
  +             m_ncHome.get_catalog().find_by_pid ( pid );
           }
           catch ( org.omg.CosPersistentState.NotFound nf )
           {
  @@ -1132,7 +1198,8 @@
   
           try
           {
  -            return ( namingPersistence.ProxyNamingContext ) _pnc_home.get_catalog().find_by_pid ( nc_id );
  +            return ( namingPersistence.ProxyNamingContext ) 
  +              m_pncHome.get_catalog().find_by_pid ( nc_id );
           }
           catch ( org.omg.CosPersistentState.NotFound nf )
           {
  @@ -1152,18 +1219,22 @@
   
           try
           {
  -            verbose( "addNamingContext : " + org.openorb.util.NamingUtils.to_string( componentName ) );
  +            verbose( "addNamingContext : " 
  +              + org.openorb.util.NamingUtils.to_string( componentName ) );
               // get the parent of the NamingContext
  -            org.omg.CosNaming.NameComponent[] parentName = new org.omg.CosNaming.NameComponent[ componentName.length - 1 ];
  +            org.omg.CosNaming.NameComponent[] parentName = 
  +              new org.omg.CosNaming.NameComponent[ componentName.length - 1 ];
   
               for ( int i = 0; i < parentName.length; i++ )
               {
                   parentName[ i ] = componentName[ i ];
               }
   
  -            verbose( "parent nameComponent : " + org.openorb.util.NamingUtils.to_string( parentName ) );
  +            verbose( "parent nameComponent : " 
  +               + org.openorb.util.NamingUtils.to_string( parentName ) );
   
  -            parent = _nc_home.find_by_componentName ( org.openorb.util.NamingUtils.to_string( parentName ) );
  +            parent = m_ncHome.find_by_componentName ( 
  +              org.openorb.util.NamingUtils.to_string( parentName ) );
   
           }
           catch ( org.omg.CosPersistentState.NotFound e )
  @@ -1180,14 +1251,17 @@
           {
   
               // get the reference of the naming context to add
  -            namingPersistence.NamingContextRef namingContextRef = _nc_home.find_ref_by_componentName( org.openorb.util.NamingUtils.to_string ( componentName ) );
  +            namingPersistence.NamingContextRef namingContextRef = 
  +              m_ncHome.find_ref_by_componentName( 
  +                 org.openorb.util.NamingUtils.to_string ( componentName ) );
   
               // store the new children list to the parent
   
               namingPersistence.NamingContextRef[] children = parent.nc_children();
               verbose( "parent children : " + children.length );
   
  -            namingPersistence.NamingContextRef[] update_children = new namingPersistence.NamingContextRef[ children.length + 1 ];
  +            namingPersistence.NamingContextRef[] update_children = 
  +              new namingPersistence.NamingContextRef[ children.length + 1 ];
   
               for ( int k = 0 ; k < update_children.length - 1 ; k ++ )
               {
  @@ -1217,10 +1291,12 @@
           try
           {
   
  -            verbose( " addNamingObject " + org.openorb.util.NamingUtils.to_string( componentName ) );
  +            verbose( " addNamingObject " 
  +              + org.openorb.util.NamingUtils.to_string( componentName ) );
   
               // get the parent of the object
  -            org.omg.CosNaming.NameComponent[] parentName = new org.omg.CosNaming.NameComponent[ componentName.length - 1 ];
  +            org.omg.CosNaming.NameComponent[] parentName = 
  +              new org.omg.CosNaming.NameComponent[ componentName.length - 1 ];
   
               for ( int i = 0; i < parentName.length; i++ )
               {
  @@ -1230,7 +1306,7 @@
               String parentName_str = org.openorb.util.NamingUtils.to_string( parentName );
               verbose( "parentName : " + parentName_str );
   
  -            parent = _nc_home.find_by_componentName ( parentName_str );
  +            parent = m_ncHome.find_by_componentName ( parentName_str );
           }
           catch ( org.omg.CosPersistentState.NotFound e )
           {
  @@ -1245,13 +1321,15 @@
           {
               // get the ref of the object
   
  -            namingPersistence.NamingObjectRef objectRef = _no_home.find_ref_by_componentName( org.openorb.util.NamingUtils.to_string( componentName ) );
  +            namingPersistence.NamingObjectRef objectRef = 
  +              m_noHome.find_ref_by_componentName( org.openorb.util.NamingUtils.to_string( componentName ) );
   
               // store the new children list to the parent
   
               namingPersistence.NamingObjectRef[] children = parent.no_children();
   
  -            namingPersistence.NamingObjectRef[] update_children = new namingPersistence.NamingObjectRef[ children.length + 1 ];
  +            namingPersistence.NamingObjectRef[] update_children = 
  +              new namingPersistence.NamingObjectRef[ children.length + 1 ];
   
               for ( int k = 0 ; k < update_children.length - 1 ; k ++ )
               {
  @@ -1276,7 +1354,8 @@
       {
   
           // get the parent of the NamingContext
  -        org.omg.CosNaming.NameComponent[] parentName = new org.omg.CosNaming.NameComponent[ componentName.length - 1 ];
  +        org.omg.CosNaming.NameComponent[] parentName = 
  +          new org.omg.CosNaming.NameComponent[ componentName.length - 1 ];
   
           for ( int i = 0; i < parentName.length; i++ )
           {
  @@ -1287,7 +1366,8 @@
   
           try
           {
  -            parent = _nc_home.find_by_componentName ( org.openorb.util.NamingUtils.to_string( parentName ) );
  +            parent = m_ncHome.find_by_componentName ( 
  +              org.openorb.util.NamingUtils.to_string( parentName ) );
           }
           catch ( org.omg.CosPersistentState.NotFound e )
           {
  @@ -1301,13 +1381,16 @@
           try
           {
               // get the reference of the proxy naming context to add
  -            namingPersistence.ProxyNamingContextRef proxyNamingContextRef = _pnc_home.find_ref_by_componentName( org.openorb.util.NamingUtils.to_string( componentName ) );
  +            namingPersistence.ProxyNamingContextRef proxyNamingContextRef = 
  +              m_pncHome.find_ref_by_componentName( 
  +                org.openorb.util.NamingUtils.to_string( componentName ) );
   
               // store the new children list to the parent
   
               namingPersistence.ProxyNamingContextRef[] children = parent.pnc_children();
   
  -            namingPersistence.ProxyNamingContextRef[] update_children = new namingPersistence.ProxyNamingContextRef[ children.length + 1 ];
  +            namingPersistence.ProxyNamingContextRef[] update_children = 
  +              new namingPersistence.ProxyNamingContextRef[ children.length + 1 ];
   
               for ( int k = 0 ; k < update_children.length - 1 ; k ++ )
               {
  @@ -1333,7 +1416,8 @@
   
           verbose( "removeNamingObject" );
           // get the parent of the object
  -        org.omg.CosNaming.NameComponent[] parentName = new org.omg.CosNaming.NameComponent[ componentName.length - 1 ];
  +        org.omg.CosNaming.NameComponent[] parentName = 
  +          new org.omg.CosNaming.NameComponent[ componentName.length - 1 ];
   
           for ( int i = 0; i < parentName.length; i++ )
           {
  @@ -1344,7 +1428,8 @@
   
           try
           {
  -            parent = _nc_home.find_by_componentName ( org.openorb.util.NamingUtils.to_string( parentName ) );
  +            parent = m_ncHome.find_by_componentName ( 
  +              org.openorb.util.NamingUtils.to_string( parentName ) );
           }
           catch ( org.omg.CosPersistentState.NotFound e )
           {
  @@ -1360,19 +1445,24 @@
   
               // get the ref of the object
   
  -            namingPersistence.NamingObjectRef objectRef = _no_home.find_ref_by_componentName( org.openorb.util.NamingUtils.to_string ( componentName ) );
  -            String objectRefName = ( ( namingPersistence.NamingObject ) objectRef.deref() ).componentName();
  +            namingPersistence.NamingObjectRef objectRef = 
  +              m_noHome.find_ref_by_componentName( 
  +                org.openorb.util.NamingUtils.to_string ( componentName ) );
  +            String objectRefName = 
  +              ( ( namingPersistence.NamingObject ) objectRef.deref() ).componentName();
   
               // remove the objectRef from the list of the children of the naming context
   
               namingPersistence.NamingObjectRef[] children = parent.no_children();
   
  -            namingPersistence.NamingObjectRef[] update_children = new namingPersistence.NamingObjectRef[ children.length - 1 ];
  +            namingPersistence.NamingObjectRef[] update_children = 
  +              new namingPersistence.NamingObjectRef[ children.length - 1 ];
               int index = children.length - 1;
   
               for ( int k = 0; k < children.length - 1 ; k++ )
               {
  -                String childrenName = ( ( namingPersistence.NamingObject ) children[ k ].deref() ).componentName();
  +                String childrenName = ( ( namingPersistence.NamingObject ) 
  +                  children[ k ].deref() ).componentName();
   
                   if ( childrenName.equals( objectRefName ) )
                   {
  @@ -1407,7 +1497,8 @@
   
           verbose( "removeNamingContext" );
           // get the parent of the object
  -        org.omg.CosNaming.NameComponent[] parentName = new org.omg.CosNaming.NameComponent[ componentName.length - 1 ];
  +        org.omg.CosNaming.NameComponent[] parentName = 
  +          new org.omg.CosNaming.NameComponent[ componentName.length - 1 ];
   
           for ( int i = 0; i < parentName.length; i++ )
           {
  @@ -1418,8 +1509,8 @@
   
           try
           {
  -            parent = _nc_home.find_by_componentName ( org.openorb.util.NamingUtils.to_string( parentName ) );
  -
  +            parent = m_ncHome.find_by_componentName ( 
  +              org.openorb.util.NamingUtils.to_string( parentName ) );
           }
           catch ( org.omg.CosPersistentState.NotFound e )
           {
  @@ -1435,19 +1526,24 @@
   
               // get the ref of the object
   
  -            namingPersistence.NamingContextRef objectRef = _nc_home.find_ref_by_componentName( org.openorb.util.NamingUtils.to_string( componentName ) );
  -            String objectRefName = ( ( namingPersistence.NamingContext ) objectRef.deref() ).componentName();
  +            namingPersistence.NamingContextRef objectRef = 
  +              m_ncHome.find_ref_by_componentName( 
  +                org.openorb.util.NamingUtils.to_string( componentName ) );
  +            String objectRefName = ( ( namingPersistence.NamingContext ) 
  +              objectRef.deref() ).componentName();
               verbose( "find ref  " + objectRefName );
               // remove the objectRef from the list of the children of the naming context
   
               namingPersistence.NamingContextRef[] children = parent.nc_children();
   
  -            namingPersistence.NamingContextRef[] update_children = new namingPersistence.NamingContextRef[ children.length - 1 ];
  +            namingPersistence.NamingContextRef[] update_children = 
  +              new namingPersistence.NamingContextRef[ children.length - 1 ];
               int index = children.length - 1;
   
               for ( int k = 0; k < children.length - 1 ; k++ )
               {
  -                String childrenName = ( ( namingPersistence.NamingContext ) children[ k ].deref() ).componentName();
  +                String childrenName = ( ( namingPersistence.NamingContext ) 
  +                  children[ k ].deref() ).componentName();
                   verbose ( "children " + k + " " + childrenName );
   
                   if ( childrenName.equals( objectRefName ) )
  @@ -1462,12 +1558,10 @@
               }
   
               verbose( "index : " + index );
  -
               for ( int i = index + 1; i < children.length ; i++ )
               {
                   update_children[ i - 1 ] = children[ i ];
               }
  -
               parent.nc_children ( update_children );
           }
           catch ( org.omg.CosNaming.NamingContextPackage.InvalidName ex )
  @@ -1480,11 +1574,13 @@
        * Remove the proxy naming context from the list of children that is stored in the parent object
        * @param the componentName of the object
        */
  -    private void removeProxyNamingContext ( org.omg.CosNaming.NameComponent[] componentName )
  +    private void removeProxyNamingContext ( 
  +      org.omg.CosNaming.NameComponent[] componentName )
       {
   
           // get the parent of the object
  -        org.omg.CosNaming.NameComponent[] parentName = new org.omg.CosNaming.NameComponent[ componentName.length - 1 ];
  +        org.omg.CosNaming.NameComponent[] parentName = 
  +           new org.omg.CosNaming.NameComponent[ componentName.length - 1 ];
   
           for ( int i = 0; i < parentName.length; i++ )
           {
  @@ -1495,7 +1591,8 @@
   
           try
           {
  -            parent = _nc_home.find_by_componentName ( org.openorb.util.NamingUtils.to_string ( parentName ) );
  +            parent = m_ncHome.find_by_componentName ( 
  +              org.openorb.util.NamingUtils.to_string ( parentName ) );
           }
           catch ( org.omg.CosPersistentState.NotFound e )
           {
  @@ -1510,19 +1607,27 @@
           {
               // get the ref of the object
   
  -            namingPersistence.ProxyNamingContextRef objectRef = _pnc_home.find_ref_by_componentName( org.openorb.util.NamingUtils.to_string( componentName ) );
  -            String objectRefName = ( ( namingPersistence.ProxyNamingContext ) objectRef.deref() ).componentName();
  +            namingPersistence.ProxyNamingContextRef objectRef = 
  +              m_pncHome.find_ref_by_componentName( 
  +                org.openorb.util.NamingUtils.to_string( componentName ) );
  +            String objectRefName = 
  +              ( ( namingPersistence.ProxyNamingContext ) 
  +                objectRef.deref() ).componentName();
   
               // remove the objectRef from the list of the children of the naming context
   
  -            namingPersistence.ProxyNamingContextRef[] children = parent.pnc_children();
  +            namingPersistence.ProxyNamingContextRef[] children = 
  +              parent.pnc_children();
   
  -            namingPersistence.ProxyNamingContextRef[] update_children = new namingPersistence.ProxyNamingContextRef[ children.length - 1 ];
  +            namingPersistence.ProxyNamingContextRef[] update_children = 
  +              new namingPersistence.ProxyNamingContextRef[ children.length - 1 ];
               int index = children.length - 1;
   
               for ( int k = 0; k < children.length - 1 ; k++ )
               {
  -                String childrenName = ( ( namingPersistence.ProxyNamingContext ) children[ k ].deref() ).componentName();
  +                String childrenName = 
  +                  ( ( namingPersistence.ProxyNamingContext ) 
  +                     children[ k ].deref() ).componentName();
   
                   if ( childrenName.equals( objectRefName ) )
                   {
  @@ -1554,7 +1659,8 @@
        * @param the persistent naming context
        * @return the naming context
        */
  -    private org.omg.CosNaming.NamingContext createReference( namingPersistence.NamingContext nc )
  +    private org.omg.CosNaming.NamingContext createReference( 
  +        namingPersistence.NamingContext nc )
       {
   
           verbose( "createReference" );
  @@ -1565,10 +1671,10 @@
           try
           {
   
  -            ncObj = _poa().create_reference_with_id( nc_pid, org.omg.CosNaming.NamingContextExtHelper.id() );
  +            ncObj = _poa().create_reference_with_id( 
  +              nc_pid, org.omg.CosNaming.NamingContextExtHelper.id() );
               return org.omg.CosNaming.NamingContextExtHelper.narrow( ncObj );
   
  -
           }
   
           // SJM: replaced WrongPolicy exception with Exception catch
  @@ -1580,20 +1686,22 @@
       }
   
       /**
  -     * Create a binding object from a persistent naming object, specifying the binding_name and the binding_type
  +     * Create a binding object from a persistent naming object, specifying the 
  +     * binding_name and the binding_type
        * @param no the naming object
        * @return the binding object
        */
       private org.omg.CosNaming.Binding getBinding ( namingPersistence.NamingObject no )
       {
  -
           verbose( "getBinding namingObject" );
           org.omg.CosNaming.Binding binding = new org.omg.CosNaming.Binding();
   
           try
           {
  -            org.omg.CosNaming.NameComponent[] name = new org.omg.CosNaming.NameComponent[ 1 ];
  -            org.omg.CosNaming.NameComponent[] componentName = org.openorb.util.NamingUtils.to_name ( no.componentName() );
  +            org.omg.CosNaming.NameComponent[] name = 
  +              new org.omg.CosNaming.NameComponent[ 1 ];
  +            org.omg.CosNaming.NameComponent[] componentName = 
  +              org.openorb.util.NamingUtils.to_name ( no.componentName() );
               name[ 0 ] = componentName[ componentName.length - 1 ];
               binding.binding_name = name;
               binding.binding_type = org.omg.CosNaming.BindingType.nobject;
  @@ -1608,7 +1716,8 @@
       }
   
       /**
  -     * Create a binding object from a persistent naming context, specifying the binding_name and the binding_type
  +     * Create a binding object from a persistent naming context, specifying the 
  +     * binding_name and the binding_type
        * @param no the naming context
        * @return the binding object
        */
  @@ -1620,9 +1729,11 @@
   
           try
           {
  -            org.omg.CosNaming.NameComponent[] name = new org.omg.CosNaming.NameComponent[ 1 ];
  +            org.omg.CosNaming.NameComponent[] name = 
  +              new org.omg.CosNaming.NameComponent[ 1 ];
               verbose( "componentName : " + nc.componentName() );
  -            org.omg.CosNaming.NameComponent[] componentName = org.openorb.util.NamingUtils.to_name ( nc.componentName() );
  +            org.omg.CosNaming.NameComponent[] componentName = 
  +              org.openorb.util.NamingUtils.to_name ( nc.componentName() );
               name[ 0 ] = componentName[ componentName.length - 1 ];
               binding.binding_name = name;
               binding.binding_type = org.omg.CosNaming.BindingType.ncontext;
  @@ -1636,7 +1747,8 @@
       }
   
       /**
  -     * Create a binding object from a persistent proxy naming context, specifying the binding_name and the binding_type
  +     * Create a binding object from a persistent proxy naming context, specifying 
  +     * the binding_name and the binding_type
        * @param no the proxy naming context
        * @return the binding object
        */
  @@ -1647,9 +1759,10 @@
   
           try
           {
  -
  -            org.omg.CosNaming.NameComponent[] name = new org.omg.CosNaming.NameComponent[ 1 ];
  -            org.omg.CosNaming.NameComponent[] componentName = org.openorb.util.NamingUtils.to_name ( pnc.componentName() );
  +            org.omg.CosNaming.NameComponent[] name = 
  +              new org.omg.CosNaming.NameComponent[ 1 ];
  +            org.omg.CosNaming.NameComponent[] componentName = 
  +              org.openorb.util.NamingUtils.to_name ( pnc.componentName() );
               name[ 0 ] = componentName[ componentName.length - 1 ];
               binding.binding_name = name;
               binding.binding_type = org.omg.CosNaming.BindingType.ncontext;
  @@ -1669,10 +1782,12 @@
        * @param the componentName including the root node
        * @return the componentName without the root node
        */
  -    private org.omg.CosNaming.NameComponent[] getPath ( org.omg.CosNaming.NameComponent[] componentName )
  +    private org.omg.CosNaming.NameComponent[] getPath ( 
  +      org.omg.CosNaming.NameComponent[] componentName )
       {
   
  -        org.omg.CosNaming.NameComponent[] path = new org.omg.CosNaming.NameComponent[ componentName.length - 1 ];
  +        org.omg.CosNaming.NameComponent[] path = 
  +          new org.omg.CosNaming.NameComponent[ componentName.length - 1 ];
   
           for ( int k = 1; k < componentName.length ; k++ )
           {
  @@ -1688,6 +1803,8 @@
       private void verbose( String message )
       {
           if ( getLogger().isDebugEnabled() )
  +        {
               getLogger().debug( "[ " + message + " ]" );
  +        }
       }
   }
  
  
  
  1.3       +107 -69   jakarta-avalon-apps/enterprise/ins/src/java/org/apache/ins/NamingProvider.java
  
  Index: NamingProvider.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/ins/src/java/org/apache/ins/NamingProvider.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NamingProvider.java	13 Mar 2002 09:45:12 -0000	1.2
  +++ NamingProvider.java	14 May 2002 09:00:01 -0000	1.3
  @@ -14,7 +14,6 @@
   import org.apache.pss.Session;
   
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.logger.Logger;
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.avalon.framework.service.ServiceException;
   import org.apache.avalon.framework.service.Serviceable;
  @@ -24,28 +23,16 @@
   import org.apache.avalon.framework.activity.Executable;
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.Contextualizable;
  -import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.CascadingException;
   
  -import org.omg.CORBA.Any;
  -import org.omg.CORBA.LocalObject;
   import org.omg.CORBA.Policy;
  -import org.omg.CosPersistentState.NotFound;
  -import org.omg.CosPersistentState.StorageObject;
   import org.omg.CosPersistentState.ConnectorHelper;
  -import org.omg.PortableServer.ServantLocator;
  -import org.omg.PortableServer.Servant;
   import org.omg.PortableServer.POA;
  -import org.omg.PortableServer.ServantLocatorPackage.CookieHolder ;
  -import org.omg.PortableServer.ForwardRequest;
   import org.omg.PortableServer.POAHelper;
   import org.omg.PortableServer.IdAssignmentPolicyValue;
   import org.omg.PortableServer.RequestProcessingPolicyValue;
  -import org.omg.PortableServer.ImplicitActivationPolicyValue;
  -import org.omg.PortableServer.LifespanPolicyValue;
   import org.omg.PortableServer.IdUniquenessPolicyValue;
   import org.omg.PortableServer.ServantRetentionPolicyValue;
   import org.omg.CosNaming.NamingContextExt;
  @@ -61,9 +48,11 @@
   
   /**
    * Implementation of an INS Service Provider.
  + * @author multiple
    */
   
  -public class NamingProvider extends AbstractLogEnabled implements Configurable, Contextualizable, Serviceable, Initializable, Startable, Executable, Disposable
  +public class NamingProvider extends AbstractLogEnabled implements Configurable, 
  +Contextualizable, Serviceable, Initializable, Startable, Executable, Disposable
   {
   
       //=================================================================
  @@ -93,7 +82,7 @@
       private POA m_poa;
   
       private POA m_root;
  -
  +      
      /**
       * Reference to the PSS Connector.
       */
  @@ -106,7 +95,7 @@
   
       private NamingContextHome m_home;
   
  -    private NamingContext m_root_naming_context;
  +    private NamingContext m_rootNamingContext;
        
       private NamingContextExt m_naming;
   
  @@ -124,7 +113,10 @@
       */    
       public void configure( final Configuration config )
       {
  -	  if( getLogger().isDebugEnabled() ) getLogger().debug( "configuration" );
  +        if( getLogger().isDebugEnabled() ) 
  +        {
  +             getLogger().debug( "configuration" );
  +        }
           m_config = config;
       }
   
  @@ -137,10 +129,13 @@
       * Set the application context.
       * @param context the application context
       */
  -    public void contextualize( Context context ) throws ContextException
  +    public void contextualize( Context context )
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( "contextualize" );
  -	  m_context = context;
  +        if( getLogger().isDebugEnabled() ) 
  +        {
  +            getLogger().debug( "contextualize" );
  +        }
  +        m_context = context;
       }
   
       //=================================================================
  @@ -155,10 +150,14 @@
        *
        * @param manager The <code>ServiceManager</code> which this
        *                <code>Serviceable</code> uses.
  +     * @exception ServiceException is a service related error occurs
        */
       public void service( ServiceManager manager ) throws ServiceException
       {
  -	  if( getLogger().isDebugEnabled() ) getLogger().debug( "service");
  +        if( getLogger().isDebugEnabled() ) 
  +        {
  +            getLogger().debug( "service");
  +        }
           m_manager = manager;
           m_orb = (ORB) m_manager.lookup( "orb" );
       }
  @@ -174,13 +173,16 @@
       public void initialize()
       throws Exception
       {
  -        if( getLogger().isDebugEnabled() ) getLogger().debug( "initialization" );
  -            
  +        if( getLogger().isDebugEnabled() ) 
  +        {
  +             getLogger().debug( "initialization" );
  +        }    
           try
           {
               Configuration pss = m_config.getChild("pss");
               String mode = pss.getChild("connector").getAttribute("value","file");
  -            org.omg.CORBA.Object object = m_orb.resolve_initial_references( "PSS:APACHE:" + mode );
  +            org.omg.CORBA.Object object = m_orb.resolve_initial_references( 
  +              "PSS:APACHE:" + mode );
               m_connector = (Connector) ConnectorHelper.narrow( object );
           }
           catch( Throwable e )
  @@ -194,7 +196,7 @@
           //
   
           try
  -	  {
  +        {
               m_root = POAHelper.narrow( m_orb.resolve_initial_references("RootPOA") );
               m_poa = m_root.create_POA(
                 "INS",
  @@ -211,19 +213,23 @@
                 }
               );
   
  -	  }
  -	  catch( Throwable poaError )
  -	  {
  -	      String error = "unable to create the repository object reference";
  -	      if( getLogger().isErrorEnabled() ) getLogger().error( error, poaError );
  -	      throw new Exception( error, poaError );
  -	  }
  +        }
  +        catch( Throwable poaError )
  +        {
  +            String error = "unable to create the repository object reference";
  +            if( getLogger().isErrorEnabled() ) 
  +            {
  +                getLogger().error( error, poaError );
  +            }
  +            throw new Exception( error, poaError );
  +        }
   
           //
           // storage system configuration
           //
   
  -        String mode = m_config.getChild("pss").getChild("connector").getAttribute("value","file");
  +        String mode = m_config.getChild("pss").getChild("connector").
  +          getAttribute("value","file");
   
           Configuration pss = m_config.getChild("pss");
           Configuration declarations = null;
  @@ -240,26 +246,31 @@
               declarations = pss.getChild("persistence").getChild("file");
           }
   
  -	  try
  -	  {
  -            if( getLogger().isDebugEnabled() ) getLogger().debug("registration");
  +        try
  +        {
  +            if( getLogger().isDebugEnabled() ) 
  +            {
  +                getLogger().debug("registration");
  +            }
               m_connector.register( declarations );
  -            if( getLogger().isDebugEnabled() ) getLogger().debug("session");
  +            if( getLogger().isDebugEnabled() ) 
  +            {
  +                getLogger().debug("session");
  +            }
               m_session = m_connector.createBasicSession( pss.getChild("session") );
  -	  }
  -	  catch( Throwable throwable )
  -	  {
  -	      String error = "unable to establish storage home";
  -		if( getLogger().isErrorEnabled() ) getLogger().error( error, throwable );
  -		throw new Exception( error, throwable );
  -	  }
  +        }
  +        catch( Throwable throwable )
  +        {
  +            String error = "unable to establish storage home";
  +            throw new Exception( error, throwable );
  +        }
   
           //
           // load PSS storage homes
           //
   
  -	  try
  -	  {
  +        try
  +        {
               m_home = ( NamingContextHome ) m_session.find_storage_home( 
                 "PSDL:namingPersistence/NamingContextHomeBase:1.0" );
               NamingObjectHome no_home = ( NamingObjectHome ) m_session.find_storage_home ( 
  @@ -279,12 +290,12 @@
               default_naming.enableLogging( getLogger() );
               m_poa.set_servant( default_naming );
   
  -	  }
  -	  catch( Throwable throwable )
  -	  {
  -	      String error = "failed to establish naming context implementation";
  -		throw new CascadingException( error, throwable );
  -	  }
  +        }
  +        catch( Throwable throwable )
  +        {
  +            String error = "failed to establish naming context implementation";
  +            throw new CascadingException( error, throwable );
  +        }
   
           //
           // make sure we have a root naming context
  @@ -292,27 +303,27 @@
   
           try
           {
  -            m_root_naming_context = m_home.find_by_componentName( "NameService" );
  +            m_rootNamingContext = m_home.find_by_componentName( "NameService" );
           }
           catch ( org.omg.CosPersistentState.NotFound e )
           {
               NamingContextRef[] nc_children = new NamingContextRef[ 0 ];
               NamingObjectRef[] no_children = new NamingObjectRef[ 0 ];
               ProxyNamingContextRef[] pnc_children = new ProxyNamingContextRef[ 0 ];
  -            m_root_naming_context = m_home.create( 
  +            m_rootNamingContext = m_home.create( 
                 "NameService", nc_children, no_children, pnc_children );
           }
   
           try
           {
  -            byte[] pid = m_root_naming_context.get_pid();
  +            byte[] pid = m_rootNamingContext.get_pid();
               m_naming = NamingContextExtHelper.narrow(
                 m_poa.create_reference_with_id( pid, NamingContextExtHelper.id() ) );
           }
           catch ( Throwable e )
           {
  -	      String error = "failed to establish naming context root";
  -		throw new CascadingException( error, e );
  +            String error = "failed to establish naming context root";
  +            throw new CascadingException( error, e );
           }
   
           //
  @@ -336,33 +347,47 @@
   
      /**
       * Starts the INS server.
  +    * @exception Exception is a startup exception occurs
       */
       public void start() throws Exception
       {
           m_root.the_POAManager().activate();
           String banner = "Interoperable Naming Service available ";
  -        if( getLogger().isInfoEnabled() ) getLogger().info( banner );
  +        if( getLogger().isInfoEnabled() )
  +        {
  +            getLogger().info( banner );
  +        }
       }
   
      /**
       * Prints the INS reference to the log.
  +    * @exception Exception is a execution error occurs
       */
       public void execute() throws Exception
       {
  -        if( getLogger().isInfoEnabled() ) getLogger().info( "execution" );
  +        if( getLogger().isInfoEnabled() ) 
  +        {
  +            getLogger().info( "execution" );
  +        }
           // here is the slot for Gary to add some tests
       }
   
      /**
       * Stops the INS server.
  +    * @exception Exception is a execution occurs while stopping the server
       */
       public void stop() throws Exception
       {
  -        if( m_stopped ) return;
  -        if( getLogger().isDebugEnabled() ) getLogger().debug("shutdown" );
  +        if( m_stopped ) 
  +        {
  +            return;
  +        }
  +        if( getLogger().isDebugEnabled() ) 
  +        {
  +            getLogger().debug("shutdown" );
  +        }
           m_stopped = true;
           m_orb.shutdown( true );
  -        if( getLogger().isDebugEnabled() ) getLogger().debug("shutdown complete" );
       }
   
      /**
  @@ -371,18 +396,30 @@
       */
       public void dispose()
       {
  -        if( m_disposed ) return;
  -        if( !m_stopped ) try
  +        if( m_disposed ) 
           {
  -            stop();
  +            return;
           }
  -        catch( Throwable e )
  +        if( !m_stopped ) 
           {
  -            if( getLogger().isDebugEnabled() ) getLogger().debug(
  -               "ignoring error while stopping provider" );
  +            try
  +            {
  +                stop();
  +            }
  +            catch( Throwable e )
  +            {
  +                if( getLogger().isDebugEnabled() ) 
  +                {
  +                    getLogger().debug(
  +                     "ignoring error while stopping provider" );
  +                }
  +            }
           }
           m_disposed = true;
  -        if( getLogger().isDebugEnabled() ) getLogger().debug("dispose" );
  +        if( getLogger().isDebugEnabled() ) 
  +        {
  +            getLogger().debug("dispose" );
  +        }
           m_orb = null;
           m_root = null;
           m_config = null;
  @@ -391,6 +428,7 @@
   
      /**
       * Returns the INS service provider object reference.
  +    * @return NamingContextExt naming context
       */
       protected NamingContextExt getProvider()
       {
  
  
  
  1.3       +47 -25    jakarta-avalon-apps/enterprise/ins/src/java/org/apache/ins/ReleaseInfo.java
  
  Index: ReleaseInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/ins/src/java/org/apache/ins/ReleaseInfo.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ReleaseInfo.java	13 Mar 2002 11:01:17 -0000	1.2
  +++ ReleaseInfo.java	14 May 2002 09:00:01 -0000	1.3
  @@ -1,32 +1,54 @@
  +/*
  + * Copyright (C) The Apache Software Foundation. All rights reserved.
  + *
  + * This software is published under the terms of the Apache Software License
  + * version 1.1, a copy of which has been included with this distribution in
  + * the LICENSE.TXT file.
  + */
  +
   package org.apache.ins;
   
   /**
  - * Implemention and specification release information.
  + * Release information for the time service implementation.
  + * @author <a href="mailto:mcconnell@osm.net">Stephen McConnell</a>
    */
  -public class ReleaseInfo
  +public class ReleaseInfo extends org.openorb.ReleaseInfo
   {
  -    public final static String NAME_LONG                 = "Interoperable Naming Service";
  -    public final static String NAME_SHORT                = "INS";
   
  -    public final static short  VERSION_MAJOR             = 1;        
  -    public final static short  VERSION_MINOR             = 3;
  -    public final static short  VERSION_MINOR_CHANGE      = 0;
  -    public final static String VERSION                   = "" + VERSION_MAJOR + "." + VERSION_MINOR + "." + VERSION_MINOR_CHANGE;
  -
  -    public final static short  SPEC_VERSION_MAJOR        = 1;
  -    public final static short  SPEC_VERSION_MINOR        = 1;
  -    public final static String SPEC_VERSION              = "" + SPEC_VERSION_MAJOR + "." + SPEC_VERSION_MINOR;
  -
  -    public final static String RELEASE                   = NAME_LONG + " Version " + VERSION;
  -    public final static String RELEASE_TAG               = NAME_LONG + "_" + VERSION_MAJOR + "_" + VERSION_MINOR + "_" + VERSION_MINOR_CHANGE;
  -
  -    public static void main(String[] args)
  -    {
  -        System.out.println(NAME_LONG + ":");
  -        System.out.println("\t" + NAME_LONG + " " + VERSION);
  -        System.out.println("\t" + RELEASE_TAG);
  -        System.out.println("\t${SPEC_NAME} " + SPEC_VERSION 
  -          + " (http://www.omg.org/cgi-bin/doc?formal/01-02-65)");
  -    }
  -}
  +   /**
  +    * Major version.
  +    */
  +    public static final short OPENORB_TIME_MAJOR = 1;
  +
  +   /**
  +    * Monor version.
  +    */
  +    public static final short OPENORB_TIME_MINOR = 0;
  +
  +   /**
  +    * Monor change.
  +    */
  +    public static final short OPENORB_TIME_MINOR_CHANGE = 3;
  +
  +   /**
  +    * Basic version.
  +    */
  +    public static final String OPENORB_TIME_VERSION = "1.0";
  +   /**
  +    * Composite version
  +    */
  +    public static final String VERSION = "1.0 over ORB Version 2.5";
  +
  +   /**
  +    * Release string.
  +    */
  +    public static final String RELEASE = 
  +      "Interoperable Naming Service Version 1.0 over ORB Implementation Version 1.3.0";
  +
  +   /**
  +    * Release tag.
  +    */
  +    public static final String RELEASE_TAG = 
  +      "InteroperableNamingService_1_0_3_over_ORB_Implementation_Version 1.3.0";
   
  +}
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-avalon-apps/enterprise/ins/src/java/org/apache/ins BindingIteratorImpl.java CallbackManagerImpl.java CallbackRegistration.java NamingContextExImpl.java NamingProvider.java ReleaseInfo.java

Posted by Stephen McConnell <mc...@osm.net>.
cvs commit -m "checkstyle compliance (80 warning down to 0)
:-)


Peter Donald wrote:

>On Tue, 14 May 2002 19:00, mcconnell@apache.org wrote:
>  
>
>>mcconnell    02/05/14 02:00:02
>>
>>  Modified:    enterprise/ins build.xml
>>               enterprise/ins/src/java/org/apache/ins
>>                        BindingIteratorImpl.java CallbackManagerImpl.java
>>                        CallbackRegistration.java NamingContextExImpl.java
>>                        NamingProvider.java ReleaseInfo.java
>>  Log:
>>  checkstyle compliance (380 warning down to 80)
>>    
>>
>
>Woohoo!
>
>  
>

-- 

Stephen J. McConnell

OSM SARL
digital products for a global economy
mailto:mcconnell@osm.net
http://www.osm.net




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-avalon-apps/enterprise/ins/src/java/org/apache/ins BindingIteratorImpl.java CallbackManagerImpl.java CallbackRegistration.java NamingContextExImpl.java NamingProvider.java ReleaseInfo.java

Posted by Peter Donald <pe...@apache.org>.
On Tue, 14 May 2002 19:00, mcconnell@apache.org wrote:
> mcconnell    02/05/14 02:00:02
>
>   Modified:    enterprise/ins build.xml
>                enterprise/ins/src/java/org/apache/ins
>                         BindingIteratorImpl.java CallbackManagerImpl.java
>                         CallbackRegistration.java NamingContextExImpl.java
>                         NamingProvider.java ReleaseInfo.java
>   Log:
>   checkstyle compliance (380 warning down to 80)

Woohoo!

-- 
Cheers,

Peter Donald



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>