On Java Development

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

Archive for the ‘Application Properties’ Category

Managing the Logging of Exceptions

without comments

Introduction

This post shows how to manage the logging of exceptions so that when developing the application the stack trace for the error appears in the Eclipse console. The behavior should change when the application is running on the TEST or PROD server so that the error message is logged to the application’s log file as a fatal error.
Read the rest of this entry »

Written by admin

January 13th, 2015 at 7:20 am

Calling RPG or CL Programs with SETLIBLEXEC

without comments

Introduction

This post shows how to call RPG and CL programs using SETLIBLEXEC which is a stored procedure residing on the iSeries (only in QGPL). SETLIBLEXEC accepts parameter values for the environment name of the library list to be used when it runs the name of the program to be called and the parameter values needed by that program.
Read the rest of this entry »

Written by admin

April 3rd, 2014 at 1:42 pm

Using ${catalina.home}

without comments

Introduction

This post shows how ${catalina.home}, which is set by the application server, can be leveraged to prevent hard-coding of paths. In the event that the application is moved to another server, which is the case when servers are upgraded, the application does not have to be modified and moved as-is.
Read the rest of this entry »

Written by admin

April 1st, 2014 at 12:20 pm

Using baseproject’s ApplicationContextManager class

without comments

Introduction

This post focuses on the ApplicationContextManager class that comes with baseproject and shows how it is used to obtain the application’s properties from a bean defined to the Spring Context.
Read the rest of this entry »

Written by admin

April 1st, 2014 at 10:13 am

Using Java Reflection to call methods of a Java Class

without comments

Introduction

This post shows how to use Java Reflection to call getter methods of a Spring context bean (a POJO). The POJO contains the application’s property values and the values need to be logged to the application’s log-file during the application’s startup phase. Since the property name/value pairs differ across projects this means the bean’s method names for each property are also different since their names reflect the names of the properties. Traditional approaches to logging the property values means writing customized code to explicitly call each method by name. Adding to this, whenever a new property is added, the logic has to be modified to include a call to the new method.
Read the rest of this entry »

Written by admin

March 7th, 2014 at 6:03 am