Hi, I am using org.apache.synapse.experimental.ProxyDeployer to dynamically deploy my proxy configuration.
( Refer to the corresponding mail [1].). Now I want to dynamically remove the proxy configuration. I tried by deleting the file from the "proxies" directory. But synapse doesn't trigger the un-deploy. Can someone suggest me ways to do it? --------------- Regards, Shradha [1] http://mail-archives.apache.org/mod_mbox/synapse-user/200812.mbox/browse r Subject : (Dynamically loading proxy configuration in synapse.xml) I am attaching the message for quick reference. -----Original Message----- From: Andreas Veithen [mailto:[email protected] <mailto:[email protected]> ] Sent: Tuesday, December 30, 2008 11:45 PM To: [email protected] Subject: Re: Dynamically loading proxy configuration in synapse.xml 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 <https://issues.apache.org/jira/browse/SYNAPSE-346> [2] http://hudson.zones.apache.org/hudson/job/Synapse%20-%20Trunk/org.apache <http://hudson.zones.apache.org/hudson/job/Synapse%20-%20Trunk/org.apach e> .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
