How to create Immutable Class in Java

We have heard the word “Immutable class” lots of time in Java. The best example is class “String“. Immutable class is the class whose value cannot be changed throughout the life cycle. We cannot change the content of String class, everytime new reference is created when we change the content, that is the basic difference between String and StringBuffer Class.
In this article, i will explain the step by step process to create the custom Immutable class in Java.
Our class should not able to derived and for that we will declare our class as final. The values cannot be change and thats why we will declare all the variables as final and we will provide only the getter methods as we cannot write setters because of final variables.
So to summarize, following steps needs to be taken:

Categorized as JAVA Tagged ,

Quartz framework tutorial with example – Schedule job in Java

What is Quartz?

Quartz is a job scheduling system that can be integrated with, or used along side virtually any other software system. The term “job scheduler” seems to conjure different ideas for different people. As you read this tutorial, you should be able to get a firm idea of what we mean when we use this term, but in short, a job scheduler is a system that is responsible for executing (or notifying) other software components when a pre-determined (scheduled) time arrives.
Quartz is quite flexible, and contains multiple usage paradigms that can be used separately or together, in order to achieve your desired behavior, and enable you to write your code in the manner that seems most ‘natural’ to your project.
Quartz is very light-weight, and requires very little setup/configuration – it can actually be used ‘out-of-the-box’ if your needs are relatively basic.
Quartz is fault-tolerant, and can persist (‘remember’) your scheduled jobs between system restarts.
Although Quartz is extremely useful for simply running certain system processes on given schedules, the full potential of Quartz can be realized when you learn how to use it to drive the flow of your application’s business processes.

Why not just use java.util.Timer?
Since JDK 1.3, Java has “built-in” timer capabilities, through the java.util.Timer and java.util.TimerTask classes – why would someone use Quartz rather than these standard features?
There are many reasons! Here are a few:

  1. Timers have no persistence mechanism.
  2. Timers have inflexible scheduling (only able to set start-time & repeat interval, nothing based on dates, time of day, etc.)
  3. Timers don’t utilize a thread-pool (one thread per timer)
  4. Timers have no real management schemes – you’d have to write your own mechanism for being able to remember, organize and retrieve your tasks by name, etc.

Step By Step Hibernate Tutorial Using eclipse WTP

Hibernate is the ORM tool widely used in java community to persist the java object using Object Relational Mapping (ORM) concept. ORM reduces number of lines to interact with database with optimized query language which is Hibernate Query language (HQL).

In this example, we will create a simple login application using hibernate tool of eclipse. We will use eclipse WTP (Web Tools Platform), to install “Hibernate Tools”. Follow below steps :

In Eclipse IDE, menu bar, select “Help” >> “Install New Software …” put the Eclipse update site URL “”

Eclipse Install New Software - Hibernate
Eclipse Install New Software - Hibernate

How to start the tomcat in debug mode for debugging in eclipse

1. Open the startup script in (your_tomcat_home) {Location is : %CATALINA_HOME%binstartup.bat }
2. Add the following lines at the first blank line in the file ( around line 8 )
Windows :

set JPDA_TRANSPORT=dt_socket


export JPDA_ADDRESS=8000
export JPDA_TRANSPORT=dt_socket

3. Change the execute line at the end to include “jpda”

call “%EXECUTABLE%” jpda start %CMD_LINE_ARGS%


exec “$PRGDIR”/”$EXECUTABLE” jpda start “$@”

CC&B error Resolve – Unable to move value into property

Hi Friends this is very small but useful post to resolve the error “Unable to move value into”. Following is the snap of exception i found during developement (While inserting the value into Business Object [BO] using Business Service [BS] ).

The root LoggedException was: Unable to move value: ‘123456’ into property: ‘PolicyNum’
at com.splwg.shared.common.LoggedException.wrap(
Caused by: java.lang.NoSuchMethodException: Unknown property  : PolicyNum for bean class ‘’
at com.splwg.shared.common.PropertyUtils.getMethodDescriptor(

Create BPA Script in Oracle Utilities to invoke UI Map

In this post, i will discuss on creating the BPA Script to invoke the UI Map.

Navigate to “Admin Menu | S | Script +” and the details as per below image:


Creating BPA Script in Oracle Utilities / ORMB / CC&B
Creating BPA Script in Oracle Utilities

Creating UI Map in Oracle Utilities

This is the third article in series to create the UI Map in Oracle Utilities. In Previous two article we have seen that how to create the Business Service, Data Area and Service Program.

Navigate to “Admin Menu | U | UI Map +“. Give the UI Map Name as “CM_PERINPUT” and select “UI Map Type” = Complete HTML Document.

Creating UI Map in Oracle Utilities / CC&B / ORMB
Creating UI Map in Oracle Utilities

Creating Business Service and Service Program in ORMB / CC&B / Oracle Utilities

In Previous article, we have seen that how to create the Data Area and benefits of using Data Area. This article will focus on creating the Business Service and Service Program in CC&B.

First we have to create the Business Service in application then we have to code it in JAVA and deploy the updated “cm.jar“ file on server.

Go to “Admin | S | Service Program +“ and enter the Service name, Description and select the “Java Based Service” as Service Type.  In this example my service name is “PERSER“.

Now go to “Admin | B | Business Service +“ and enter the Business Service name and select the previously create service “PERSER“ for Service Name using look up. In this case the Business Service Name is “CM_PERSER“.
Now go to the “Schema” and add following code and click on Save.

Step by Step tutorial for creation of Business Service, Data Area, UI Map and BPA Script in ORMB / CC&B / Oracle Utilities for beginners

Before starting this demo application, I am assuming that you already have done CC&B set up on your local and Eclipse is configured.
What I am going to do so that I can use Business Script, Data Area, UI Map and BPA Script?
In this tutorial, I will create one UI Map which will take the person name as input and display list of all the person names as per input.
Final output screen would look like:

UI Map in ORMB/CC&B/Oracle Utility with BPA Script
UI Map in ORMB/CC&B/Oracle Utility with BPA Script