G-Reg and ESB integration scenarios for Governance

WSO2 Enterprise Service Bus (ESB) or WSO2 Enterprise Integrator(EI) products employs WSO2 Governance Registry for storing configuration elements and resources such as WSDLs, policies, service metadata, etc. By default, WSO2 ESB/EI shipped with embedded Registry, which is entirely based on the WSO2 Governance Registry (G-Reg). Further based on the requirements, you can connect to a remotely running WSO2 Governance Registry using a remote JDBC connection which is known as a ‘JDBC registry mount’.

Other than the Registry/Repository aspect of WSO2 G-Reg, its primary use cases are Design time governance and Runtime governance with seamless lifecycle management. It is known as Governance aspect of WSO2 G-Reg. So with this governance aspect of WSO2 G-Reg, more flexibility is provided for integration with WSO2 ESB/EI.

When integrating WSO2 ESB/EI with WSO2 G-Reg in governance aspect, there are three options available. They are:

1). Share Registry space with both ESB/EI and G-Reg
2). Use G-Re…

Lifecycle Management with WSO2 Governance Registry

SOA Lifecycle management is one of the core requirements for the functionality of an Enterprise Governance suite. WSO2 Governance Registry 5.2.0 supports multiple lifecycle management capability out of the box. Also, it gives an opportunity to the asset authors to extend the out of the box lifecycle functionality by providing their own extensions, based on the organization requirements. Further, the WSO2 Governance Registry supports multiple points of extensibility. Handlers, Lifecycles and Customized asset UIs(RXT based) are the key types of extensions available.


A lifecycle is defined with SCXML based XML element and that contains,
A name One or more statesA list of check items with role based access control One or more actions that are made available based on the items that are satisfied 
Adding a Lifecycle
To add a new lifecycle aspect, click on the Lifecycles menu item under the Govern section of the extensions tab in the admin console. It will show you a user interface …

How to disable Registry indexing

Sometimes people complain that they have seen background DB queries executed by some WSO2 products(EX: WSO2 API Manager Gateway profile). These query executions are not harmful, and those correspond to registry indexing task that runs in the background.

It is not required to enable indexing task for APIM 1.10.0 based Gateway or Key Manager nodes. So you can disable the indexing task by setting "startIndexing" parameter as false. This "startIndexing" parameter should be configured in the registry.xml file under "indexingConfiguration" section.

Ex: <indexingConfiguration> <startIndexing>false</startIndexing> ...... </indexingConfiguration>

WSO2 Governance Registry: Support for Notification

With WSO2 Governance Registry 5.x releases, now you can send rich email messages when email notification is triggered in WSO2 Governance Registry with the use of email templating support we have added. In the default implementation, administrator or any privileged user can store email templates in “/_system/governance//repository/components/org.wso2.carbon.governance/templates” collection and the template name must be same as the lower case of the event name.

For an example if you want to customize “PublisherResourceUpdated” event, template file should be as: “/_system/governance/repository/components/org.wso2.carbon.governance/templates/publisherresourceupdated.html”.

If you do not want to define event specific email templates, then you can add a template called “default.html”.

By default, $$message$$ message section in email templates will be replaced with the message generated in the event.

How can I plug my own template mechanism and modify the message?

You can override the def…

Java7: Strings in Switch Statements

Switch statements with String is long waiting enhancement which is requested 1995(Decade before I have joined to IT industry).

This String switch statement uses the equal operation to compare the String object in expression and label. Therefore String switch statement is case sensitive. Also according to the Java documentation, this switch statement is more efficient than if-else statements("Java compiler generates generally more efficient bytecode from switch statements").

public void stringSwitchStatement(String value) { switch (value) { case "Chandana": System.out.println("Input is Chandana"); break; case "OtherValue": case "OtherValue2": System.out.println("Other inputs : " + value); break; case "Test": System.out.println("Input is Test"); break; default: throw new IllegalArgumentException("Invalid input value : " + value); } }

Java7 : Multiple Catch Block with example

With JAVA SE 7, Multi-catch exceptions handling has been introduced and it is a convinent way for exception handling, since we can catch multiple exceptions using one catch block.

In the "Multi-catch" block each exception should be separated by pipe (|) charatcter and that will make code is more readable.

Read more : Working with Java SE 7 

Ex: public class SampleClass { public static void main(String[] args) { try { // Your code } catch (ParseException | IOException exception) { // inside the multie catch block } } }

What is WSO2 Governance Registry

Many SOA governance tools/solutions have not been matured over the years. However, SOA governance tools provided by WSO2 has been improved a lot during the last couple of years.

WSO2 Governance Registry provides enterprises with end-to-end SOA governance, which includes configuration governance, development process governance, design and runtime governance, and life cycle management. This enables IT professionals to streamline application development, testing and deployment processes. The latest WSO2 Governance Registry release (5.0), introduces a host of features to further enhance various aspects of SOA governance.
WSO2 Governance Registry (5.0) release has a new publisher and store user interfaces to publish and consume assets. Asset owners can publish the assets from the Publisher UI and manage the lifecycle of these assets from this UI, while consumers can discover them from the Store UI.

New features of WSO2 Governance Registry:
WSO2 Governance Registry is shipped with newly added …