Generating artifacts for the file based registry

pete's picture
We are planning on an initial deployment of the esb using the file system based registry (default synapse) rather than the wso2 esb embedded derby, or wso2 remote registry. Eventually we'd like to use the remote registry, but we are not ready for that. Also, the integration of the esb with the remote registry appears to require root access to the registry - not conducive for sharing the registry amongst multiple esbs (maybe I'm wrong about that, but there are other problems - read more...). The esb admin console does not allow you to view the file based registry. So to facilitate development I was hoping that we could use a local install of the esb to generate the synapse files (configurations) and then export them to the file system for deployment to our production environment. Unfortunately I have not bee very successful. There are three options that I know of: 1) Point esb to a remote registry, then export from the registry. When you create an artifact in the esb console, you must take an extra step to "export" it to the remote registry. The user experience needs improvement (understatement). When using the "export" button, you don't know if it has already been exported, plus you need to choose a location in the remote registry (like Endpoints) and then re-type in the name of the resource. If you forget to export, then the configuration is lost when the esb is restarted. -artifacts in the esb, don't necessarily exist in the remote registry --if you delete an artifact in the remote registry, it still exists in the local esb (where?) -artifacts in the remote registry, aren't necessarily known by the esb --if you delete an artifact in the local registry, it still exists in the remote registry --I added a new endpoint via the remote registry console, and now the esb integrated registry gives me an error "Couldn't get child elements from registry :: Error when fetching resource with key /Endpoints " 2) Point the remote registry to the esb registry derby instance. This setup works, but when I run the export sample, it fails. See this posting for the exception: http://wso2.org/forum/thread/4156#comment-6866 3) Crafting all synapse artifacts by hand. I think for now my preference would be to get option #2 working due to the sub-optimal user experience in option #1. Option #3 may actually be the only practical one. Any suggestions as to how to deal with this would be greatly appreciated.
indika's picture

Hi Pete You might forget,

Hi Pete You might forget, we provide a FileBase registry called   ‘org.wso2.esb.registry.ESBRegistry’. This functions same as URLRegistry (in synapse) and only store Meta data in the database. This was the registry in the pervious ESB releases where there is no WSO2Regirty at that time. You can use that as follow by just editing only synapse.xml Example: <registry provider="org.wso2.esb.registry.ESBRegistry">       <parameter name="root">file:repository/conf/sample/resources/</parameter>       <parameter name="cachableDuration">15000</parameter>    </registry> With this registry, admin console can be used to manage resources. For your options 1 and 2, I will try that and will also try to provide a solution. st1\:*{behavior:url(#ieooui) } Thanks Indika      
ruwan's picture

Hi Pete, Let me try to

Hi Pete, Let me try to explain the 3 approaches that you are trying; 1) Point esb to a remote registry, then export from the registry. When you create an artifact in the esb console, you must take an extra step to "export" it to the remote registry. The user experience needs improvement >> What sort of an improvement do you suggest for this? (understatement). When using the "export" button, you don't know if it has already been exported, plus you need to choose a location in the remote registry (like Endpoints) and then re-type in the name of the resource. >> well it is not really the name of the resource but the key by which you refer to this resource which is different from the name of the resource (both key and the name can be the same as well) If you forget to export, then the configuration is lost when the esb is restarted. >> not really, you can persist the configuration to the disk by clicking on the save icon on the configuration tab. -artifacts in the esb, don't necessarily exist in the remote registry >> yes they can be in the local configuration as local entries --if you delete an artifact in the remote registry, it still exists in the local esb (where?) >> ESB caches the resources from the registry and keeps a copy in the memory when it is using a particular resource. So may be it is using the cached copy, but you can configure the cache timeout in the ESB console or notify a particular resource to clear its cache. -artifacts in the remote registry, aren't necessarily known by the esb >> yes, it is not a must --if you delete an artifact in the local registry, it still exists in the remote registry >> local registry deletion has nothing to do with the remote registry and we do not recommend to have resources with the same key in local registry as well as on the remote registry, though you can do that. --I added a new endpoint via the remote registry console, and now the esb integrated registry gives me an error "Couldn't get child elements from registry :: Error when fetching resource with key /Endpoints " >> Integrated registry supports only XML entries and may be you mistyped the XML configuration of a particular endpoint. 2) Point the remote registry to the esb registry derby instance. This setup works, but when I run the export sample, it fails. See this posting for the exception: http://wso2.org/forum/thread/4156#comment-6866 >> will get back to you on that thread. 3) Crafting all synapse artifacts by hand. >> This option will be easy once you are used to the synapse configuration language syntax, but not for a person who is starting with it. Thanks, Ruwan Linton
pete's picture

ESBRegistry!

Thanks to both of you for your follow up. Indika, the ESBRegistry is exactly what I was looking for. Thanks! I hope that version of the esb registry will be maintained going forward even though it is "older". Ruwan, Kevin is looking more closely at the remote registry and esb and will post his comments. Obviously we are new to this product, and still finding our way through it.
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)