Framework doesn't allow you to start new server instance by changing
configuration values. What you can do is start BAM server instance then
edit the configuration at run time and restart the server.

Please refer to the server restart test case at [1]. Note that
server.startServer()
will return the CARBON_HOME. So you can use carbon home to construct the
path to config file and edit the file at run time. Then restart the server
to apply changes.

Thanks, Krishantha.

[1]
https://svn.wso2.org/repos/wso2/carbon/kernel/branches/4.1.0/distribution/integration/4.1.0/tests/src/test/java/org/wso2/carbon/integration/tests/ServerRestartTestCase.java

PS - Explained above in old test framework perspective since BAM depends on
old test framework.

On Mon, Apr 22, 2013 at 12:27 PM, Gihan Anuruddha <gi...@wso2.com> wrote:

> Basically my requirement is this.
>
> Change the particular value in data-bridge-config.xml before server start
> and verify I'm getting the same value in the runtime.
>
> Thanks,
> Gihan
>
>
> On Mon, Apr 22, 2013 at 12:23 PM, Krishantha Samaraweera <
> krishan...@wso2.com> wrote:
>
>> Do you want to restart the server after changing values.
>>
>> Thanks,
>> Krishantha.
>>
>>
>> On Mon, Apr 22, 2013 at 12:17 PM, Gihan Anuruddha <gi...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> For one of the integration testing I need dynamically change the value
>>> in data-bridge-config.xml. How do I proceed ?
>>>
>>> Thanks.
>>> Gihan
>>>
>>> --
>>> ---
>>> W.G. Gihan Anuruddha
>>> Senior Software Engineer | WSO2, Inc.
>>> M: +94772272595
>>>
>>
>>
>
>
> --
> ---
> W.G. Gihan Anuruddha
> Senior Software Engineer | WSO2, Inc.
> M: +94772272595
>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to