Logging is a common issue for development teams. And right now there are a lot of options on what exactly to use for logging in Java. The most famous frameworks are: Log4j, Logback, Commons-logging, java.util.logging. But what happens if we want to change a logging framework by another one, did we have to change the whole [...]
Archive | Java / J2EE RSS feed for this section
What is load on startup element in web.xml file
February 21, 2013
specify the order in which we want to initialize various Servlets. Like first initialize Servlet1 then Servlet2 and so on. This is accomplished by specifying a numeric value for the <load-on-startup> tag. <load-on-startup> tag specifies that the servlet should be loaded automatically when the web application is started. The value is a single positive integer, [...]
Lazy Initialization, Singleton Pattern and Double Checked locking
July 24, 2012
Lazy Initialization Lazy Initialization is a technique where one postpones the instantiation of a object until its first use. In other words the instance of a class is created when its required to be used for the first time. The idea behind this is to avoid unnecessary instance creation. But there are concerns related to [...]
Implementing a Producer-Consumer scenario using BlockingQueue in Java
June 27, 2012
Before we start with the actual example, lets have a look at the few concepts we should be aware of. Producer-Consumer Problem Wikipedia here says that: The consumer producer problem (also known as the bounded-buffer problem) is a classical example of a multi-process synchronization problem. The problem describes two processes, the producer and the consumer, [...]
New features in JDBC 3.0
June 18, 2012
This article provides an introduction to the array of core new features available in JDBC 3.0. More specifically, the features ‘supporting save points’, ‘using parameter metadata’, ‘updating large objects’ and ‘auto generated keys’ are discussed. Wherever possible, to get a hang of it, relevant code samples have been provided in the respective sections. Download Source [...]
JavaBeat Newsletter-2: New and noteworthy in Java Ecosystem
June 18, 2012
Interesting blog posts from JavaBeat: Exploring the enhancements to the java.nio package as part of Java 7 we wrote about watching a directory for changes and also looked at few methods in the Files class. Writing agents in Java to instrument the class files/byte code. Using Fork-Join framework introduced as part of Java 7. Getting [...]
Deploying a ZK based Java EE application to Red Hat Open Shift Cloud
May 29, 2012
OpenShift is a Platform As A Service (Paas) offering from Red Hat joining the likes of Heroku, GAE, Jelastic and others. OpenShift supports Java EE, PHP, Node.js, Ruby, Python and Perl applications. I tried out deploying a simple Java EE application based on ZK Framework, interested people can have a look at the application running [...]
Implementing RESTful API for obtaining the book details for an ISBN
May 8, 2012
Lot of developers out there at some point in time would want to know about an API to get the book details and I was in such a situation sometime back and I managed to find out about ISBNDb. But when I looked for the apis sometime later, I landed here where there are 53 APIs [...]
Core Tags in JSTL
May 22, 2011
[ In the second part of this tutorial on JSTL, the author explains how the tags in the core-group can be used in JSP pages, with a number of simpleexamples.] We are now ready toexperiment with all the tags in the ‘core’ library. The core tags have the following uniform‘uri’. ‘http://java.sun.com/jstl/core' =============================== ( However, in [...]
Accessing Portlet-specific Objects in JSP Pages
April 30, 2011
This article is based on Portlets in Action, to be published June 2011. I t is being reproduced here by permission from Manning Publications. Manning publishes MEAP (Manning Early Access Program,) ebooks and pbooks. MEAPs are sold exclusively through Manning.com. All print book purchases include an ebook free of charge. When mobile formats become available [...]







March 28, 2013
0 Comments