[wsas-java-dev] [Fwd: Re: svn commit: r544198 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: deployment/DeploymentEngine.java deployment/WarBasedAxisConfigurator.java description/AxisService.java description/AxisServiceGroup.java]

Deepal Jayasinghe deepal at wso2.com
Tue Jun 5 08:07:26 PDT 2007


> How about adding a Jetty dependency to the integration test module and
> spinning up a Jetty instance to test?
>
> Having stuff that we don't test worries me, and increases the
> likelihood that might break dependent projects like WSAS later.
+1, may be action item for Axis2 Hackathon.

Thanks
Deepal
>
> --Glen
>
> Deepal Jayasinghe wrote:
>> Hi Glen ,
>>
>> It was very difficult to add a test case to Axis2 since the feature only
>> support in Application servers.
>>
>> Thanks
>> Deepal
>>
>> Glen Daniels wrote:
>>> Hi Saminda!
>>>
>>> +1 to keeping the feature if it's getting use.  Are there tests for
>> this in the Axis source tree to make sure it's working, independent of
>> the WSAS runtime?
>>> --Glen
>>>
>>> Saminda Abeyruwan wrote:
>>> Dear Dims,
>>>
>>> Web Resources feature has been used extensively in WSAS (Chad sample).
>>> All the tools in Oxygen Tank, such as MAR Validator, AAR Validator and
>>> WSDLConvertor tools are used the web resources feature to get the
>>> static
>>> UI part. We could even give dynamic pages for Web resources if the
>>> container support it. We tested these using WSAS.
>>>
>>> We would like have this feature back again. As Dr.Sanjiva always
>>> saying,
>>> we are eating our dog food in WSAS :).
>>>
>>> Thank you
>>>
>>> Saminda
>>>>
>> ------------------------------------------------------------------------
>> Subject:
>> Re: svn commit: r544198 - in
>> /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2:
>> deployment/DeploymentEngine.java
>> deployment/WarBasedAxisConfigurator.java description/AxisService.java
>> description/AxisServiceGroup.java
>> From:
>> Deepal Jayasinghe <deepal at opensource.lk>
>> Date:
>> Tue, 05 Jun 2007 11:38:08 +0530
>> To:
>> dims at apache.org
>> To:
>> dims at apache.org
>> CC:
>> axis2-cvs at ws.apache.org, "axis-dev at ws.apache.org"
>> <axis-dev at ws.apache.org>
>>>>
>> Hi Dims,
>> Why did you remove addAsWebResources method ?
>> It is very useful feature where user can deploy service with web
>> resources (WWW directory) , and then we make available to access.
>> I am -1 on removing this feature , so please revert the changes.
>> Thanks
>> Deepal
>>>>
>> dims at apache.org wrote:
>>>>> Author: dims
>>>>> Date: Mon Jun  4 11:25:53 2007
>>>>> New Revision: 544198
>>>>>
>>>>> URL: http://svn.apache.org/viewvc?view=rev&rev=544198
>>>>> Log:
>>>>> remove commented out and possibly unused code
>>>>>
>>>>> Modified:
>>>>>    
>> webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
>>
>>>>>    
>> webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java
>>
>>>>>    
>> webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
>>
>>>>>    
>> webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java
>>
>>>>> Modified:
>> webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
>>
>>>>> URL:
>> http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java?view=diff&rev=544198&r1=544197&r2=544198
>>
>> ==============================================================================
>>
>>>>> ---
>> webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
>>
>> (original)
>>>>> +++
>> webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
>>
>> Mon Jun  4 11:25:53 2007
>>>>> @@ -51,13 +51,6 @@
>>>>>  public abstract class DeploymentEngine implements
>>>>> DeploymentConstants {
>>>>>      private static final Log log =
>> LogFactory.getLog(DeploymentEngine.class);
>>>>> -    //to keep the web resource location if any
>>>>> -    protected static String webLocationString = null;
>>>>> -
>>>>> -    public static void setWebLocationString(String
>>>>> webLocationString) {
>>>>> -        DeploymentEngine.webLocationString = webLocationString;
>>>>> -    }
>>>>> -
>>>>>      /**
>>>>>       * Support for hot update is controlled by this flag
>>>>>       */
>>>>> @@ -433,10 +426,6 @@
>>>>>                                         AxisConfiguration
>> axisConfiguration) throws AxisFault {
>>>>>          fillServiceGroup(serviceGroup, serviceList, serviceLocation,
>> axisConfiguration);
>>>>>          axisConfiguration.addServiceGroup(serviceGroup);
>>>>> -        if (currentDeploymentFile != null) {
>>>>> -            addAsWebResources(currentDeploymentFile.getFile(),
>>>>> -                              serviceGroup.getServiceGroupName(),
>> serviceGroup);
>>>>> -        }
>>>>>      }
>>>>>
>>>>>      protected static void fillServiceGroup(AxisServiceGroup
>> serviceGroup,
>>>>> @@ -509,51 +498,6 @@
>>>>>          }
>>>>>      }
>>>>>
>>>>> -    private static void addAsWebResources(File in,
>>>>> -                                          String serviceFileName,
>>>>> -                                          AxisServiceGroup
>> serviceGroup) {
>>>>> -        try {
>>>>> -            if (webLocationString == null) {
>>>>> -                return;
>>>>> -            }
>>>>> -            if (in.isDirectory()) {
>>>>> -                return;
>>>>> -            }
>>>>> -            File webLocation = new File(webLocationString);
>>>>> -            File out = new File(webLocation, serviceFileName);
>>>>> -            int BUFFER = 1024;
>>>>> -            byte data[] = new byte[BUFFER];
>>>>> -            FileInputStream fin = new FileInputStream(in);
>>>>> -            ZipInputStream zin = new ZipInputStream(
>>>>> -                    fin);
>>>>> -            ZipEntry entry;
>>>>> -            while ((entry = zin.getNextEntry()) != null) {
>>>>> -                ZipEntry zip = new ZipEntry(entry);
>>>>> -                if (zip.getName().toUpperCase().startsWith("WWW")) {
>>>>> -                    String fileName = zip.getName();
>>>>> -                    fileName = fileName.substring("WWW/".length(),
>>>>> -                                                 
>>>>> fileName.length());
>>>>> -                    if (zip.isDirectory()) {
>>>>> -                        new File(out, fileName).mkdirs();
>>>>> -                    } else {
>>>>> -                        FileOutputStream tempOut = new
>> FileOutputStream(new File(out, fileName));
>>>>> -                        int count;
>>>>> -                        while ((count = zin.read(data, 0, BUFFER))
>> != -1) {
>>>>> -                            tempOut.write(data, 0, count);
>>>>> -                        }
>>>>> -                        tempOut.close();
>>>>> -                        tempOut.flush();
>>>>> -                    }
>>>>> -                    serviceGroup.setFoundWebResources(true);
>>>>> -                }
>>>>> -            }
>>>>> -            zin.close();
>>>>> -            fin.close();
>>>>> -        } catch (IOException e) {
>>>>> -            log.info(e.getMessage());
>>>>> -        }
>>>>> -    }
>>>>> -
>>>>>      /**
>>>>>       * @param file ArchiveFileData
>>>>>       */
>>>>> @@ -848,10 +792,6 @@
>>>>>              }
>>>>>          }
>>>>>          return fileList;
>>>>> -    }
>>>>> -
>>>>> -    public String getWebLocationString() {
>>>>> -        return webLocationString;
>>>>>      }
>>>>>
>>>>>      public void setConfigContext(ConfigurationContext
>>>>> configContext) {
>>>>>
>>>>> Modified:
>> webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java
>>
>>>>> URL:
>> http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java?view=diff&rev=544198&r1=544197&r2=544198
>>
>> ==============================================================================
>>
>>>>> ---
>> webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java
>>
>> (original)
>>>>> +++
>> webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java
>>
>> Mon Jun  4 11:25:53 2007
>>>>> @@ -160,7 +160,6 @@
>>>>>              if (webpath != null && !"".equals(webpath)) {
>>>>>                  log.debug("setting web location string: " +
>>>>> webpath);
>>>>>                  File weblocation = new File(webpath);
>>>>> -                setWebLocationString(weblocation.getAbsolutePath());
>>>>>              } // if webpath not null
>>>>>
>>>>>
>>>>>
>>>>> Modified:
>> webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
>>
>>>>> URL:
>> http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java?view=diff&rev=544198&r1=544197&r2=544198
>>
>> ==============================================================================
>>
>>>>> ---
>> webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
>>
>> (original)
>>>>> +++
>> webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
>>
>> Mon Jun  4 11:25:53 2007
>>>>> @@ -1034,12 +1034,6 @@
>>>>>          return getDocumentation();
>>>>>      }
>>>>>
>>>>> -    /*
>>>>> -     * (non-Javadoc)
>>>>> -     *
>>>>> -     * @see
>>>>> org.apache.axis2.description.AxisService#getClassLoader()
>>>>> -     */
>>>>> -
>>>>>      /**
>>>>>       * Method getClassLoader.
>>>>>       *
>>>>> @@ -1103,7 +1097,6 @@
>>>>>       * @return Returns AxisOperation.
>>>>>       */
>>>>>      public AxisOperation getOperation(QName operationName) {
>>>>> -//        AxisOperation axisOperation = (AxisOperation)
>> operations.get(operationName);
>>>>>          AxisOperation axisOperation = (AxisOperation)
>> getChild(operationName);
>>>>>          if (axisOperation == null) {
>>>>> @@ -1142,7 +1135,6 @@
>>>>>              return null;
>>>>>          }
>>>>>
>>>>> -//        AxisOperation operation = (AxisOperation)
>> operations.get(new QName(soapAction));
>>>>>          AxisOperation operation = (AxisOperation) getChild(new
>> QName(soapAction));
>>>>>          if (operation != null) {
>>>>> @@ -1195,12 +1187,6 @@
>>>>>      public void setServiceDescription(String documentation) {
>>>>>          setDocumentation(documentation);
>>>>>      }
>>>>> -
>>>>> -    /*
>>>>> -     * (non-Javadoc)
>>>>> -     *
>>>>> -     * @see
>> org.apache.axis2.description.AxisService#setClassLoader(java.lang.ClassLoader)
>>
>>>>> -     */
>>>>>
>>>>>      /**
>>>>>       * Method setClassLoader.
>>>>>
>>>>> Modified:
>> webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java
>>
>>>>> URL:
>> http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java?view=diff&rev=544198&r1=544197&r2=544198
>>
>> ==============================================================================
>>
>>>>> ---
>> webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java
>>
>> (original)
>>>>> +++
>> webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisServiceGroup.java
>>
>> Mon Jun  4 11:25:53 2007
>>>>> @@ -45,17 +45,7 @@
>>>>>      // to keep name of the service group
>>>>>      private String serviceGroupName;
>>>>>
>>>>> -    //to check whether user has put WWW dir or not
>>>>> -    private boolean foundWebResources;
>>>>> -
>>>>> -    //To check whether server side service or client side service
>>>>> -
>>>>> -    /**
>>>>> -     * Field services
>>>>> -     */
>>>>> -//    private HashMap services;
>>>>>      public AxisServiceGroup() {
>>>>> -//        services = new HashMap();
>>>>>          moduleConfigmap = new HashMap();
>>>>>          engagedModules = new ArrayList();
>>>>>      }
>>>>> @@ -154,24 +144,10 @@
>>>>>          }
>>>>>      }
>>>>>
>>>>> -//    /**
>>>>> -//     * @deprecate Please use String version instead
>>>>> -//     * @param moduleName
>>>>> -//     */
>>>>> -//    public void addToengagedModules(String moduleName) {
>>>>> -//    }
>>>>> -
>>>>>      public void addToengagedModules(String moduleName) {
>>>>>          engagedModules.add(moduleName);
>>>>>      }
>>>>>
>>>>> -//    /**
>>>>> -//     * @deprecate Please use String version instead
>>>>> -//     * @param moduleName
>>>>> -//     */
>>>>> -//    public void removeFromEngageList(QName moduleName) {
>>>>> -//    }
>>>>> -
>>>>>      public void removeFromEngageList(String moduleName) {
>>>>>          engagedModules.remove(moduleName);
>>>>>      }
>>>>> @@ -208,7 +184,6 @@
>>>>>              ((AxisConfiguration)
>> getParent()).notifyObservers(AxisEvent.SERVICE_REMOVE, service);
>>>>>          }
>>>>>
>>>>> -//        services.remove(name);
>>>>>          removeChild(name);
>>>>>      }
>>>>>
>>>>> @@ -229,7 +204,6 @@
>>>>>      }
>>>>>
>>>>>      public AxisService getService(String name) throws AxisFault {
>>>>> -//        return (AxisService) services.get(name);
>>>>>          return (AxisService) getChild(name);
>>>>>      }
>>>>>
>>>>> @@ -245,7 +219,6 @@
>>>>>      }
>>>>>
>>>>>      public Iterator getServices() {
>>>>> -//        return services.values().iterator();
>>>>>          return getChildren();
>>>>>      }
>>>>>
>>>>> @@ -282,13 +255,5 @@
>>>>>              }
>>>>>          }
>>>>>          return false;
>>>>> -    }
>>>>> -
>>>>> -    public boolean isFoundWebResources() {
>>>>> -        return foundWebResources;
>>>>> -    }
>>>>> -
>>>>> -    public void setFoundWebResources(boolean foundWebResources) {
>>>>> -        this.foundWebResources = foundWebResources;
>>>>>      }
>>>>>  }
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: axis-cvs-unsubscribe at ws.apache.org
>>>>> For additional commands, e-mail: axis-cvs-help at ws.apache.org
>>>>>
>>>>>
>>>>>
>>>>>  
>>>>
>> ------------------------------------------------------------------------
>> _______________________________________________
>> Wsas-java-dev mailing list
>> Wsas-java-dev at wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/wsas-java-dev
>>
>>> _______________________________________________
>>> Wsas-java-dev mailing list
>>> Wsas-java-dev at wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/wsas-java-dev
>>
>>
>>
>
> _______________________________________________
> Wsas-java-dev mailing list
> Wsas-java-dev at wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/wsas-java-dev
>
>

-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"







More information about the Wsas-java-dev mailing list