Re: [Dev] Support Tomcat Virtual Hosts in WSO2 AS - issues and progress so far

2014-06-03 Thread Nipuni Perera
Hi, I have implemented the above solution as below. 1. I created an interface Axis2DeployerProvider with a method getDeployerConfigs inside org.wso2.carbon.utils.deployment. 2. I then created a service inside package org.wso2.carbon.webapp.deployer.internal implementing the above

Re: [Dev] Support Tomcat Virtual Hosts in WSO2 AS - issues and progress so far

2014-06-03 Thread Sameera Jayasoma
Great work. As per the discussion, can you attache the complete diff. Changes to the Kernel. On Tue, Jun 3, 2014 at 2:58 PM, Nipuni Perera nip...@wso2.com wrote: Hi, I have implemented the above solution as below. 1. I created an interface Axis2DeployerProvider with a method

Re: [Dev] Support Tomcat Virtual Hosts in WSO2 AS - issues and progress so far

2014-06-03 Thread Nipuni Perera
As in the implementation, I have hard-coded the webapp deployer class as, deployerConfig.setClassStr(org.wso2.carbon.webapp.deployer.WebappDeployer); . So that webapps inside appBase locations of virtual hosts will be deployed using the given deployer class. Is there a

Re: [Dev] Support Tomcat Virtual Hosts in WSO2 AS - issues and progress so far

2014-06-03 Thread Sagara Gunathunga
On Wed, Jun 4, 2014 at 9:07 AM, Nipuni Perera nip...@wso2.com wrote: Hi, I have attached the patches here. After applying changes to both carbon4-kernal and carbon-deployment, you can access webapps via virtual hosts as follows, 1. Modify the

Re: [Dev] Support Tomcat Virtual Hosts in WSO2 AS - issues and progress so far

2014-06-03 Thread Nipuni Perera
I am using DataHolder.getCarbonTomcatService(); to get CarbonTomcatService in the service component to read virtual host names, Container[] virtualhosts = carbonTomcatService.getTomcat().getEngine().findChildren(); Thanks, Nipuni On Wed, Jun 4, 2014 at 9:34 AM, Sagara

Re: [Dev] Support Tomcat Virtual Hosts in WSO2 AS - issues and progress so far

2014-06-03 Thread Sagara Gunathunga
On Wed, Jun 4, 2014 at 9:38 AM, Nipuni Perera nip...@wso2.com wrote: I am using DataHolder.getCarbonTomcatService(); to get CarbonTomcatService in the service component to read virtual host names, Container[] virtualhosts =

Re: [Dev] Support Tomcat Virtual Hosts in WSO2 AS - issues and progress so far

2014-06-02 Thread Kasun Gajasinghe
I do not think that you should remove the default webapp deployer from component.xml. Your should be in effect only for the additional virtual hosts. On Mon, Jun 2, 2014 at 9:25 AM, Nipuni Perera nip...@wso2.com wrote: Hi, This is working. This was due to an ip address conflict. Thanks,

Re: [Dev] Support Tomcat Virtual Hosts in WSO2 AS - issues and progress so far

2014-06-02 Thread Nipuni Perera
I didn't change the default deployer. I only read appBase values of virtual hosts and added them to the deployment engine. But the webapp deployment take place just after management console is started. Thanks, Nipuni On Mon, Jun 2, 2014 at 12:28 PM, Kasun Gajasinghe kas...@wso2.com wrote: I

Re: [Dev] Support Tomcat Virtual Hosts in WSO2 AS - issues and progress so far

2014-06-02 Thread Kasun Gajasinghe
On Mon, Jun 2, 2014 at 2:05 PM, Nipuni Perera nip...@wso2.com wrote: I didn't change the default deployer. I only read appBase values of virtual hosts and added them to the deployment engine. But the webapp deployment take place just after management console is started. This happens if the

Re: [Dev] Support Tomcat Virtual Hosts in WSO2 AS - issues and progress so far

2014-06-02 Thread Nipuni Perera
Hi, I am using DataHolder inside org.wso2.carbon.webapp.mgt to get both ConfigurationContextService and CarbonTomcatService. I am using these variables to get the following, 1. get deployment engine from ConfigurationContextService with -

Re: [Dev] Support Tomcat Virtual Hosts in WSO2 AS - issues and progress so far

2014-06-02 Thread Sameera Jayasoma
We do no recommend to register deployers programmatically. The recommended approach is to declare them in the component.xml. This allows Carbon kernel to read and register deployers before initializing Apache Axis2 engine. If you register deployers programmatically, Carbon kernel does not have any

Re: [Dev] Support Tomcat Virtual Hosts in WSO2 AS - issues and progress so far

2014-06-02 Thread Sameera Jayasoma
Looks like we have a solution this problem. We simply need to way to register deployers which cannot be declared in component.xml, because users should be able add or remove deployers. Axis2DeployerRegistry.register() method registers all the Deployers declared in the component.xml files. These

Re: [Dev] Support Tomcat Virtual Hosts in WSO2 AS - issues and progress so far

2014-06-02 Thread Nipuni Perera
I will implement and provide a patch. Thanks, Nipuni On Mon, Jun 2, 2014 at 6:14 PM, Sameera Jayasoma same...@wso2.com wrote: Looks like we have a solution this problem. We simply need to way to register deployers which cannot be declared in component.xml, because users should be able add

[Dev] Support Tomcat Virtual Hosts in WSO2 AS - issues and progress so far

2014-06-01 Thread Nipuni Perera
Hi, I am working on the $subject. According to the current implementation users has to put webapps inside repositro/depolment/server/webapss and access them via host name localhost only. I have modified carbontomcat.java to deploy webapps in a location defined inside appBase of virtualhosts. But

Re: [Dev] Support Tomcat Virtual Hosts in WSO2 AS - issues and progress so far

2014-06-01 Thread Nipuni Perera
Hi, This is working. This was due to an ip address conflict. Thanks, Nipuni On Sun, Jun 1, 2014 at 3:41 PM, Nipuni Perera nip...@wso2.com wrote: Hi, I am working on the $subject. According to the current implementation users has to put webapps inside repositro/depolment/server/webapss and