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/src/java/org/apache/avalon/cornerstone/blocks/connection DefaultConnectionManager.java
Date Sun, 03 Feb 2002 00:42:08 GMT
donaldp     02/02/02 16:42:08

  Modified:    .        build.xml
               src/java/org/apache/avalon/cornerstone/blocks/connection
                        DefaultConnectionManager.java
  Added:       src/manifest blockinfo-template.xml
               lib      LICENSE.xdoclet.txt log4j-core.jar xdoclet.jar
               .        gen-blockinfo.xml
  Log:
  Integrate a sample xdoclet template that can be used to generate the BlockInfo descriptors.
Will expand this support in the future.
  
  Revision  Changes    Path
  1.1                  jakarta-avalon-cornerstone/src/manifest/blockinfo-template.xml
  
  Index: blockinfo-template.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE blockinfo PUBLIC "-//PHOENIX/Block Info DTD Version 1.0//EN" 
                    "http://jakarta.apache.org/phoenix/blockinfo_1_0.dtd">
  
  <blockinfo>
  
    <!-- section to describe block -->
    <block>
      <version><XDtClass:classTagValue tagName="phoenix:version" default="1.0"/></version>
    </block>
  
    <!-- services that are offered by this block -->
    <services>
      <XDtClass:forAllClassTags tagName="phoenix:service">
        <service name="<XDtClass:classTagValue tagName="phoenix:service" paramName="name"/>"
                 version="<XDtClass:classTagValue tagName="phoenix:service" paramName="version"
default="1.0"/>" />
      </XDtClass:forAllClassTags>
    </services>
  
    <!-- services that are required by this block -->
    <dependencies>
      <XDtMethod:ifHasMethod name="compose" 
                             parameters="org.apache.avalon.framework.component.ComponentManager">
        <XDtMethod:setCurrentMethod name="compose"
                                    parameters="org.apache.avalon.framework.component.ComponentManager">
        <dependency>
          <service name="<XDtMethod:methodTagValue tagName="phoenix:dependency" paramName="name"/>"

                   version="<XDtMethod:methodTagValue tagName="phoenix:dependency" paramName="version"
default="1.0"/>"/>
        </dependency>
        </XDtMethod:setCurrentMethod>
      </XDtMethod:ifHasMethod>
    </dependencies>
  
  </blockinfo>
  
  
  
  1.1                  jakarta-avalon-cornerstone/lib/LICENSE.xdoclet.txt
  
  Index: LICENSE.xdoclet.txt
  ===================================================================
   Copyright (c) 2000-2002, XDoclet team
   All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modification, 
   are permitted provided that the following conditions are met:
  
   Redistributions of source code must retain the above copyright notice, this list 
   of conditions and the following disclaimer.
  
   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.
  
   Neither the name of the XDoclet team nor the names of its contributors may be used 
   to endorse or promote products derived from this software without specific prior
   written permission.
  
   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY 
   EXPRESS 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 REGENTS OR 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.
  
  
  1.1                  jakarta-avalon-cornerstone/lib/log4j-core.jar
  
  	<<Binary file>>
  
  
  1.1                  jakarta-avalon-cornerstone/lib/xdoclet.jar
  
  	<<Binary file>>
  
  
  1.88      +4 -0      jakarta-avalon-cornerstone/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/build.xml,v
  retrieving revision 1.87
  retrieving revision 1.88
  diff -u -r1.87 -r1.88
  --- build.xml	26 Jan 2002 08:21:56 -0000	1.87
  +++ build.xml	3 Feb 2002 00:42:08 -0000	1.88
  @@ -190,6 +190,10 @@
     
     </target>
   
  +  <target name="xdoclet" description="Generates the XML descriptors">
  +    <ant antfile="gen-blockinfo.xml"/>
  +  </target>
  +
     <!-- Performs unit tests -->
     <target name="test" depends="check"/>
     <target name="check" depends="compile" >
  
  
  
  1.1                  jakarta-avalon-cornerstone/gen-blockinfo.xml
  
  Index: gen-blockinfo.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <!--
  ==============================================================================
  
   Phoenix build file to generate BlockInfo from Javadoc tags
  
  Authors:
   Peter Donald <peter@apache.org>
  
  Legal:
    Copyright (c) 2002 The Apache Software Foundation. All Rights Reserved.
  
  ==============================================================================
  -->
  
  <project default="main" basedir=".">
  
    <property name="src.base" value="src"/>
    <property name="java.dir" value="${src.base}/java"/>
    <property name="lib.dir" value="lib"/>
  
    <!-- directory where you place generated code -->
    <property name="gen.dir" value="gen"/>
  
    <path id="project.class.path">
      <pathelement path="${java.class.path}" />
      <fileset dir="${lib.dir}">
        <include name="*.jar" />
      </fileset>
    </path>
  
    <!-- Main target -->
    <target name="main" depends="xdoclet" />
  
    <target name="check-uptodate">
      <!--
      <uptodate property="xdoclet.uptodate" targetfile="${gen.dir}/${antlib.descriptor}"
>
        <srcfiles dir= "${java.dir}" includes="${antlib.include}/*.java"/>
      </uptodate>
      -->
    </target>
  
    <!-- runs xdoclet if need be -->
    <target name="xdoclet" depends="check-uptodate" unless="xdoclet.uptodate">
      <taskdef name="xdoclet" classname="xdoclet.DocletTask" classpathref="project.class.path"/>
  
      <xdoclet sourcepath="${java.dir}" destdir="${gen.dir}" classpathref="project.class.path">
        <fileset dir="${java.dir}">
          <include name="org/apache/avalon/cornerstone/blocks/connection/*.java"/>
        </fileset>
        <template templateFile="${manifest.dir}/blockinfo-template.xml"
                  destinationfile="{0}.xml"
                  ofType="org.apache.avalon.phoenix.Block"
                  extent="hierarchy"/>
   
        <!--
        <template templateFile="${manifest.dir}/manifest-template.mf"
                  destinationfile="cornerstone.mf"/>
        -->
      </xdoclet>
    </target>
  
  </project>
  
  
  
  1.11      +6 -0      jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/connection/DefaultConnectionManager.java
  
  Index: DefaultConnectionManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/blocks/connection/DefaultConnectionManager.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- DefaultConnectionManager.java	11 Dec 2001 10:49:19 -0000	1.10
  +++ DefaultConnectionManager.java	3 Feb 2002 00:42:08 -0000	1.11
  @@ -28,6 +28,9 @@
    * This is the service through which ConnectionManagement occurs.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  + *
  + * @phoenix:version 1.3
  + * @phoenix:service name="org.apache.avalon.cornerstone.services.connection.ConnectionManager"
    */
   public class DefaultConnectionManager
       extends AbstractLogEnabled
  @@ -36,6 +39,9 @@
       private HashMap             m_connections        = new HashMap();
       private ThreadManager       m_threadManager;
   
  +    /**
  +     * @phoenix:dependency name="org.apache.avalon.cornerstone.services.threads.ThreadManager"
  +     */
       public void compose( final ComponentManager componentManager )
           throws ComponentException
       {
  
  
  

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