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 GenericDeploymentTool.java WeblogicDeploymentTool.java
Date Wed, 14 Mar 2001 01:59:50 GMT
conor       01/03/13 17:59:50

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/ejb
                        GenericDeploymentTool.java
                        WeblogicDeploymentTool.java
  Log:
  Define DTDs for the generic cae and not just the weblogic case
  
  I took Robert's patch and refactored it a little to avoid
  duplicating the code in the weblogic deployment descriptor.
  
  Submitted by:	Robert Watkins [robert.watkins@qsipayments.com]
  
  Revision  Changes    Path
  1.16      +22 -3     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
  
  Index: GenericDeploymentTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- GenericDeploymentTool.java	2001/03/14 01:22:22	1.15
  +++ GenericDeploymentTool.java	2001/03/14 01:59:49	1.16
  @@ -269,10 +269,29 @@
           }
       }
   
  -    protected DescriptorHandler getDescriptorHandler(File srcDir) {
  -        return new DescriptorHandler(task, srcDir);
  -    }
  +    protected DescriptorHandler getDescriptorHandler(File srcDir) { 
  +        DescriptorHandler handler = new DescriptorHandler(getTask(), srcDir); 
  +        
  +        registerKnownDTDs(handler);
  +        
  +        // register any DTDs supplied by the user
  +        for (Iterator i = getConfig().dtdLocations.iterator(); i.hasNext();) { 
  +            EjbJar.DTDLocation dtdLocation = (EjbJar.DTDLocation)i.next(); 
  +            handler.registerDTD(dtdLocation.getPublicId(), dtdLocation.getLocation());

  +        } 
  +        return handler; 
  +    } 
       
  +    /**
  +     * Register the locations of all known DTDs.
  +     *
  +     * vendor-specific subclasses should override this method to define
  +     * the vendor-specific locations of the EJB DTDs
  +     */
  +    protected void registerKnownDTDs(DescriptorHandler handler) {
  +        // none to register for generic
  +    }
  +
       public void processDescriptor(String descriptorFileName, SAXParser saxParser) {
           FileInputStream descriptorStream = null;
   
  
  
  
  1.21      +2 -13     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
  
  Index: WeblogicDeploymentTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- WeblogicDeploymentTool.java	2001/03/14 01:22:22	1.20
  +++ WeblogicDeploymentTool.java	2001/03/14 01:59:49	1.21
  @@ -255,23 +255,12 @@
           this.newCMP = newCMP;
       }
       
  -
  -    protected DescriptorHandler getDescriptorHandler(File srcDir) {
  -        DescriptorHandler handler = new DescriptorHandler(getTask(), srcDir);
  -        // register all the DTDs, both the ones that are known and
  -        // any supplied by the user
  +    protected void registerKnownDTDs(DescriptorHandler handler) {
  +        // register all the known DTDs
           handler.registerDTD(PUBLICID_EJB11, DEFAULT_WL51_EJB11_DTD_LOCATION);
           handler.registerDTD(PUBLICID_EJB11, DEFAULT_WL60_EJB11_DTD_LOCATION);
           handler.registerDTD(PUBLICID_EJB11, ejb11DTD);
           handler.registerDTD(PUBLICID_EJB20, DEFAULT_WL60_EJB20_DTD_LOCATION);
  -        
  -        for (Iterator i = getConfig().dtdLocations.iterator(); i.hasNext();) {
  -            EjbJar.DTDLocation dtdLocation = (EjbJar.DTDLocation)i.next();
  -            handler.registerDTD(dtdLocation.getPublicId(),
  -                                dtdLocation.getLocation());
  -        }
  -        
  -        return handler;                                    
       }
   
       protected DescriptorHandler getWeblogicDescriptorHandler(final File srcDir) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ant-dev-help@jakarta.apache.org


Mime
View raw message