mcconnell    2002/09/10 16:07:21

  Modified:    assembly default.properties
               assembly/src/etc/activator server.xml
               assembly/src/idl demo.idl
               assembly/src/java/org/apache/excalibur/merlin
                        ExceptionHelper.java Main.java
               assembly/src/java/org/apache/excalibur/merlin/activation
                        DefaultRemoteResource.java
                        DefaultServantActivator.java package.html
               assembly/src/java/org/apache/excalibur/merlin/assembly
                        TypeManager.java
               assembly/src/java/org/apache/excalibur/merlin/resource
                        AbstractLifestyleHandler.java
               assembly/src/java/org/apache/excalibur/playground/activation
                        TestServant.xinfo
  Log:
  General debuging from deployment tests.
  
  Revision  Changes    Path
  1.13      +0 -1      jakarta-avalon-excalibur/assembly/default.properties
  
  Index: default.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/default.properties,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- default.properties        8 Sep 2002 16:53:55 -0000       1.12
  +++ default.properties        10 Sep 2002 23:07:18 -0000      1.13
  @@ -109,7 +109,6 @@
   conf.dir = ${src.dir}/conf
   test.dir = ${src.dir}/test
   
  -lib.dir = lib
   tools.dir=${basedir}/../../jakarta-avalon/tools
   
   #  Set the properties for distribution directories
  
  
  
  1.8       +1 -5      
jakarta-avalon-excalibur/assembly/src/etc/activator/server.xml
  
  Index: server.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/assembly/src/etc/activator/server.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- server.xml        9 Sep 2002 13:34:49 -0000       1.7
  +++ server.xml        10 Sep 2002 23:07:20 -0000      1.8
  @@ -16,10 +16,6 @@
         </target>
      </logging>
   
  -   <categories priority="INFO">
  -     <category priority="WARN"  name="loader" />
  -   </categories>
  -
      <classpath>
        <fileset dir="extensions">
          <include name="merlin-activation-1.0.jar"/>
  @@ -50,7 +46,7 @@
        </classpath>
   
        <component name="orb" class="org.apache.orb.ORB" activation="true">
  -        <categories priority="INFO"/>
  +        <categories priority="DEBUG"/>
           <configuration>
             <property name="iiop.port" value="2056"/>
             <initializer class="org.openorb.adapter.fwd.ForwardInitializer" 
name="forward"/>
  
  
  
  1.3       +0 -1      jakarta-avalon-excalibur/assembly/src/idl/demo.idl
  
  Index: demo.idl
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/idl/demo.idl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- demo.idl  9 Sep 2002 04:33:53 -0000       1.2
  +++ demo.idl  10 Sep 2002 23:07:20 -0000      1.3
  @@ -10,7 +10,6 @@
   {
       module activation
       {
  -
          /**
           * A simple minimal test system interface defintion.
           */
  
  
  
  1.3       +9 -45     
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/ExceptionHelper.java
  
  Index: ExceptionHelper.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/ExceptionHelper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ExceptionHelper.java      9 Sep 2002 13:34:50 -0000       1.2
  +++ ExceptionHelper.java      10 Sep 2002 23:07:20 -0000      1.3
  @@ -98,17 +98,6 @@
           }
       }
   
  -    private static void printCause( java.io.PrintStream out, Throwable e )
  -    {
  -        Throwable cause = getCause( e );
  -        out.println( "Cause: " + cause.toString() );
  -        if( getCause( cause ) != null ) 
  -        {
  -            printCause( out, cause );
  -        }
  -    }
  -
  -
      /**
       * Returns the exception and causal exceptions as a formatted string.
       * @param message the header message
  @@ -153,7 +142,7 @@
           return packCause( buffer, getCause( cause ) );
       }
   
  -    public static Throwable getLastThrowable( Throwable exception )
  +    private static Throwable getLastThrowable( Throwable exception )
       {
           Throwable cause = getCause( exception );
           if( cause != null )
  @@ -163,7 +152,7 @@
           return exception;
       }
   
  -    public static Throwable getCause( Throwable exception )
  +    private static Throwable getCause( Throwable exception )
       {
           if( exception == null ) 
           {
  @@ -187,7 +176,7 @@
        * @param throwable a <code>Throwable</code>
        * @return an array of Strings describing stack frames.
        */
  -    public static String[] captureStackTrace( final Throwable throwable )
  +    private static String[] captureStackTrace( final Throwable throwable )
       {
           final StringWriter sw = new StringWriter();
           throwable.printStackTrace( new PrintWriter( sw, true ) );
  @@ -200,9 +189,8 @@
        * @param string the string to split
        * @param onToken the token to split on
        * @return the resultant array
  -     * @deprecated This is an internal utility method that should not be used
        */
  -    public static String[] splitString( final String string, final String 
onToken )
  +    private static String[] splitString( final String string, final String 
onToken )
       {
           final StringTokenizer tokenizer = new StringTokenizer( string, 
onToken );
           final String[] result = new String[ tokenizer.countTokens() ];
  @@ -215,37 +203,13 @@
           return result;
       }
   
  -   /**
  -    * Returns a HTML formatted exception report.
  -    * @param message the header message
  -    * @param e the exception
  -    * @return String the HTML formatted string
  -    */
  -    public static String packExceptionAsHTML( final String message, final 
Throwable e )
  -    {
  -       String header = "<html><body><table>";
  -       String footer = "</table></body></html>";
  -       String error = header + "<tr bgcolor='#ccccff'><td 
valign=top>Message</td><td>" 
  -         + message + "</td></tr>";
  -       if( e == null ) 
  -       {
  -           return error + footer;
  -       }
  -       error = error + "<tr><td valign='top'>Exception</td><td>" 
  -            + e.getClass().getName() + " <br>" + e.getMessage() + 
"</td></tr>";
  -       return packCauseInTable( error, getCause( e ) ) + footer;
  -    }
  -
  -    private static String packCauseInTable( String s, Throwable cause )
  +    private static void printCause( java.io.PrintStream out, Throwable e )
       {
  -        if( cause == null ) 
  +        Throwable cause = getCause( e );
  +        out.println( "Cause: " + cause.toString() );
  +        if( getCause( cause ) != null ) 
           {
  -            return s;
  +            printCause( out, cause );
           }
  -        s = s + "<tr><td valign='top'>Cause:</td><td>" 
  -            + cause.getClass().getName() + " <br>" + cause.getMessage() + 
"</td></tr>";
  -        return packCauseInTable( s, getCause( cause ) );
       }
  -
  -
   }
  
  
  
  1.17      +4 -2      
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/Main.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Main.java 9 Sep 2002 04:33:53 -0000       1.16
  +++ Main.java 10 Sep 2002 23:07:20 -0000      1.17
  @@ -13,6 +13,8 @@
   import org.apache.avalon.framework.context.DefaultContext;
   import org.apache.avalon.framework.ExceptionUtil;
   
  +import org.apache.excalibur.merlin.kernel.KernelException;
  +
   /**
    * <p>Utility class supporting the establishment of a new 
<code>Controller</code>
    * based on a filename supplied under the command line line.</p>
  @@ -140,7 +142,7 @@
               controller.initialize();
               controller.start();
           }
  -        catch( ControllerException e )
  +        catch( KernelException e )
           {
               // its already been logged
           }
  
  
  
  1.6       +38 -4     
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/activation/DefaultRemoteResource.java
  
  Index: DefaultRemoteResource.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/activation/DefaultRemoteResource.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultRemoteResource.java        9 Sep 2002 04:33:53 -0000       1.5
  +++ DefaultRemoteResource.java        10 Sep 2002 23:07:20 -0000      1.6
  @@ -29,10 +29,44 @@
   import org.omg.CORBA.Policy;
   
   /**
  - * The <code>DefaultRemoteResource</code> is a resource implementation the 
  + * <p>The <code>DefaultRemoteResource</code> is a resource implementation 
the 
    * provides support for the establishment of a CORBA object reference to 
  - * a POA (PortableObjectAdapter) that is itself based on a component 
  - * implementation.  
  + * a POA (PortableObjectAdapter) that are based on a component 
  + * implementation.</p>
  + *
  + * <p>A component must declare the <code>merlin:resource-factory</code> 
  + * atttribute with the value 
  + * <code>org.apache.excalibur.merlin.activation.RemoteResourceFactory</code>.
  + * The factory will establish new instances of <code>RemoteResource</code>
  + * capable of handling remote activation requests.</p>
  + *
  + * <p>Component atttributes regignized by the handler are listed in the 
following table.</p>
  + *
  + * <table border="0" cellpadding="3" cellspacing="0" width="100%">
  + *   <tr>
  + *     <td valign="top"><b>Key</b></td><td><b>Value</b></td>
  + *   </tr>
  + *   <tr>
  + *     <td valign="top"><code>corba:poa.implementation</code></td>
  + *     <td><p>Declaration of the servant creation policy (either "delegate" 
or "servant").
  + *     With the delegate policy a POA is created using the tie mechanism.  
If the 
  + *     policy is servant based then the implemetation class must be derived 
from
  + *     the Servant interface (classic POA types).</p></td>
  + *   </tr>
  + *   <tr>
  + *     <td valign="top"><code>corba:poa.delegate</code></td>
  + *     <td><p>When building a delegate the resource implementation needs a 
  + *     reference to the POA tie class.  The POA tie object will be created
  + *     at the time of invocation of an operation by a client holding an 
  + *     object reference to the service.</p></td>
  + *   </tr>
  + *   <tr>
  + *     <td valign="top"><code>corba:poa.servant.id</code></td>
  + *     <td><p>The servant id attribute is used to construct an object 
reference to 
  + *     a POA backed by the component without requiring component 
instantiation. The 
  + *     attribute value is a IDL URI.</p></td>
  + *   </tr>
  + * </table>
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Stephen McConnell</a>
    * @version $Revision$ $Date$
  
  
  
  1.2       +8 -3      
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/activation/DefaultServantActivator.java
  
  Index: DefaultServantActivator.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/activation/DefaultServantActivator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultServantActivator.java      9 Sep 2002 04:33:53 -0000       1.1
  +++ DefaultServantActivator.java      10 Sep 2002 23:07:20 -0000      1.2
  @@ -173,12 +173,16 @@
   
           if( strategy.equals("delegate") )
           {
  +            String idl = profile.getType().getInfo().getAttribute(
  +               "corba:poa.idl", null );
  +
               String classname = profile.getType().getInfo().getAttribute(
                 "corba:poa.delegate", null );
               if( classname == null )
               {
                   final String error = 
  -                  "Missing 'corba:poa.delegate' attribute value in profile: 
" + profile.getName();
  +                  "Missing 'corba:poa.delegate' attribute value in profile: 
" 
  +                    + profile.getName();
                   throw new ActivationRuntimeException( error );
               }
   
  @@ -196,7 +200,8 @@
               try
               {
                   Constructor constructor = getConstructor( clazz );
  -                return (Servant)constructor.newInstance( new Object[]{ 
resource.access(), adapter } );
  +                return (Servant)constructor.newInstance( 
  +                  new Object[]{ resource.access(), adapter } );
               }
               catch( Throwable e )
               {
  
  
  
  1.5       +3 -32     
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/activation/package.html
  
  Index: package.html
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/activation/package.html,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- package.html      9 Sep 2002 14:35:40 -0000       1.4
  +++ package.html      10 Sep 2002 23:07:20 -0000      1.5
  @@ -7,42 +7,13 @@
   
   <table border="1" cellpadding="3" cellspacing="0" width="100%">
   <tr bgcolor="#ccccff">
  -<td colspan="2"><font size="+2"><b>Services</b></font></td>
  +<td colspan="2"><font size="+2"><b>Components</b></font></td>
   <tr><td width="20%" valign="top"><strong>[EMAIL PROTECTED] 
org.apache.excalibur.merlin.activation.Directory}</strong></td>
   <td>The <code>Directory</code> component is a container that implements 
corbaloc URL protocol support.  Clients can access the directory using corbaloc 
URL similar to <code>corbaloc:iiop:[EMAIL PROTECTED]:2056/public/demo</code>. 
The corbaloc URL handler on the client uses the JDK ORB to establish to request 
to the container. The container provides support for service location and 
mapping between corbaloc URLs and local service protocol URLs.  Object 
references passed back to the client are established using meta information 
associated with the server-side resource. Activation of the server will occur 
if and when the client invokes a an operation against a object reference 
returned from the URL.</td>
   </td></tr>
   <tr><td width="20%" valign="top"><strong>[EMAIL PROTECTED] 
org.apache.excalibur.merlin.activation.DefaultRemoteResourceFactory}</strong></td>
  -<td><p>This resource factory extends the standard resource factory through 
the addition of the CORBA POA machinery required to establish a CORBA Servant.  
Servants are created either via delagation or by extension of a generated POA 
class. The factory and the related DefaultRemoteResource handler leverage 
attributs contained within a component to automate the establishment of the POA 
servant management model. Component atttributes regignized by the handler are 
listed in the following table.</p>
  -
  -  <table border="0" cellpadding="3" cellspacing="0" width="100%">
  -    <tr>
  -      <td valign="top"><b>Key</b></td><td><b>Value</b></td>
  -    </tr>
  -    <tr>
  -      <td valign="top"><code>merlin:resource-factory</code></td>
  -      <td><p>Declaration of a resource factory interface that specifices the 
type of factory that the container shall use when generating a resource for the 
component type.</p></td>
  -    </tr>
  -    <tr>
  -      <td valign="top"><code>corba:poa.implementation</code></td>
  -      <td><p>Declaration of the servant creation policy (either "delegate" 
or "servant").
  -      With the delegate policy a POA is created using the tie mechanism.  If 
the 
  -      policy is servant based then the implemetation class must be derived 
from
  -      the Servant interface (classic POA types).</p></td>
  -    </tr>
  -    <tr>
  -      <td valign="top"><code>corba:poa.delegate</code></td>
  -      <td><p>When building a delegate the resource implementation needs a 
  -      reference to the POA tie class.  The POA tie object will be created
  -      at the time of invocation of an operation by a client holding an 
  -      object reference to the service.</p></td>
  -    </tr>
  -    <tr>
  -      <td valign="top"><code>corba:poa.servant.id</code></td>
  -      <td><p>The servant id attribute is used to construct an object 
reference to 
  -      a POA backed by the component without requiring component 
instantiation. The 
  -      attribute value is a IDL URI.</p></td>
  -    </tr>
  -  </table>
  +<td><p>This resource factory extends the standard resource factory through 
the addition of the CORBA POA machinery required to establish a CORBA Servant.  
Servants are created either via delagation or by extension of a generated POA 
class. The factory and the related DefaultRemoteResource handler leverage 
attributes contained within a component to automate the establishment of the 
POA servant management system.</p>
  +<p>Components wishing to be published as a remote reference should define 
the attribute <code>merlin:resource-factory</code> with a value of 
org.apache.excalibur.merlin.activation.RemoteResourceFactory</p>
   </td>
   </table>
   
  
  
  
  1.20      +5 -4      
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/TypeManager.java
  
  Index: TypeManager.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/TypeManager.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- TypeManager.java  9 Sep 2002 04:33:53 -0000       1.19
  +++ TypeManager.java  10 Sep 2002 23:07:21 -0000      1.20
  @@ -219,7 +219,6 @@
           // handle the bootstrap process
           //
   
  -        File root = new File( System.getProperty( "user.dir" ) ); 
           if( m_bootstrap )
           {
               String sep = System.getProperty("path.separator");
  @@ -229,7 +228,7 @@
               while( tokenizer.hasMoreTokens() )
               {
                   String token = tokenizer.nextToken();
  -                URL jar = new File( root, token ).toURL();
  +                URL jar = new File( token ).toURL();
                   scan( jar );
               }
   
  @@ -355,7 +354,9 @@
           }
           catch( IOException e )
           {
  -            final String error = "IO exception while attempt to read 
manifest.";
  +            final String error = 
  +              "IO exception while attempt to read manifest. from the url: "
  +              + url;
               throw new TypeRuntimeException( error, e );
           }
           catch( Throwable e )
  
  
  
  1.10      +1 -1      
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/resource/AbstractLifestyleHandler.java
  
  Index: AbstractLifestyleHandler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/resource/AbstractLifestyleHandler.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AbstractLifestyleHandler.java     31 Aug 2002 14:54:00 -0000      1.9
  +++ AbstractLifestyleHandler.java     10 Sep 2002 23:07:21 -0000      1.10
  @@ -163,7 +163,7 @@
        * @return an instance of the type defined by the profile
        * @exception Exception if an error occurs while attemping to aquire the 
object
        */
  -    public abstract Object get() throws Exception;
  +     public abstract Object get() throws Exception;
   
       /**
        * Invoked by a client to return an instance of the object type 
previously 
  
  
  
  1.3       +1 -1      
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/activation/TestServant.xinfo
  
  Index: TestServant.xinfo
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/playground/activation/TestServant.xinfo,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestServant.xinfo 9 Sep 2002 13:34:50 -0000       1.2
  +++ TestServant.xinfo 10 Sep 2002 23:07:21 -0000      1.3
  @@ -29,7 +29,7 @@
         <attribute key="corba:poa.implementation" value="delegate"/>
   
         <!--
  -      When building with a delegate, the resource implementation needs a 
  +      When building a delegate, the resource implementation needs a 
         reference to the POA tie class.  The POA tie object will be created
         at the time of invocation of an operation by a client holding an 
         object reference to the service.
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to