Intercept Incoming SMS on Android

Last week I talked about using SMS to activate your application which is a pretty powerful way to verify a user account. I left a couple of things out though. One of those things is the ability to grab the incoming SMS automatically. This is only possible on Android but it’s pretty cool for the users as it saves on ...

Read More »

Enum: How to use name() and toString() methods correctly

The Difference Between Two Methods? The Java Enum has two methods that retrieve that value of an enum constant, name() and .toString(). The toString() method calls the name() method which returns the string representation of the enum constant. In listing 1, the value returned by calling the name() and toString() on an Animal.DOG constant method is DOG. Listing 1: Animal Enum public ...

Read More »

Testing time based reactor core streams with Virtual time

Reactor Core implements the Reactive Streams specification and deals with handling a (potentially unlimited) stream of data. If it interests you, do check out the excellent documentation it offers. Here I am assuming some basic familiarity with the Reactor Core libraries Flux and Mono types and will cover Reactor Core provides an abstraction to time itself to enable testing of functions which depend on ...

Read More »

Eclipse MicroProfile: 5 Things You Need to Know

Optimising Enterprise Java for Microservice Architecture The Eclipse MicroProfile initiative was launched at JavaOne 2016, the brainchild of server vendors and Java user groups, in order to address the shortcomings in the Enterprise Java microservices space. The pace of Java EE releases slowed to a point where it was unable to meet the challenges of the rapidly advancing microservice trend. ...

Read More »

Java 9, Jigsaw, JPMS, and Modules: A Personal Exploration

Java 9 delayed so many times because of Project Jigsaw, and you may be heard a lot of thing about modules, modularity, and other stuff, so, what it’s all about? What the heck is modularization and what do we mean by modularized platform? Java Platform Module System (JPMS)? Is it going to be a revolution in Java ecosystem? This post is my ...

Read More »

Introduction to WSO2 Registry Mounting

java-interview-questions-answers

This post is based on the common questions raised about registry mounting and how it works etc. Below are the main questions people ask: 1). How mounting works? 2). What is the difference between Config Registry and Governance Registry? 3). Can I use databases other than H2 for Local Registry? 4). What is meant by mount path and target path? ...

Read More »

GC Explained: Algorithms

As described in the previous post, we have four different garbage collectors available in HotSpot JVM. There are some significant differences between them, but the actual concepts behind the algorithms which are used to do the actual job are quite similar. In this short post, I will try to explain three basic algorithms: Mark-sweep Mark-sweep-compact Mark-copy GC Roots Before we ...

Read More »

Java Application Performance Monitoring: End-to-end performance of complex distributed applications

Discover faster, more efficient performance monitoring with an enterprise APM product learning from your apps. Take the AppDynamics APM Guided Tour! Monitor Java application performance — focused on business transactions — end-to-end in the most complex and distributed environments. Auto-discovered business transactions, dynamic baselining, code-level diagnostics, and Virtual War Room collaboration ensure rapid issue identification and resolution to maintain an ...

Read More »

Using Gmail as SMTP server from Java, Spring Boot apps

spring-interview-questions-answers

Gmail users can use Gmail’s SMTP server smtp.gmail.com to send emails from their Spring Boot apps. For this let us do some setup in the app: Provide SMTP connection properties in the application.properties file: spring.mail.host=smtp.gmail.com spring.mail.username=<your gmail/google app email> spring.mail.password=***** spring.mail.port=587 spring.mail.properties.mail.smtp.starttls.enable=true spring.mail.properties.mail.smtp.auth=true spring.mail.properties.mail.smtp.starttls.required=true Use Spring Boot Email tools library – which is a wrapper over Spring Boot Email starter library. ...

Read More »