You can simply use EndpointAdmin service to persist your configuration to
the filesystem.
http://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/endpoint/org.wso2.carbon.endpoint/4.2.0/src/main/java/org/wso2/carbon/endpoint/service/EndpointAdmin.java


On 12 December 2013 17:03, Aliosha <[email protected]> wrote:

> I've checked the EndpointFactory and EndpointSerializer. But i don't find
> anything could help me. The endpoint factory allows me to create a new
> endpoint (i already do this) and che serializer allows me to serialize into
> xml element. Ok but i need to invoke the same function i use on the UI when
> i click on Save&Close after i created or modified a new endpoint. Could you
> suggest me it? i should have to see my endpoint config file updated on the
> filesystem.
>
>
> 2013/12/12 Vijayaratha Vijayasingam <[email protected]>
>
>> You have to check EndpointFactory and serializer classes in Synapse.
>>
>> http://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/dependencies/synapse/2.1.2-wso2v3/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/
>>
>>
>> On 12 December 2013 00:46, Aliosha <[email protected]> wrote:
>>
>>> I wrote these code lines for accessing and modifying programmatically
>>> the load balanced endpoint configurations saved in my esb (4.7.0) local
>>> registry. [in a few words i add a new address endpoint to the load balance
>>> endpoint list]
>>>
>>>     SynapseConfiguration sc = synapseMsgContext.getConfiguration();
>>>
>>>     LoadbalanceEndpoint le =(LoadbalanceEndpoint) sc.getEndpoint("test");
>>>     List<Endpoint>list = le.getChildren();
>>>     AddressEndpoint ad = new AddressEndpoint();
>>>     EndpointDefinition  def = new EndpointDefinition();
>>>     def.setAddress("http://172.17.54.101:8083/RestService/rest/servizio";);
>>>     def.setAddressingOn(false);
>>>     def.setTimeoutAction(100);
>>>     ad.setDefinition(def);
>>>     list.add(ad);
>>>     le.setChildren(list);
>>>     sc.updateEndpoint("test", le);
>>>
>>> By this code lines the endpoint's updates are held in memory and lost
>>> when i restart the ESB. So this update lastes only till the esb is stopped.
>>>
>>> How can i make these updates persistent? I mean an effective update on
>>> the endpoint xml configuration file?
>>>
>>> Regards
>>>
>>
>>
>>
>> --
>> -Ratha
>> mobile: (+94)755906608
>>
>
>


-- 
-Ratha
mobile: (+94)755906608
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to