Hi,

There is a requirement to deploy dataservice configuration (.dbs) file with
its corresponding services.xml using Capp. According to the current
implementation, DefaultAppDeployer[1] calls .dsb files deployer. As the
artifacts in the Capp are extracted and copied to a temporary location
before deploying the services, we thought of changing the dataservice
deployer code to pick the services.xml as well. So I tried to add the
services.xml file as below to the car file.

SampleCar-1.0.0
 |-- artifacts.xml
 |-- SampleDataService_1.0.0
        |-- artifacts.xml
        |-- SampleDataService-1.0.0.dbs
        |-- SampleDataService_service.xml


But it seems only one file is allowed to have per a dependency.
(SampleDataService is a dependency for the root artifact). It gives the
following error.

ERROR {org.wso2.carbon.application.deployer.handler.DefaultAppDeployer} -
service/dataservice type must have a single file. But 2 files found.

Then the idea is to use the following dependency tree.
testCar-1.0.0
 |-- artifacts.xml
 |-- SampleDataService_1.0.0
        |-- artifacts.xml
        |-- SampleDataService-1.0.0.dbs
        |-- servicesMetaFiles
                |-- SampleDataService_service.xml
                |-- artifacts.xml

We may need to change the dataservice code to lookup for servicesMetaFiles
folder for services.xml file.

Will this be a correct way to fulfill the requirement?

Anyway in the future we will move to a single archive format to archive
both dataservice config and the services.xml file.

[1]
https://svn.wso2.org/repos/wso2/carbon/kernel/branches/4.2.0/core/org.wso2.carbon.application.deployer/4.2.0/src/main/java/org/wso2/carbon/application/deployer/handler/DefaultAppDeployer.java

-- 
Best Regards..

Chanika Geeganage
Software Engineer
WSO2, Inc.; http://wso2.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to