This article tells you how you can do it using Ballerina

REST (Representational state transfer) is the most popular way of exposing your services to the outside world today. Moreover, it is well matured over the years. Hence, naturally, when you design your enterprise architecture to digitalize your business, you will meet the need to expose your data through REST APIs.

There is a bunch of tools and software out there which is capable of doing that. If you are looking for a quick and extensible way of doing that writing a piece of code, Ballerina might help you. It…

Needlessly to say, world is full of data. In earlier days most of the applications built in an organisation dealt with data internal to it, typically gathered from on-premise systems. It is no longer the case now — to build applications they need to integrate data from various external systems which is increasingly challenging and time consuming to do from scratch. Sometimes those external systems operate on different protocols, needs to know their message formats and certain domain knowledge is required to work with them as well. …

WSO2 Micro Integrator and WSO2 API Manager are married now. The marriage took place in May with well wishes by many architects, managers and engineers. Hence, WSO2 MI and WSO2 APIM products cannot be presented as standalone entities anymore. Officially, they are bundled into a single installer and documentation also confirms that they are unified into a single platform going forward and called as APIM4. In this article, let’s briefly see what each is good at, the motivation behind this marriage and what are the benefits customers can get through it and how their future would look like..

Marriages happen…

Sometimes when we integrate different systems together using enterprise integrator software, we need to handle large files. In some use cases, there is no need to “interpret” this file but we just need to transfer it to another location. Legacy systems are still based on files. Features like file streaming is essential to expose such existing functionality using newer technologies and achieve legacy modernisation.

Let us see how WSO2 Enterprise Integrator can be used to stream a file to an HTTP service stepwise.

Mock HTTP Service

I have come up with a mock HTTP service which accept a message as a POST request…

Implementation (open source!!):

Example application using the pool:

Like to read on and get to know what that is better?

DB connection pooling

Obviously, this is not a new subject. When a connection is created using an application level language like Java, it will call underlying OS, open a socket and start negotiating a connection. Thus, establishing a new connection with a third party application or a system is not lightweight. It is time consuming. Moreover, it is resource consuming.


If you allow your application to a new create connection every time it needs to communicate with the third party system…

For a more secured integration solution…

NOTE: (Applicable for WSO2 Micro Integrator 1.1.0 — Enterprise Integrator 7.0.0)

The integration world is moving towards micro-services architecture. WSO2, the famous middleware company, now offers WSO2 Micro Integrator (WSO2 MI) which is the container friendly version of WSO2 Enterprise Integrator (WSO2 EI). WSO2 MI runs the same mediation engine as WSO2 EI, which is battle tested over integration use cases over the past decade. Hence, it is not a pure new product from WSO2 — only the body of the vehicle is made lightweight and small, keeping the same engine.

WSO2 MI uses…

In software integration landscape, it is an essential requirement to communicate from one software component to another. While there is a lot of technologies emerged with the capability of doing that, Java programming language provides us with an API to facilitate messaging between components written in Java. The implementation of this API will be provided by different vendors (JMS Providers) with broker software.

This API is called Java Message Service (JMS).

Last update to JMS specification was done in 2002 which brought up JMS 1.1. Since then, over the years, this API was used in many software components around the…

For a bug free Integration Solution

Over the time the communication between enterprise applications is becoming more complex. More efficient protocols, message formats and messaging patterns are emerging everyday in the enterprise world. The requirement of cross communication between the systems hence is an increasing need. There is a number of integration solutions out there to cater that. However, every integration need is unique and developers need to figure out how integration should be and implement. When developing these integration artifacts, they need to see how would these behave when deployed on to the real servers. …

WSO2 Enterprise Integrator is one of popular enterprise integrator software comprised of tools to do data transformations and many more…

Inside ![CDATA[…] you can place any content inside a xml document. Sometimes xml payloads reaching middleware for mediation has such content, and content needs to be modified/enrich during mediation. WSO2 EI has capability to do that using payload factory mediator.

Following proxy service will add a new tag “<MSISDN>xxxx</MSISDN>” inside CDATA payload

<?xml version="1.0" encoding="UTF-8"?>
<proxy name="testProxy" startOnLoad="true" transports="http https" xmlns="">

All WSO2 products have a common place to configure datasources they use. WSO2 uses Apache Tomcat JDBC pooling for connection pooling. Sometimes in production there can be instances where connection pool gets exhausted. Below log will be a clear indication of such an exhaust.

Caused by: org.apache.tomcat.jdbc.pool.PoolExhaustedException: [pool-32-thread-12754] Timeout: Pool empty. Unable to fetch a connection in 30 seconds, none available[size:100; busy:100; idle:0; lastwait:30000].
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(
at org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(

Here connection pool size is 100, and all connections are occupied. The new statement has no connection to borrow.

At this stage, we need to see why all connections are…

Hasitha Hiranya Abeykoon

Associate Technical Lead at WSO2, Blogger

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store