An immutable object is something whose state can’t be change after there creation, e.g. String objects. Once you have created a String object, you can’t alter this. Creating an Immutable object’s class Creating an immutable object’s class can be tricky. Minimal requirement to create an immutable object’s class is, make class and every member variable, …
Novice way to implement a Singleton
I believe everyone starts (and even continues to do so) implementing Singleton pattern in following fashion: also read: Java Tutorials Java EE Tutorials Design Patterns Tutorials Java File IO Tutorials Do you find any problem in it? Well, I have!!! The contract of Singleton class can be broken. Let’s discuss Singleton pattern in Simple Threaded …
What is Remote Debugging in Java?
Consider a scenario where you can’t run the application in your development environment, e.g. say your application can run only on a server machine (because it is dependent on some third party interface that are not accessible in your development machine) and you have to resolve a problem (bug). What you can do? Java Remote …
Spring BIND and NESTEDPATH Tags (<spring:bind> and <spring:nestedPath>)
Spring Tag Library Spring MVC provides a JSP tag library (Spring Form) for making it easier to bind form elements to Model data. Spring Framework also provides you with some tags for evaluating errors, setting themes and outputting internationalized messages. also read: Spring Tutorials Spring 4 Tutorials Spring Interview Questions Syntax to use Spring tag …
Spring MESSAGE and THEME Tags
Spring Tag Library Spring MVC provides a JSP tag library (Spring Form) for making it easier to bind form elements to Model data. Spring Framework also provides you with some tags for evaluating errors, setting themes and outputting internationalized messages. also read: Spring Tutorials Spring 4 Tutorials Spring Interview Questions Syntax to use Spring tag …
Managing transactions in EJB 3.0
Transaction represents a group of activities that must be performed as a single work unit. This clarifies that a transaction is complete if and only if all the work items within a work group results in success. If any of the work items fails, then the transaction as a whole will be treated as a …
Runtime.addShutdownHook()
Preface Every Java Program can attach a shutdown hook to JVM, i.e. piece of instructions that JVM should execute before going down. also read: Java Tutorials Java EE Tutorials Design Patterns Tutorials Java File IO Tutorials Problem A program may require to execute some pieces of instructions when application goes down. An application may go …
Integrating Spring Web Flow with JSF
Spring Web Flow is a framework that provides abilities to developers to capture the workflow of a web application in the form of configurational constructs called Flows. JSF is a UI framework that provides support for developing complex user interface components along with simplified page navigation rules and event handling. In this article we will …