WSO2 tmp directory - wso2

How is it possible to clean tmp directory automatically using WSO2 settings?
A lot of files are created every day and it would be good to find a solution.

Could you specify what WSO2 product are you using?
Most WSO2 products has a HouseKeeping property inside carbon.xml config file.
Refer to the documentation of the product you're using to check this property settings:
https://docs.wso2.com/display/ESB490/Configuring+carbon.xml

Related

Reading database connection configuration from a registry properties file in WSO2 EI

We are doing a POC in WSO2 EI and developing an API for service orchestration. As part of it, I want to insert some data into a database. In Integration Studio 8.0.0, I am using the DB report mediator to insert data. Everything works fine when I hardcode the values as shown in the below screenshot.
Now, I want to read the database configurations from a properties file I created in registry config folder instead of hardcoding them. How can we achieve this?
Below is the screenshot of the registry properties file.
AFAIK you can't read properties files from the registry as key/value pairs and use them in integrations without processing the content of the properties file with something like the ScriptMediator. But you can pass a properties file to the runtime and pick the values from there. Please have a look at this document.
We can inject DB connection parameters from a properties file stored in EI/MI product home folders but still need to find how we can inject parameters from registry.

Downloading Governance Registry artifact in a archive file

Is it possible to upload artifacts in a specific folder structure like :/common/schemas/sample/
For instance allow an xsd that is uploaded to conform to a specific location for when it is downloaded and used in a different project it can follow the same folder naming and location standard.
For instance I want sample.xsd to be available under:
common/schemas/sample/sample.xsd
I want this xsd to be downloaded in this structure by default without having to create this.Thanks.
I hope you are using WSO2 Governance Registry 5.x release. There you can change the artifact storage patch using the RXT configuration. More information can be found via "Customizing the Storage Path for Configurable Governance Artifacts" doc.

How to make asset can be download in WSO2 ES

I visit the site https://store.wso2.com, when I choose one connector(for example: Jenkins), it show the detail page, and it has the Download connector Link button!! I think the site is build from WSO2 ES.
My question is how can make the asset can be downloaded? I try the WSO2 Enterprise Store 2.0 version, but I can't find anyway to achive it.
You can achive this using asset extensions in WSO2 ES-2.0.0 version.
In a default pack [HOME]/repository/deployment/jaggeryapps/store/themes/store/partials/asset.hbs files renders the asset details page. You can override it as well as sub partials used in that file by asset type.
Copy [HOME]/repository/deployment/jaggeryapps/store/themes/store/partials/assets.hbs to [HOME]/repository/deployment/jaggeryapps/store/extensions/assets//themes/store/partials/asset.hbs
In this file add change to UI elements to point to a downloadable URL.
ex: https://github.com/wso2/product-es/blob/1.0.1/modules/apps/store/extensions/assets/ebook/themes/store/partials/asset-utilization.hbs#L11
You can read more about WSO2 ES extension model here

Migrate files from one esb to other

I have created few proxies, sequences and endpoints in wso2 esb in my system. I want to transfer these proxies, sequences and endpoints to another esb hosted at server. How to do this successfully?
Looking forward to your answers. Thanks in advance.
Lets say you have your first ESB located at ESB01_HOME directory and it contains all your defined proxy services, endpoints and other configurations. Now you took another fresh copy of the WSO2 ESB and extract that to a folder called ESB02_HOME.
You can copy the configuration files which were stored in ESB01_HOME/repository/deployment/server/synapse-configs/default (entire folder) in to the same directory in the ESB02 (ESB02_HOME/repository/deployment/server/synapse-configs/default). Now you can start the ESB02 and you can observe that all the configurations are installed in the ESB02.
If you are starting both the servers (ESB01 and ESB02), then you need to change the Offset parameter of the ESB02 carbon.xml configuration file which is located in the (ESB02_HOME/repository/conf/carbon.xml)
If you are copying the configurations from an older version of WSO2 ESB (3.x.x) then these configurations are located at ESB01_HOME/repository/conf/synapse-configs folder.
If both are in a clustered setup you can use deployment synchronizer/registry based synchronizer..If both are separate instances, copy the synapse-config folder(inside that, you can find proxy/seq/endpoint folders) to another home directpry
you can use the checkin-client tool inside the GREG.
With this tool you can move information from registry in ESB1 to registry in ESB2. information like dynamic sequences and endpoints for example.

WS02 GREG ERROR when deploying carbon archive

I am trying to upload a carbon archive in the registry. Everything seems to be OK when I add a new application, but the log show the following error:
An error occurred while determining the latest version of the resource at the given path:
/_system/governance/trunk/wsdls/.... (path to the wsld deployed)
org.wso2.carbon.registry.core.exceptions.RegistryException: Failed to obtain the user realm for tenant: -1
I log with the admin user and everything that should be upload is in the registry.
Any help?
Thanks,
I tried to reproduce this with WSO2 G-Reg 4.1.1 but unable to reproduce it.
Please indicate the G-Reg version you have tried out this scenario.
When you upload the CAR file from Management Console, make sure to remove the previous version of the same CAR file before you upload the newer version.
This error seems to be related versioning.
Since you remove the previous version of the CAR file, the aforementioned suggestion will solve your problem.
Thanks and Regards,
Harshana
WSDLs are stored in the /_system/governance/../trunk/wsdl/.. location if you upload them via management console or upload the resource from Developer Studio Registry Browser.
But when you deploy a WSDL via a C-App, when creating the registry resource from Developer Studio, you specify a location to deploy. Hence the WSDLs deployed via C-Apps are deployed to this specified location but not the other location.
Therefore from your proxy service, you should refer the location you have mentioned to deploy your WSDL but not the default location.
Once you fix this, your Proxy service will work fine.
Thanks and Regards,
Harshana