Create RESTful app using JAX-RS

Today we are going to discuss few of the strategies which can be used to make RESTful applications in JAVA.

Introduction :

JSR 311 also called as JAX-RS; is the Java Specification for RESTful web services. The few of the major vendors which implement JAX-RS are :

Read More »

Callbacks explained by hollywood principle

I thought of explaining the concept of callbacks via hollywood principle of : “Dont call us, we will call you, just leave your phone number (register callback) with us :)”

So, I made a small java program for the same.
Use case: SRK wants to apply for Hollywood movie.
Read More »

JVM Tuning settings, the ultimate list

Let us begin with the very basic question, why do we need our JVM tuned up? And what exactly is JVM.

JVM, is the instance of Java Runtime Environment, which comes into action whenever you run your application

So, in order to make sure JVM runs fine we require that there is enough space for JVM to run programs. And hence we require timely check on the performance factors and space allotted to the JVM.

The crux of the matter: Heap and Garbage Collection
Read More »

Hibernate learnings

Few of the important key points to remember in Hibernate:

1.) Use Transactional boundaries in your service layer.

2.) Outside a transaction boundary if session gets closed, the proxy object gets detached and hence if there is a collection which is lazily loaded, it can not be fetched. Either make separate call for the collection or use OpenSessionViewFilter.
Read More »

Key to Optimization: Algorithm and Analysis

Every problem has solutions but the most important thing is to find the solution that best fits that scenario. So as we take a dig inside the algorithms and techniques we will investigate how we can analyse the complexity and conclude the correct optimized solution.

Let us begin with a simple example and try to find the time and complexity.

Example : We need the sum of n natural numbers starting from ‘a’ and ending at ‘b’. Read More »