Nice solution Andreas, also if you enable the hotUpdate feature in axis2.xml then you can change an existing .xml file in the proxies directory and see the changes being effective few minutes after saving the file.
At the same time, we need to provide the ability to load the proxy services from the registry too. Thanks, Ruwan On Tue, Dec 30, 2008 at 11:44 PM, Andreas Veithen <[email protected] > wrote: > Hi Shradha, > > This is not yet supported by Synapse (see [1] for a similar request). > I think that it is possible to satisfy this requirement by > implementing an Axis2 custom deployer. I put together a working > proof-of-concept (well, more or less working, see below), which will > be available in the next nightly build (build #222; see [2]). > > In order to play with it, you need to do the following: > > 1) In axis2.xml, add the following line: > > <deployer extension="xml" directory="proxies" > class="org.apache.synapse.experimental.ProxyDeployer"/> > > 2) Still in axis2.xml, change the "hotdeployment" parameter to true. > > 3) In your repository, create a directory called "proxies". > > 4) Start up Synapse. > > 5) Drop a file into the "proxies" directory with the proxy definition. > The suffix must be ".xml" and the root element "proxy" (in the > standard Synapse configuration namespace): > > <proxy xmlns="http://ws.apache.org/ns/synapse" name="..."> > ... > </proxy> > > Synapse will then automatically deploy this new proxy. > > The bad news is that for the moment it only works in hot deployment > mode, i.e. if the file is added after Synapse has been started. > Deployment of the proxy service fails if the file is already present > during startup. The reason is that the custom deployer requires access > to the SynapseConfiguration object, which is created by the > SynapseInitializationModule. However, this module is only initialized > after Axis2 attempts the deployment. This problem is of course a > show-stopper, but maybe somebody else on this list has a brilliant > idea how to change the order in which things happen at startup? > > Regards, > > Andreas > > [1] https://issues.apache.org/jira/browse/SYNAPSE-346 > [2] > http://hudson.zones.apache.org/hudson/job/Synapse%20-%20Trunk/org.apache.synapse$synapse-distribution/lastBuild/ > > On Tue, Dec 30, 2008 at 12:29, <[email protected]> wrote: > > Hi All, > > > > I have a requirement in which after starting synapse, I need to add > > proxy configurations to synapse.xml. > > > > But I guess synapse does not dynamically reload the proxy configurations > > and I need to restart my synapse > > ( which may result in existing proxy services getting stopped ) > > > > I want my ESB to act as a proxy for different endpoints routing the > > messages through the same insequence. > > > > And I want to dynamically add these proxy configurations when I need. > > > > What are the possible ways to achieve my objective? > > > > --------------- > > > > Thanks, > > > > Shradha > > > > > > > > Please do not print this email unless it is absolutely necessary. > > > > The information contained in this electronic message and any attachments > to this message are intended for the exclusive use of the addressee(s) and > may contain proprietary, confidential or privileged information. If you are > not the intended recipient, you should not disseminate, distribute or copy > this e-mail. Please notify the sender immediately and destroy all copies of > this message and any attachments. > > > > WARNING: Computer viruses can be transmitted via email. The recipient > should check this email and any attachments for the presence of viruses. The > company accepts no liability for any damage caused by any virus transmitted > by this email. > > > > www.wipro.com > > > -- Ruwan Linton http://wso2.org - "Oxygenating the Web Services Platform" http://ruwansblog.blogspot.com/
