ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb DescriptorHandler.java
Date Sun, 12 Aug 2001 09:23:18 GMT
conor       01/08/12 02:23:18

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/ejb Tag:
                        ANT_14_BRANCH DescriptorHandler.java
  Log:
  Add in the check for ejb-refs again. I removed it when I shouldn't have.
  D'Oh
  
  Reported by:	Shamberger, Michael <Michael.Shamberger@morganstanley.com>
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.11.2.1  +14 -3     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.11
  retrieving revision 1.11.2.1
  diff -u -r1.11 -r1.11.2.1
  --- DescriptorHandler.java	2001/08/08 11:43:35	1.11
  +++ DescriptorHandler.java	2001/08/12 09:23:18	1.11.2.1
  @@ -87,6 +87,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";
  @@ -130,6 +131,8 @@
       
       private Hashtable resourceDTDs = new Hashtable();
   
  +    private boolean inEJBRef = false;
  +
       private Hashtable urlDTDs = new Hashtable();
   
       /**
  @@ -244,6 +247,7 @@
       public void startDocument() throws SAXException {
           this.ejbFiles = new Hashtable(10, 1);
           this.currentElement = null;
  +        inEJBRef = false;
       }
   
   
  @@ -258,7 +262,10 @@
           throws SAXException {
           this.currentElement = name;
           currentText = "";
  -        if (parseState == STATE_LOOKING_EJBJAR && name.equals(EJB_JAR)) {
  +        if (name.equals(EJB_REF)) {
  +            inEJBRef = true;
  +        }
  +        else if (parseState == STATE_LOOKING_EJBJAR && name.equals(EJB_JAR)) {
               parseState = STATE_IN_EJBJAR;
           }
           else if (parseState == STATE_IN_EJBJAR && name.equals(ENTERPRISE_BEANS))
{
  @@ -286,7 +293,10 @@
           processElement();
           currentText = "";
           this.currentElement = "";
  -        if (parseState == STATE_IN_ENTITY && name.equals(ENTITY_BEAN )) {
  +        if (name.equals(EJB_REF)) {
  +            inEJBRef = false;
  +        }
  +        else if (parseState == STATE_IN_ENTITY && name.equals(ENTITY_BEAN )) {
               parseState = STATE_IN_BEANS;
           }
           else if (parseState == STATE_IN_SESSION && name.equals(SESSION_BEAN)) {
  @@ -323,7 +333,8 @@
       
       
       protected void processElement() {
  -        if (parseState != STATE_IN_ENTITY && parseState != STATE_IN_SESSION) {
  +        if (inEJBRef || 
  +            (parseState != STATE_IN_ENTITY && parseState != STATE_IN_SESSION))
{
               return;
           }
           
  
  
  

Mime
View raw message