avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-avalon-cornerstone/apps/demo/src/manifest rmihelloworld-demo.mf
Date Fri, 11 Jan 2002 11:22:13 GMT
colus       02/01/11 03:22:12

  Modified:    apps/demo build.xml
  Added:       apps/demo/src/conf avalon-rmidemo-assembly.xml
                        avalon-rmidemo-config.xml
                        avalon-rmidemo-environment.xml
               apps/demo/src/java/org/apache/avalon/cornerstone/demos/rmihelloworldserver
                        RMIHelloWorldClient.java
               apps/demo/src/manifest rmihelloworld-demo.mf
  Log:
  Demo for RMIfication.
  
  Revision  Changes    Path
  1.31      +56 -14    jakarta-avalon-cornerstone/apps/demo/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/demo/build.xml,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- build.xml	29 Dec 2001 17:39:17 -0000	1.30
  +++ build.xml	11 Jan 2002 11:22:12 -0000	1.31
  @@ -46,7 +46,7 @@
   
     <path id="project.class.path">
       <pathelement path="${java.class.path}" />
  -    <pathelement location="../../../jakarta-avalon/tools/lib/xerces.jar"/>  
  +    <pathelement location="../../../jakarta-avalon/tools/lib/xerces.jar"/>
       <pathelement path="${build.classes}" />
       <pathelement path="../../build/classes" />
   
  @@ -99,11 +99,11 @@
   
     <!-- Compiles project -->
     <target name="compile">
  -  
  +
       <ant antfile="build.xml" dir="../.." target="jars" inheritall="false"/>
  -    
  -    <available classname="electric.registry.Registry" 
  -        classpathref="project.class.path" 
  +
  +    <available classname="electric.registry.Registry"
  +        classpathref="project.class.path"
           property="glue.present"/>
   
       <mkdir dir="${build.classes}"/>
  @@ -116,9 +116,15 @@
         <classpath refid="project.class.path" />
   
         <exclude name="org/apache/avalon/cornerstone/demos/soaphelloworldserver/**.java"
  -               unless="glue.present" />               
  +               unless="glue.present" />
       </javac>
   
  +    <rmic base="${build.classes}"
  +          classname="org.apache.avalon.cornerstone.demos.rmihelloworldserver.RMIHelloWorldServerImpl"
  +          stubVersion="1.2">
  +      <classpath refid="project.class.path"/>
  +    </rmic>
  +
       <copy todir="${build.classes}">
         <fileset dir="${java.dir}">
           <exclude name="**/test/**"/>
  @@ -145,12 +151,18 @@
         <include name="org/apache/avalon/cornerstone/demos/soaphelloworldserver/*"/>
       </jar>
   
  +    <jar jarfile="${build.lib}/demo-rmihelloworld.jar"
  +         basedir="${build.classes}"
  +         manifest="${manifest.dir}/rmihelloworld-demo.mf">
  +      <include name="org/apache/avalon/cornerstone/demos/rmihelloworldserver/*"/>
  +    </jar>
  +
     </target>
   
     <target name="main" depends="sars" description="Default target to generate build products
minus docs"/>
     <target name="all" depends="main,docs" description="Generate build products including
docs"/>
   
  -  <target name="sars" depends="jars,soapdemo-sar">
  +  <target name="sars" depends="jars,soapdemo-sar,rmidemo-sar">
   
       <sar sarfile="${build.lib}/avalon-demo.sar"
            config="${conf.dir}/avalon-demo-config.xml"
  @@ -177,7 +189,7 @@
   
     </target>
   
  -  <target name="soapdemo-sar" depends="jars" if="glue.present">    
  +  <target name="soapdemo-sar" depends="jars" if="glue.present">
   
       <sar sarfile="${build.lib}/avalon-soapdemo.sar"
            config="${conf.dir}/avalon-gluedemo-config.xml"
  @@ -204,8 +216,27 @@
         </lib>
       </sar>
   
  -  </target>    
  -  
  +  </target>
  +
  +  <target name="rmidemo-sar" depends="jars">
  +
  +    <sar sarfile="${build.lib}/avalon-rmidemo.sar"
  +         config="${conf.dir}/avalon-rmidemo-config.xml"
  +         environment="${conf.dir}/avalon-rmidemo-environment.xml"
  +         assembly="${conf.dir}/avalon-rmidemo-assembly.xml" >
  +
  +      <lib dir="${build.lib}/">
  +        <include name="demo-rmihelloworld.jar"/>
  +      </lib>
  +
  +      <lib dir="../../build/lib">
  +        <include name="cornerstone.jar"/>
  +      </lib>
  +
  +    </sar>
  +
  +  </target>
  +
     <!-- Performs unit tests -->
     <target name="check" depends="compile" description="Perform any built in tests">
     </target>
  @@ -214,11 +245,22 @@
     <target name="check-soap" depends="compile" if="glue.present">
       <java classname="org.apache.avalon.cornerstone.demos.soaphelloworldserver.SOAPHelloWorldServerTester">
         <classpath refid="project.class.path" />
  -    </java>    
  +    </java>
     </target>
   
  +  <!-- Performs unit tests -->
     <target name="soap-demo-test" depends="check-soap" description="Change the HelloWorld
message via the SOAP API (a test aid)"/>
   
  +  <!-- Performs rmi related unit tests -->
  +  <target name="check-rmi" depends="compile">
  +    <java classname="org.apache.avalon.cornerstone.demos.rmihelloworldserver.RMIHelloWorldClient">
  +        <classpath refid="project.class.path" />
  +    </java>
  +  </target>
  +
  +  <!-- Performs unit tests -->
  +  <target name="rmi-demo-test" depends="check-rmi" description="Change the HelloWorld
message via the RMI API (a test aid)"/>
  +
     <!-- Create the API documentation -->
     <target name="javadocs" description="Generates the Java Docs">
   
  @@ -292,9 +334,9 @@
         <fileset dir="${build.docs}">
           <include name="**"/>
         </fileset>
  -    </copy>    
  +    </copy>
       <echo>two</echo>
  -    
  +
     </target>
   
     <!-- Completely build all dists -->
  @@ -349,7 +391,7 @@
   
     </target>
   
  -  <!-- Creates all the .sar files -->  
  +  <!-- Creates all the .sar files -->
     <target name="bin-dist" depends="all" >
   
       <!-- bin.dist.dir usually set before this target is called -->
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/demo/src/conf/avalon-rmidemo-assembly.xml
  
  Index: avalon-rmidemo-assembly.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <assembly>
  
    <block-listener class="org.apache.avalon.cornerstone.services.rmification.RMIficationListener"
                    name="rmification-listener"/>
  
    <block class="org.apache.avalon.cornerstone.blocks.rmification.DefaultRMIfication"
           name="rmification"/>
  
    <block class="org.apache.avalon.cornerstone.demos.rmihelloworldserver.RMIHelloWorldServerImpl"
           name="rmihelloworld"/>
  
  </assembly>
  
  
  1.1                  jakarta-avalon-cornerstone/apps/demo/src/conf/avalon-rmidemo-config.xml
  
  Index: avalon-rmidemo-config.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <config>
  
    <rmification-listener>
  
      <publisher>rmification</publisher>
  
      <publish block="rmihelloworld" name="org/apache/avalon/cornerstone/demos/rmihelloworldserver/RMIHelloWorldServer"/>
  
    </rmification-listener>
  
    <rmification>
      <port>9999</port>
    </rmification>
  
  </config>
  
  
  1.1                  jakarta-avalon-cornerstone/apps/demo/src/conf/avalon-rmidemo-environment.xml
  
  Index: avalon-rmidemo-environment.xml
  ===================================================================
  <?xml version="1.0"?>
  <!--
                                  README!
  
      Basic config file that sets up context for server application.
  
  -->
  <environment>
  
      <logs>
  
        <category name="" target="default" priority="DEBUG" />
  
        <log-target name="default" location="/logs/avalon-rmidemo.log" />
  
      </logs>
  
      <policy>
        <grant code-base="file:${app.home}${/}SAR-INF${/}lib${/}*">
          <permission class="java.security.AllPermission" />
        </grant>
      </policy>
  
  </environment>
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/demo/src/java/org/apache/avalon/cornerstone/demos/rmihelloworldserver/RMIHelloWorldClient.java
  
  Index: RMIHelloWorldClient.java
  ===================================================================
  /*
   * 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 file.
   */
  package org.apache.avalon.cornerstone.demos.rmihelloworldserver;
  
  import java.rmi.RemoteException;
  import java.rmi.registry.Registry;
  import java.rmi.registry.LocateRegistry;
  
  /**
   * Client for <code>RMIHelloWorldServer</code>.
   *
   * @author <a href="mailto:colus@apache.org">Eung-ju Park</a>
   */
  public class RMIHelloWorldClient
  {
      public static void main( final String[] args )
          throws Exception
      {
          final String host = args[ 0 ];
          final int port = Integer.parseInt( args[ 1 ] );
          final String yourName = args[ 2 ];
  
          final Registry registry = LocateRegistry.getRegistry( host, port );
          final RMIHelloWorldServer server = (RMIHelloWorldServer)registry.lookup( "org/apache/avalon/cornerstone/demos/rmihelloworldserver/RMIHelloWorldServer"
);
          System.out.println( "sayHello( " + yourName + " ): " + server.sayHello( yourName)
);
      }
  }
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/demo/src/manifest/rmihelloworld-demo.mf
  
  Index: rmihelloworld-demo.mf
  ===================================================================
  Manifest-Version: 1.0
  Created-By: Apache Avalon Project
  
  Name: org/apache/avalon/cornerstone/demos/rmihelloworldserver/RMIHelloWorldServerImpl.class
  Avalon-Block: true
  
  
  

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


Mime
View raw message