Java

AWS Secret Manager – Protect Your Secrets in Applications

Introduction AWS Secrets Manager – Firstly lets understand why use secrets in applications. Many applications use secrets for various use cases. Using an application ID and Secret key to generate a token or maybe the secret key itself to access APIs, a username and password to create a database connection string to retrieve data from …

AWS Secret Manager – Protect Your Secrets in Applications Read More »

Hashi Corp KV Secrets Manager integration with SpringBoot Application

Securing your secrets inside application is not an easy task. Typically applications deployed to multiple environments, and developers have to maintain separate credentials for each environment in configuration files, if there is no encryption mechanism (most of the time 🙁 ) those username and passwords or secrets for token generation (API keys), database connections are …

Hashi Corp KV Secrets Manager integration with SpringBoot Application Read More »

Functions as First Class Citizen Variables

Hello all, In this post we are going to talk about functions as first class citizens and it’s usages. taken from – https://www.linkedin.com/topic/functional-programming The easiest way to understand is to analyze a demonstration. Package java.util.function  in java 8 contains all kinds of single method interfaces. In this samples we are going to use the java.util.function.Function …

Functions as First Class Citizen Variables Read More »

Spring Boot Application Live Reload (Hot Swap) with Intellij IDEA

While developing Spring Boot Applications using Intellij IDEA, it was so annoying to restart the spring boot app after each and every change. Spring boot provides live reload (how swap) of application out of the box using the following dependency.  <dependency>    <groupid>org.springframework.boot</groupid>    <artifactid>spring-boot-devtools</artifactid>  </dependency> But it didn’t live reload the application/container and the hot deployment, …

Spring Boot Application Live Reload (Hot Swap) with Intellij IDEA Read More »

WSO2 ESB : Consume JMS Messages From HornetQ embedded JBOSS EAP

In this post we are going to explore some JMS transport capabilities in WSO2 ESB. We are going to learn on how to create a message queues in JBOSS EAP, Publish sample messages to that queue. And finally using WSO2 ESB to listen to that queue and fetch the messages from the queue. Following are …

WSO2 ESB : Consume JMS Messages From HornetQ embedded JBOSS EAP Read More »

[WSO2] Adding tenants using Admin Services – Sample Code

Adding tenants using admin services is straight forward. You have to use two admin services. 1. AuthenticationAdminService2. TenantMgtAdminService The  AuthenticationAdminService is used to authenticate the user and get the session.Below is a sample code for adding a tenant 1 2 3 4 5 6 7 8 9101112131415161718192021222324252627282930 public class TenantMgtAdmin { private static final String …

[WSO2] Adding tenants using Admin Services – Sample Code Read More »

[WSO2] Sample Web Application to Demonstrate Insertion, Retrieval and Deletion of a resource to Registry

Here is a sample web application to test Insertion, Retrieval and Deletion of a  resource to Registry. Here is the sample servlet code. Github Link package org.wso2.carbon.test;import java.io.IOException;import java.io.PrintWriter;import javax.servlet.ServletException;import javax.servlet.annotation.WebServlet;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import org.wso2.carbon.context.CarbonContext;import org.wso2.carbon.context.RegistryType;import org.wso2.carbon.registry.api.Registry;import org.wso2.carbon.registry.api.Resource;/** * Servlet implementation class RegistryTest */@WebServlet(“/RegistryTest”)public class RegistryTest extends HttpServlet { private static final long serialVersionUID = …

[WSO2] Sample Web Application to Demonstrate Insertion, Retrieval and Deletion of a resource to Registry Read More »

Create a WSO2 Worker-Manager Cluster in Just 2 Minutes !

I’ve been working on an application(WSO2 Cluster Wizard) which creates a Worker-Manager Separated cluster for a given WSO2 Product. The objective of this application is to reduce the time spent on creating clusters in developers/testing local machines. Though puppet scripts can automate the process AFAIK, no one uses puppets to create clusters in their local …

Create a WSO2 Worker-Manager Cluster in Just 2 Minutes ! Read More »

Enable Java Security Manager for WSO2 Products

Hi everyone, in this post we are going to explore on how to enable java security manager for WSO2 products. For this we need to sign all the jars using the jarsigner program. For the learning purpose I will use the wso2carbon.jks java key store file, which ships default with WSO2 products. Special thanks goes …

Enable Java Security Manager for WSO2 Products Read More »