You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by qu...@apache.org on 2003/02/12 01:03:45 UTC

cvs commit: jakarta-turbine-2/src/java/org/apache/turbine/services BaseInitableBroker.java BaseInitable.java ServiceBroker.java BaseService.java InstantiationException.java InitializationException.java Initable.java BaseServiceBroker.java TurbineBaseService.java Service.java BaseUnicastRemoteService.java InitableBroker.java

quintonm    2003/02/11 16:03:44

  Modified:    src/java/org/apache/turbine/services BaseInitableBroker.java
                        BaseInitable.java ServiceBroker.java
                        BaseService.java InstantiationException.java
                        InitializationException.java Initable.java
                        BaseServiceBroker.java TurbineBaseService.java
                        Service.java BaseUnicastRemoteService.java
                        InitableBroker.java
  Log:
  - Organized imports
  - Code formatting.
  
  No functional changes.
  
  Revision  Changes    Path
  1.5       +30 -29    jakarta-turbine-2/src/java/org/apache/turbine/services/BaseInitableBroker.java
  
  Index: BaseInitableBroker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/BaseInitableBroker.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BaseInitableBroker.java	13 Jan 2003 21:14:28 -0000	1.4
  +++ BaseInitableBroker.java	12 Feb 2003 00:03:43 -0000	1.5
  @@ -56,6 +56,7 @@
   
   import java.util.Hashtable;
   import java.util.Stack;
  +
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  @@ -89,7 +90,7 @@
    * @version $Id$
    */
   public abstract class BaseInitableBroker
  -    implements InitableBroker
  +        implements InitableBroker
   {
       /** A repository of Initable instances. */
       protected Hashtable initables = new Hashtable();
  @@ -124,20 +125,20 @@
        * @exception InitializationException Initialization was not successful.
        */
       public void initClass(String className,
  -                           Object data)
  -        throws InitializationException
  +                          Object data)
  +            throws InitializationException
       {
           // make sure that only one thread calls this method recursively
           synchronized(stack)
           {
               int pos = stack.search(className);
  -            if(pos != -1)
  +            if (pos != -1)
               {
                   StringBuffer msg = new StringBuffer().append(className)
  -                    .append(" couldn't be initialized because of circular depency chain:\n");
  -                for(int i=pos; i>0; i--)
  +                        .append(" couldn't be initialized because of circular depency chain:\n");
  +                for(int i = pos; i > 0; i--)
                   {
  -                    msg.append((String)stack.elementAt(stack.size()-i-1)+"->");
  +                    msg.append((String) stack.elementAt(stack.size() - i - 1) + "->");
                   }
                   msg.append(className).append('\n');
   
  @@ -147,7 +148,7 @@
               {
                   stack.push(className);
                   Initable instance = getInitableInstance(className);
  -                if(!instance.getInit())
  +                if (!instance.getInit())
                   {
                       // this call might result in an indirect recursion
                       instance.init(data);
  @@ -175,10 +176,10 @@
           try
           {
               Initable initable = getInitableInstance(className);
  -            if(initable.getInit())
  +            if (initable.getInit())
               {
                   initable.shutdown();
  -                ((BaseInitable)initable).setInit(false);
  +                ((BaseInitable) initable).setInit(false);
               }
           }
           catch (InstantiationException e)
  @@ -186,7 +187,7 @@
               // Shutdown of a nonexistent class was requested.
               // This does not hurt anything, so we log the error and continue.
               log.error("Shutdown of a nonexistent class " +
  -                      className + " was requested", e);
  +                    className + " was requested", e);
           }
       }
   
  @@ -204,28 +205,28 @@
        * during instantiation or initialization of the Initable.
        */
       public Initable getInitable(String className)
  -        throws InstantiationException
  +            throws InstantiationException
       {
           Initable initable;
           try
           {
               initable = getInitableInstance(className);
  -            if(!initable.getInit())
  +            if (!initable.getInit())
               {
                   synchronized(initable.getClass())
                   {
  -                    if(!initable.getInit())
  +                    if (!initable.getInit())
                       {
                           initable.init();
                       }
  -                    if(!initable.getInit())
  +                    if (!initable.getInit())
                       {
                           // this exception will be caught & rethrown by this very method.
                           // getInit() returning false indicates some initialization issue,
                           // which in turn prevents the InitableBroker from passing a working
                           // instance of the initable to the client.
                           throw new InitializationException(
  -                            "init() failed to initialize class " + className);
  +                                "init() failed to initialize class " + className);
                       }
                   }
               }
  @@ -234,7 +235,7 @@
           catch (InitializationException e)
           {
               throw new InstantiationException("Class " + className +
  -                            " failed to initialize", e);
  +                    " failed to initialize", e);
           }
       }
   
  @@ -250,18 +251,18 @@
        * be instantiated.
        */
       protected Initable getInitableInstance(String className)
  -        throws InstantiationException
  +            throws InstantiationException
       {
  -        Initable initable = (Initable)initables.get(className);
  +        Initable initable = (Initable) initables.get(className);
   
  -        if(initable == null)
  +        if (initable == null)
           {
               try
               {
  -                initable = (Initable)Class.forName(className).newInstance();
  +                initable = (Initable) Class.forName(className).newInstance();
               }
   
  -            // those two errors must be passed to the VM
  +                    // those two errors must be passed to the VM
               catch (ThreadDeath t)
               {
                   throw t;
  @@ -276,20 +277,20 @@
                   // Used to indicate error condition.
                   String msg = null;
   
  -                if(t instanceof NoClassDefFoundError)
  +                if (t instanceof NoClassDefFoundError)
                   {
                       msg = "A class referenced by " + className +
  -                        " is unavailable. Check your jars and classes.";
  +                            " is unavailable. Check your jars and classes.";
                   }
  -                else if(t instanceof ClassNotFoundException)
  +                else if (t instanceof ClassNotFoundException)
                   {
                       msg = "Class " + className +
  -                        " is unavailable. Check your jars and classes.";
  +                            " is unavailable. Check your jars and classes.";
                   }
  -                else if(t instanceof ClassCastException)
  +                else if (t instanceof ClassCastException)
                   {
                       msg = "Class " + className +
  -                        " doesn't implement Initable.";
  +                            " doesn't implement Initable.";
                   }
                   else
                   {
  
  
  
  1.3       +12 -13    jakarta-turbine-2/src/java/org/apache/turbine/services/BaseInitable.java
  
  Index: BaseInitable.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/BaseInitable.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BaseInitable.java	24 Jul 2002 09:20:44 -0000	1.2
  +++ BaseInitable.java	12 Feb 2003 00:03:43 -0000	1.3
  @@ -25,13 +25,13 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Apache" and "Apache Software Foundation" and 
  - *    "Apache Turbine" must not be used to endorse or promote products 
  - *    derived from this software without prior written permission. For 
  + * 4. The names "Apache" and "Apache Software Foundation" and
  + *    "Apache Turbine" must not be used to endorse or promote products
  + *    derived from this software without prior written permission. For
    *    written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  - *    "Apache Turbine", nor may "Apache" appear in their name, without 
  + *    "Apache Turbine", nor may "Apache" appear in their name, without
    *    prior written permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  @@ -65,7 +65,7 @@
    * @version $Id$
    */
   public class BaseInitable
  -    implements Initable
  +        implements Initable
   {
       /** InitableBroker that instantiatd this class. */
       protected InitableBroker initableBroker;
  @@ -89,7 +89,7 @@
        *
        * @param broker The InitableBroker that instantiated this object.
        */
  -    public void setInitableBroker( InitableBroker broker )
  +    public void setInitableBroker(InitableBroker broker)
       {
           this.initableBroker = broker;
       }
  @@ -108,20 +108,20 @@
        * Performs early initialization.  Used in a manner similar to a ctor.
        *
        * BaseInitable doesn't need early initialization, therefore it
  -     * ignores all objects passed to it and performs no initialization 
  +     * ignores all objects passed to it and performs no initialization
        * activities.
        *
        * @param data An Object to use for initialization activities.
        * @exception InitializationException Initialization of this
        * class was not successful.
        */
  -    public void init( Object data ) throws InitializationException
  +    public void init(Object data) throws InitializationException
       {
       }
   
       /**
  -     * Performs late initializtion.  Called when the Service is requested 
  -     * for the first time (if not already completely initialized by the 
  +     * Performs late initializtion.  Called when the Service is requested
  +     * for the first time (if not already completely initialized by the
        * early initializer).
        *
        * Late intialization of a BaseInitable is alwas successful.
  @@ -144,7 +144,6 @@
           setInit(false);
       }
   
  -    
       /**
        * Returns initialization status.
        *
  @@ -160,7 +159,7 @@
        *
        * @param value The new initialization status.
        */
  -    protected void setInit( boolean value )
  +    protected void setInit(boolean value)
       {
           this.isInitialized = value;
       }
  
  
  
  1.6       +3 -4      jakarta-turbine-2/src/java/org/apache/turbine/services/ServiceBroker.java
  
  Index: ServiceBroker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/ServiceBroker.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ServiceBroker.java	13 Jan 2003 21:14:28 -0000	1.5
  +++ ServiceBroker.java	12 Feb 2003 00:03:43 -0000	1.6
  @@ -56,7 +56,6 @@
   
   import org.apache.commons.configuration.Configuration;
   
  -
   /**
    * Classes that implement this interface can act as a broker for
    * <code>Service</code> classes.
  @@ -99,7 +98,7 @@
        * or can't be initialized.
        */
       void initService(String name)
  -        throws InitializationException;
  +            throws InitializationException;
   
       /**
        * Shutdowns a Service.
  @@ -128,7 +127,7 @@
        * can't be initialized.
        */
       Service getService(String name)
  -        throws InstantiationException;
  +            throws InstantiationException;
   
       /**
        * Returns the configuration of a specific service. Services
  
  
  
  1.5       +5 -5      jakarta-turbine-2/src/java/org/apache/turbine/services/BaseService.java
  
  Index: BaseService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/BaseService.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BaseService.java	20 Dec 2002 00:04:12 -0000	1.4
  +++ BaseService.java	12 Feb 2003 00:03:43 -0000	1.5
  @@ -68,8 +68,8 @@
    * @version $Id$
    */
   public class BaseService
  -    extends BaseInitable
  -    implements Service
  +        extends BaseInitable
  +        implements Service
   {
       /** A reference to the ServiceBroker that instantiated this object. */
       protected ServiceBroker serviceBroker;
  @@ -87,7 +87,7 @@
        *
        * @param broker The ServiceBroker that instantiated this object.
        */
  -    public void setServiceBroker( ServiceBroker broker )
  +    public void setServiceBroker(ServiceBroker broker)
       {
           this.serviceBroker = broker;
       }
  @@ -97,7 +97,7 @@
        *
        * @param name The name of this Service.
        */
  -    public void setName( String name )
  +    public void setName(String name)
       {
           this.name = name;
       }
  
  
  
  1.2       +9 -9      jakarta-turbine-2/src/java/org/apache/turbine/services/InstantiationException.java
  
  Index: InstantiationException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/InstantiationException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InstantiationException.java	16 Aug 2001 05:08:47 -0000	1.1
  +++ InstantiationException.java	12 Feb 2003 00:03:43 -0000	1.2
  @@ -25,13 +25,13 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Apache" and "Apache Software Foundation" and 
  - *    "Apache Turbine" must not be used to endorse or promote products 
  - *    derived from this software without prior written permission. For 
  + * 4. The names "Apache" and "Apache Software Foundation" and
  + *    "Apache Turbine" must not be used to endorse or promote products
  + *    derived from this software without prior written permission. For
    *    written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  - *    "Apache Turbine", nor may "Apache" appear in their name, without 
  + *    "Apache Turbine", nor may "Apache" appear in their name, without
    *    prior written permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  @@ -67,7 +67,7 @@
    * @see org.apache.turbine.services.Initable
    */
   public class InstantiationException
  -    extends TurbineRuntimeException
  +        extends TurbineRuntimeException
   {
       /**
        * Construct an InstantiationException with specified detail
  @@ -75,7 +75,7 @@
        *
        * @param msg The detail message.
        */
  -    public InstantiationException( String msg )
  +    public InstantiationException(String msg)
       {
           super(msg);
       }
  @@ -85,10 +85,10 @@
        * and nested Throwable.
        *
        * @param msg The detail message.
  -     * @param nested the exception or error that caused this exception 
  +     * @param t the exception or error that caused this exception
        *               to be thrown.
        */
  -    public InstantiationException( String msg, Throwable t )
  +    public InstantiationException(String msg, Throwable t)
       {
           super(msg, t);
       }
  
  
  
  1.3       +4 -4      jakarta-turbine-2/src/java/org/apache/turbine/services/InitializationException.java
  
  Index: InitializationException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/InitializationException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InitializationException.java	11 Feb 2003 23:57:11 -0000	1.2
  +++ InitializationException.java	12 Feb 2003 00:03:43 -0000	1.3
  @@ -66,14 +66,14 @@
    * @see org.apache.turbine.services.Initable
    */
   public class InitializationException
  -    extends TurbineException
  +        extends TurbineException
   {
       /**
        * Construct an InitializationException with specified detail message.
        *
        * @param msg The detail message.
        */
  -    public InitializationException( String msg )
  +    public InitializationException(String msg)
       {
           super(msg);
       }
  @@ -86,7 +86,7 @@
        * @param t the exception or error that caused this exception
        *               to be thrown.
        */
  -    public InitializationException( String msg, Throwable t )
  +    public InitializationException(String msg, Throwable t)
       {
           super(msg, t);
       }
  
  
  
  1.3       +12 -12    jakarta-turbine-2/src/java/org/apache/turbine/services/Initable.java
  
  Index: Initable.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/Initable.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Initable.java	11 Jan 2003 18:42:32 -0000	1.2
  +++ Initable.java	12 Feb 2003 00:03:43 -0000	1.3
  @@ -25,13 +25,13 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Apache" and "Apache Software Foundation" and 
  - *    "Apache Turbine" must not be used to endorse or promote products 
  - *    derived from this software without prior written permission. For 
  + * 4. The names "Apache" and "Apache Software Foundation" and
  + *    "Apache Turbine" must not be used to endorse or promote products
  + *    derived from this software without prior written permission. For
    *    written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  - *    "Apache Turbine", nor may "Apache" appear in their name, without 
  + *    "Apache Turbine", nor may "Apache" appear in their name, without
    *    prior written permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  @@ -75,7 +75,7 @@
        *
        * @param broker The InitableBroker that instantiated this object.
        */
  -    void setInitableBroker( InitableBroker broker );
  +    void setInitableBroker(InitableBroker broker);
   
       /**
        * Performs early initailization of an Initable
  @@ -96,8 +96,8 @@
        * @exception InitializationException, if initilaization of this
        * class was not successful.
        */
  -    void init( Object data )
  -        throws InitializationException;
  +    void init(Object data)
  +            throws InitializationException;
   
       /**
        * Performs late initialization of an Initable.
  @@ -109,23 +109,23 @@
        * @exception InitializationException, if initialization of this
        * class was not successful.
        */
  -    void init( ) throws InitializationException;
  +    void init() throws InitializationException;
   
       /**
        * Returns an <code>Initable</code> to an uninitialized state.
        *
  -     * <p>This method must release all resources allocated by the 
  +     * <p>This method must release all resources allocated by the
        * <code>Initable</code> implementation, and resetting its internal state.
        * You may chose to implement this operation or not. If you support
        * this operation, getInit() should return false after successful
        * shutdown of the service.
        */
  -    void shutdown( );
  +    void shutdown();
   
       /**
        * Returns initialization status of an Initable.
        *
        * @return Initialization status of an Initable.
        */
  -    boolean getInit( );
  +    boolean getInit();
   }
  
  
  
  1.10      +29 -29    jakarta-turbine-2/src/java/org/apache/turbine/services/BaseServiceBroker.java
  
  Index: BaseServiceBroker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/BaseServiceBroker.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- BaseServiceBroker.java	13 Jan 2003 23:11:17 -0000	1.9
  +++ BaseServiceBroker.java	12 Feb 2003 00:03:43 -0000	1.10
  @@ -250,13 +250,13 @@
               String[] keyParts = StringUtils.split(key, ".");
   
               if ((keyParts.length == 3)
  -                && (keyParts[0] + ".").equals(SERVICE_PREFIX)
  -                && ("." + keyParts[2]).equals(CLASSNAME_SUFFIX))
  +                    && (keyParts[0] + ".").equals(SERVICE_PREFIX)
  +                    && ("." + keyParts[2]).equals(CLASSNAME_SUFFIX))
               {
                   String serviceKey = keyParts[1];
                   log.info("Added Mapping for Service: " + serviceKey);
   
  -                if(!mapping.containsKey(serviceKey))
  +                if (!mapping.containsKey(serviceKey))
                   {
                       mapping.setProperty(serviceKey,
                               configuration.getString(key));
  @@ -316,7 +316,7 @@
           // initialization.
           Service instance = getServiceInstance(name);
   
  -        if(!instance.getInit())
  +        if (!instance.getInit())
           {
               // this call might result in an indirect recursion
               instance.init();
  @@ -335,10 +335,10 @@
           {
               initServices(false);
           }
  -        catch(InstantiationException notThrown)
  +        catch (InstantiationException notThrown)
           {
           }
  -        catch(InitializationException notThrown)
  +        catch (InitializationException notThrown)
           {
           }
       }
  @@ -354,7 +354,7 @@
       public void initServices(boolean report)
               throws InstantiationException, InitializationException
       {
  -        if(report)
  +        if (report)
           {
               // Throw exceptions
               for(Iterator names = getServiceNames(); names.hasNext();)
  @@ -373,11 +373,11 @@
                   }
                           // In case of an exception, file an error message; the
                           // system may be still functional, though.
  -                catch(InstantiationException e)
  +                catch (InstantiationException e)
                   {
                       log.error(e);
                   }
  -                catch(InitializationException e)
  +                catch (InitializationException e)
                   {
                       log.error(e);
                   }
  @@ -394,7 +394,7 @@
               throws InstantiationException, InitializationException
       {
           // Only start up services that have their earlyInit flag set.
  -        if(getConfiguration(name).getBoolean("earlyInit", false))
  +        if (getConfiguration(name).getBoolean("earlyInit", false))
           {
               log.info("Start Initializing service (early): " + name);
               initService(name);
  @@ -415,10 +415,10 @@
           try
           {
               Service service = getServiceInstance(name);
  -            if(service != null && service.getInit())
  +            if (service != null && service.getInit())
               {
                   service.shutdown();
  -                if(service.getInit() && service instanceof BaseService)
  +                if (service.getInit() && service instanceof BaseService)
                   {
                       // BaseService::shutdown() does this by default,
                       // but could've been overriden poorly.
  @@ -426,7 +426,7 @@
                   }
               }
           }
  -        catch(InstantiationException e)
  +        catch (InstantiationException e)
           {
               // Assuming harmless -- log the error and continue.
               log.error("Shutdown of a nonexistent Service '"
  @@ -482,11 +482,11 @@
           try
           {
               service = getServiceInstance(name);
  -            if(!service.getInit())
  +            if (!service.getInit())
               {
                   synchronized(service.getClass())
                   {
  -                    if(!service.getInit())
  +                    if (!service.getInit())
                       {
                           log.info("Start Initializing service (late): " + name);
                           service.init();
  @@ -494,7 +494,7 @@
                       }
                   }
               }
  -            if(!service.getInit())
  +            if (!service.getInit())
               {
                   // this exception will be caught & rethrown by this very method.
                   // getInit() returning false indicates some initialization issue,
  @@ -505,7 +505,7 @@
               }
               return service;
           }
  -        catch(InitializationException e)
  +        catch (InitializationException e)
           {
               throw new InstantiationException("Service " + name +
                       " failed to initialize", e);
  @@ -534,10 +534,10 @@
       {
           Service service = (Service) services.get(name);
   
  -        if(service == null)
  +        if (service == null)
           {
               String className = mapping.getString(name);
  -            if(StringUtils.isEmpty(className))
  +            if (StringUtils.isEmpty(className))
               {
                   throw new InstantiationException(
                           "ServiceBroker: unknown service " + name + " requested");
  @@ -546,37 +546,37 @@
               {
                   service = (Service) services.get(className);
   
  -                if(service == null)
  +                if (service == null)
                   {
                       try
                       {
                           service = (Service) Class.forName(className).newInstance();
                       }
                               // those two errors must be passed to the VM
  -                    catch(ThreadDeath t)
  +                    catch (ThreadDeath t)
                       {
                           throw t;
                       }
  -                    catch(OutOfMemoryError t)
  +                    catch (OutOfMemoryError t)
                       {
                           throw t;
                       }
  -                    catch(Throwable t)
  +                    catch (Throwable t)
                       {
                           // Used to indicate error condition.
                           String msg = null;
   
  -                        if(t instanceof NoClassDefFoundError)
  +                        if (t instanceof NoClassDefFoundError)
                           {
                               msg = "A class referenced by " + className +
                                       " is unavailable. Check your jars and classes.";
                           }
  -                        else if(t instanceof ClassNotFoundException)
  +                        else if (t instanceof ClassNotFoundException)
                           {
                               msg = "Class " + className +
                                       " is unavailable. Check your jars and classes.";
                           }
  -                        else if(t instanceof ClassCastException)
  +                        else if (t instanceof ClassCastException)
                           {
                               msg = "Class " + className +
                                       " doesn't implement the Service interface";
  @@ -590,12 +590,12 @@
                       }
                   }
               }
  -            catch(ClassCastException e)
  +            catch (ClassCastException e)
               {
                   throw new InstantiationException("ServiceBroker: Class "
                           + className + " does not implement Service interface.", e);
               }
  -            catch(InstantiationException e)
  +            catch (InstantiationException e)
               {
                   throw new InstantiationException(
                           "Failed to instantiate service " + name, e);
  
  
  
  1.3       +12 -11    jakarta-turbine-2/src/java/org/apache/turbine/services/TurbineBaseService.java
  
  Index: TurbineBaseService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/TurbineBaseService.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TurbineBaseService.java	4 Jan 2003 04:24:44 -0000	1.2
  +++ TurbineBaseService.java	12 Feb 2003 00:03:44 -0000	1.3
  @@ -55,6 +55,7 @@
    */
   
   import javax.servlet.ServletConfig;
  +
   import org.apache.turbine.util.RunData;
   
   /**
  @@ -89,7 +90,7 @@
    * @version $Id$
    */
   public abstract class TurbineBaseService
  -    extends BaseService
  +        extends BaseService
   {
       /**
        * Performs early initialization.  Overrides init() method in
  @@ -100,16 +101,16 @@
        * @exception InitializationException if initialization of this
        * class was not successful.
        */
  -    public void init( Object data )
  -        throws InitializationException
  +    public void init(Object data)
  +            throws InitializationException
       {
           if (data instanceof ServletConfig)
           {
  -            init((ServletConfig)data);
  +            init((ServletConfig) data);
           }
           else if (data instanceof RunData)
           {
  -            init((RunData)data);
  +            init((RunData) data);
           }
       }
   
  @@ -122,8 +123,8 @@
        * class was not successful.
        * @deprecated Use init() instead
        */
  -    public void init( ServletConfig config )
  -        throws InitializationException
  +    public void init(ServletConfig config)
  +            throws InitializationException
       {
       }
   
  @@ -134,8 +135,8 @@
        * @exception InitializationException, if initialization of this
        * class was not successful.
        */
  -    public void init( RunData data )
  -        throws InitializationException
  +    public void init(RunData data)
  +            throws InitializationException
       {
       }
   
  @@ -150,7 +151,7 @@
        * class was not successful.
        */
       public void init()
  -        throws InitializationException
  +            throws InitializationException
       {
           setInit(true);
       }
  
  
  
  1.5       +5 -5      jakarta-turbine-2/src/java/org/apache/turbine/services/Service.java
  
  Index: Service.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/Service.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Service.java	11 Jan 2003 18:42:32 -0000	1.4
  +++ Service.java	12 Feb 2003 00:03:44 -0000	1.5
  @@ -55,8 +55,8 @@
    */
   
   import java.util.Properties;
  -import org.apache.commons.configuration.Configuration;
   
  +import org.apache.commons.configuration.Configuration;
   
   /**
    * <code>Services</code> are <code>Initables</code> that have a name,
  @@ -70,7 +70,7 @@
    * @version $Id$
    */
   public interface Service
  -    extends Initable
  +        extends Initable
   {
       /** The name of this service. */
       static final String SERVICE_NAME = "Service";
  @@ -82,7 +82,7 @@
        *
        * @param broker The ServiceBroker that instantiated this object.
        */
  -    void setServiceBroker( ServiceBroker broker );
  +    void setServiceBroker(ServiceBroker broker);
   
       /**
        * ServiceBroker uses this method to pass a Service its name.
  @@ -91,7 +91,7 @@
        *
        * @param name The name of this Service.
        */
  -    void setName( String name );
  +    void setName(String name);
   
       /**
        * Returns the name of this Service.
  
  
  
  1.5       +59 -7     jakarta-turbine-2/src/java/org/apache/turbine/services/BaseUnicastRemoteService.java
  
  Index: BaseUnicastRemoteService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/BaseUnicastRemoteService.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BaseUnicastRemoteService.java	20 Dec 2002 00:04:12 -0000	1.4
  +++ BaseUnicastRemoteService.java	12 Feb 2003 00:03:44 -0000	1.5
  @@ -1,10 +1,62 @@
   package org.apache.turbine.services;
   
  +/* ====================================================================
  + * The Apache Software License, Version 1.1
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache" and "Apache Software Foundation" and
  + *    "Apache Turbine" must not be used to endorse or promote products
  + *    derived from this software without prior written permission. For
  + *    written permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    "Apache Turbine", nor may "Apache" appear in their name, without
  + *    prior written permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
  +
   import java.rmi.RemoteException;
   import java.rmi.server.UnicastRemoteObject;
  -
   import java.util.Properties;
  -
   import javax.servlet.ServletConfig;
   
   import org.apache.commons.configuration.Configuration;
  @@ -17,7 +69,7 @@
    * @author <a href="mailto:dlr@collab.net">Daniel Rall</a>
    */
   public class BaseUnicastRemoteService extends UnicastRemoteObject
  -    implements Service
  +        implements Service
   {
       protected Configuration configuration;
       private boolean isInitialized;
  @@ -26,7 +78,7 @@
       private ServiceBroker serviceBroker;
   
       public BaseUnicastRemoteService()
  -        throws RemoteException
  +            throws RemoteException
       {
           isInitialized = false;
           initableBroker = null;
  @@ -56,7 +108,7 @@
       }
   
       public void init(ServletConfig config)
  -        throws InitializationException
  +            throws InitializationException
       {
           setInit(true);
       }
  @@ -72,7 +124,7 @@
       }
   
       public void init(Object data)
  -        throws InitializationException
  +            throws InitializationException
       {
           init((ServletConfig) data);
       }
  @@ -102,7 +154,7 @@
   
       public Properties getProperties()
       {
  -      return ConfigurationConverter.getProperties(getConfiguration());
  +        return ConfigurationConverter.getProperties(getConfiguration());
       }
   
       public void setName(String name)
  
  
  
  1.3       +12 -12    jakarta-turbine-2/src/java/org/apache/turbine/services/InitableBroker.java
  
  Index: InitableBroker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/InitableBroker.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InitableBroker.java	11 Jan 2003 18:42:32 -0000	1.2
  +++ InitableBroker.java	12 Feb 2003 00:03:44 -0000	1.3
  @@ -25,13 +25,13 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Apache" and "Apache Software Foundation" and 
  - *    "Apache Turbine" must not be used to endorse or promote products 
  - *    derived from this software without prior written permission. For 
  + * 4. The names "Apache" and "Apache Software Foundation" and
  + *    "Apache Turbine" must not be used to endorse or promote products
  + *    derived from this software without prior written permission. For
    *    written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  - *    "Apache Turbine", nor may "Apache" appear in their name, without 
  + *    "Apache Turbine", nor may "Apache" appear in their name, without
    *    prior written permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  @@ -100,20 +100,20 @@
        * @exception InitializationException, if initialization of this
        * class was not successful.
        */
  -    void initClass( String className,
  -                    Object data )
  -        throws InitializationException;
  +    void initClass(String className,
  +                   Object data)
  +            throws InitializationException;
   
       /**
        * Shutdowns an Initable class.
        *
  -     * This method is used to release resources allocated by an 
  +     * This method is used to release resources allocated by an
        * Initable class, and return it to initial (uninitailized)
        * state.
        *
        * @param className The name of the class to be uninitialized.
        */
  -    void shutdownClass( String className );
  +    void shutdownClass(String className);
   
       /**
        * Provides an instance of Initable class ready to work.
  @@ -128,6 +128,6 @@
        * @exception InstantiationException, if there was a problem
        * during instantiation or initialization of the Initable.
        */
  -    Initable getInitable( String className )
  -        throws InstantiationException;
  +    Initable getInitable(String className)
  +            throws InstantiationException;
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org