Tuesday, August 19, 2014

VisualVM for inspecting of application profiling

VisualVM is a Java profiler shipped with the JDK and launchable via the command line by calling jvisualvm. http://visualvm.java.net/

Thursday, July 31, 2014

Oracle Regular Expressions : REGEXP_LIKE for combination of IN | OR | LIKE

REGEXP_LIKE is an interesting solution for IN operator or OR  or LIKE

When we want to find the cities which stating letter 'Lon' or 'C' or etc .. and we do not know we can not user  IN or LIKE or  OR to fulfill this requirement as follows

SELECT * FROM Customers
WHERE City IN ('Paris','Colombo',.....);

Above is not ideal solution but following is ideal solution with may parameters

SELECT * FROM Customers
SELECT * FROM Customers
WHERE City LIKE 'Lon%' or  City LIKE 'Col%' or .......;

Here is an ideal solution with single param solution with REGEXP_LIKE

SELECT * FROM Customers
WHERE  REGEXP_LIKE (City,’Lon|Col’);

Monday, June 30, 2014

JPA and JPA compliant implementations

This blog post explain the JPA and its compliant implementations . In 2006 Java community introduced the JPA 1.0 with EJB 3 because EJB2.1 was heavyweight resource consuming , JPA is a Persistence specification and any one can implement the persistence provider , Hibernate has their classical ORM tool , after introducing JPA 2.0 they released Hibernate Entity manager which a complaint implementation. There were other providers OpenJPA , EclipseLink and DataNucleus 

Friday, April 11, 2014

HTTP Status 403 - Access to the requested resource has been denied

Many developers in web application industry had faced this problem , if you happens to this problem your not a new , many have faced this issue , in this post will explained how to correct this issue

This is happen when you are trying to log in to application by giving user name and password to web app which enforced FORM based authentication , Following two entries are solution for "HTTP Status 403 - Access to the requested resource has been denied "

<!-- 400 code is from trying to go directly to login.jsp -->

<!-- 408 code is from trying to go directly to login.jsp -->

Wednesday, March 5, 2014

How to debug Java code when using ANT script In IntelliJ IDEA

This post illustrates how to debug a Java Program which is executing stating from ANT script. This type of situation come across when executing a program which is in jar file and need to add additional parameters which were set up using ANT script arguments

Following is how we can write a ANT script , red highlight two lines support for the debug



The following screen shot illustrates way we can configure Idea IDE to debug Java processor  , this port 5432 need to be same with IDE configuration

If you have any query please post

Monday, March 3, 2014

JPA vendors integration with Spring

Today I would like to post JPA vendor integration with Spring Frameworks. JPA is a Java Persistence API , a standard specification for JEE projects , There are many compliant implementation , it is call JPA vendors

Following are the popular JPA vendors
  1. EclipseLink
  2. Hibernate 
  3. OpenJPA