avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-cornerstone/apps/demo/src/java/org/apache/avalon/cornerstone/demos/simpleserver/classes ClassesTest.java
Date Wed, 21 Nov 2001 10:59:08 GMT
donaldp     01/11/21 02:59:08

  Modified:    apps/demo build.xml
               apps/demo/src/java/org/apache/avalon/cornerstone/demos/simpleserver
                        SimpleServer.java
  Added:       apps/demo/src/java/org/apache/avalon/cornerstone/demos/simpleserver/classes
                        ClassesTest.java
  Log:
  Add some code to test loading classes from SAR-INF/classes
  
  Revision  Changes    Path
  1.24      +5 -0      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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- build.xml	2001/11/20 12:22:20	1.23
  +++ build.xml	2001/11/21 10:59:08	1.24
  @@ -124,6 +124,7 @@
         <include name="org/apache/avalon/cornerstone/demos/simpleserver/*"/>
         <exclude name="org/apache/avalon/cornerstone/demos/simpleserver/extension1/*"/>
         <exclude name="org/apache/avalon/cornerstone/demos/simpleserver/extension2/*"/>
  +      <exclude name="org/apache/avalon/cornerstone/demos/simpleserver/classes/*"/>
       </jar>
   
       <jar jarfile="${build.lib}/demo-test-extension1.jar"
  @@ -148,6 +149,10 @@
            config="${conf.dir}/avalon-demo-config.xml"
            environment="${conf.dir}/avalon-demo-environment.xml"
            assembly="${conf.dir}/avalon-demo-assembly.xml" >
  +
  +      <zipfileset dir="${build.classes}" prefix="SAR-INF/classes">
  +        <include name="org/apache/avalon/cornerstone/demos/simpleserver/classes/*"/>
  +      </zipfileset>
   
         <lib dir="${build.lib}/">
           <include name="*.jar"/>
  
  
  
  1.7       +5 -0      jakarta-avalon-cornerstone/apps/demo/src/java/org/apache/avalon/cornerstone/demos/simpleserver/SimpleServer.java
  
  Index: SimpleServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/demo/src/java/org/apache/avalon/cornerstone/demos/simpleserver/SimpleServer.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SimpleServer.java	2001/11/20 12:23:51	1.6
  +++ SimpleServer.java	2001/11/21 10:59:08	1.7
  @@ -46,6 +46,7 @@
   import org.apache.avalon.phoenix.BlockContext;
   import org.apache.avalon.cornerstone.demos.simpleserver.extension1.ExtensionTestClass1;
   import org.apache.avalon.cornerstone.demos.simpleserver.extension2.ExtensionTestClass2;
  +import org.apache.avalon.cornerstone.demos.simpleserver.classes.ClassesTest;
   
   /**
    * This is a demo block used to demonstrate a simple server using Avalon. The
  @@ -149,6 +150,10 @@
   
           getLogger().info( "Connecting datagram socket..." );
           m_packetManager.connect( "udp/5053", datagramSocket, this );
  +        getLogger().info( "...successful" );
  +
  +        getLogger().info( "Testing a class loaded from SAR-INF/classes..." );
  +        ClassesTest.doClassesTest();
           getLogger().info( "...successful" );
   
           getLogger().info( "...Demo init" );
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/demo/src/java/org/apache/avalon/cornerstone/demos/simpleserver/classes/ClassesTest.java
  
  Index: ClassesTest.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.simpleserver.classes;
  
  /**
   * This is a class that resides in SAR-INF/classes and used to test
   * classloading from that location.
   */
  public class ClassesTest
  {
      public static void doClassesTest()
      {
          System.out.println( "ClassesTest.doClassesTest()" );
      }
  }
  
  
  
  
  
  

--
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