On Java Development

All things related to Java development, from the perspective of a caveman.

Archive for January, 2014

Hibernate and JPA Annotations

without comments

Introduction

Early releases of Hibernate used an XML document to instruct Hibernate how to map the Entity class to its related database file. It is the mechanism used to associate properties of the entity class to the file’s fields and is known as object/relational mapping. These days, annotations are the preferred method, but there are some things developers need to watch for.
Read the rest of this entry »

Written by admin

January 12th, 2014 at 4:07 pm

Configuring Tomcat

without comments

Introduction

This post talks about a few configuration parameters that are added to Tomcat’s JVM. Technically known as arguments, they give the ability to connect to test or production databases and direct Log4j’s log files to the proper directory. Also, when Tomcat is running on the iSeries machine, there is another configuration parameter (“java.awt.headless”) that must be added to the JVM argument list.
Read the rest of this entry »

Written by admin

January 7th, 2014 at 7:23 pm

Posted in iSeries,Tomcat

Tagged with ,

Singleton Design Pattern

without comments

Probably the simplest of design patterns, the so-called Singleton ensures one single instance of a class exists. The method presented is guaranteed to execute only once ensuring there is only one instance created (and is thread-safe).
Read the rest of this entry »

Written by admin

January 6th, 2014 at 8:10 pm