ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb DescriptorHandler.java
Date Wed, 15 Nov 2000 12:47:57 GMT
conor       00/11/15 04:47:56

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/ejb
                        DescriptorHandler.java
  Log:
  Handle ejb-ref elements.
  
  Ignore the <home> and <remote> elements in the embedded within <ejb-ref>
elements.
  
  Revision  Changes    Path
  1.3       +15 -1     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java
  
  Index: DescriptorHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DescriptorHandler.java	2000/11/15 06:38:34	1.2
  +++ DescriptorHandler.java	2000/11/15 12:47:56	1.3
  @@ -74,6 +74,7 @@
        * Bunch of constants used for storing entries in a hashtable, and for
        * constructing the filenames of various parts of the ejb jar.
        */
  +    private static final String EJB_REF   = "ejb-ref";
       private static final String HOME_INTERFACE   = "home";
       private static final String REMOTE_INTERFACE = "remote";
       private static final String BEAN_CLASS       = "ejb-class";
  @@ -102,6 +103,8 @@
       
       private Hashtable resourceDTDs = new Hashtable();
   
  +    private boolean inEJBRef = false;
  +
       /**
        * The directory containing the bean classes and interfaces. This is 
        * used for performing dependency file lookups.
  @@ -160,6 +163,7 @@
       public void startDocument() throws SAXException {
           this.ejbFiles = new Hashtable(10, 1);
           this.currentElement = null;
  +        inEJBRef = false;
       }
   
   
  @@ -173,7 +177,10 @@
       public void startElement(String name, AttributeList attrs) 
           throws SAXException {
           this.currentElement = name;
  -        currentText = "";            
  +        currentText = "";
  +        if (name.equals(EJB_REF)) {
  +            inEJBRef = true;
  +        }
       }
   
   
  @@ -190,6 +197,9 @@
           processElement();
           currentText = "";
           this.currentElement = "";
  +        if (name.equals(EJB_REF)) {
  +            inEJBRef = false;
  +        }
       }
   
       /**
  @@ -215,6 +225,10 @@
       
       
       protected void processElement() {
  +        if (inEJBRef) {
  +            return;
  +        }
  +        
           if (currentElement.equals(HOME_INTERFACE)   ||
               currentElement.equals(REMOTE_INTERFACE) ||
               currentElement.equals(BEAN_CLASS)       ||
  
  
  

Mime
View raw message