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,
> 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
>> access them via host name "localhost" only. I have modified
>> carbontomcat.java to deploy webapps in a location defined inside appBase of
>> virtualhosts. But this needs to add an entry to component.xml to direct the
>> name of webapps directory to the relevent WebAppDeployer class. (Adding an
>> entry to component.xml each time a new appBase is created is not preferred)
>>
>> I have tried following steps when adding deployers to deployment engine
>> without reading component.xml file. When reading component.xml file, the
>> Axis2DeployerRegistry class adds the deployers and relevant directory names
>> to a deploymentEngine. In order to skip reading component.xml, deployment
>> engine should be updated using the virtual host appBase values and deployer
>> names.
>>
>> *Scenario 1*
>>
>>
>>    1.     I created a new service component class inside
>>    /org/wso2/carbon/webapp/deployer/internal/ and added following,
>>
>>                                  CarbonTomcatService carbonTomcatService
>> = DataHolder.getCarbonTomcatService();
>>                                  DeploymentEngine deploymentEngine =
>> (DeploymentEngine)(DataHolder.getServerConfigContext().getAxisConfiguration()).getConfigurator();
>>
>>              This gave null values to both variables.
>> ("serverConfigContext" and "carbonTomcatService" variables initialize
>> inside service components in /org/wso2/carbon/webapp/mgt/internal. So it
>> seems the newly created service component classes executes first)
>>
>> *Scenario 2*
>>
>>    1.  I have created a new OSGI bundle which tries to read above two
>>    variables inside its Activator class and service component class. I could
>>    read proper values inside the service component class and update 
>> deployment
>>    engine. But according to logs, this executes after starting the wso2
>>    carbon.  But, the following statement does deploy the webapps inside the
>>    appBase.
>>
>>                                 deploymentEngine.addDeployer(deployer,
>> directory, extension);
>>
>> But I am able to access webapps using host name "localhost" only,  What
>> could be the issue here?
>>
>>
>> Thanks,
>>
>> Nipuni
>>
>>
>> --
>> Nipuni Perera
>> Software Engineer; WSO2 Inc.; http://wso2.com
>> Email: nip...@wso2.com
>> Git hub profile: https://github.com/nipuni
>> Mobile: +94 (71) 5626680
>> <http://wso2.com>
>>
>>
>
>
> --
> Nipuni Perera
> Software Engineer; WSO2 Inc.; http://wso2.com
> Email: nip...@wso2.com
> Git hub profile: https://github.com/nipuni
> Mobile: +94 (71) 5626680
> <http://wso2.com>
>
>


-- 

*Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to