Home » Author Archives: Michael Scharhag (page 3)

Author Archives: Michael Scharhag

Michael Scharhag
Michael Scharhag is a Java Developer, Blogger and technology enthusiast. Particularly interested in Java related technologies including Java EE, Spring, Groovy and Grails.

Using database views in Grails

grails-logo

This post is a quick explanation on how to use database views in Grails. For an introduction I tried to summarize what database views are. However, I noticed I cannot describe it better than it is already done on Wikipedia. Therefore I will just quote the Wikipedia summary of View (SQL) here:           In database theory, ...

Read More »

Grails: Using Hibernate Filters

grails-logo

The Grails Hibernate Filters plugin makes it possible to use Hibernate Filters with GORM. Hibernate Filters provide additional restriction rules that can be applied to classes and collections. The Hibernate Filters plugin makes it possible to use this functionality with GORM inside Grails applications. Let’s look at an example to see how filters can help us. Assume we have the ...

Read More »

Java: Using the specification pattern with JPA

java-interview-questions-answers

This article is an introduction to using the specification pattern in Java. We also will see how we can combine classic specifications with JPA Criteria queries to retrieve objects from a relational database. Within this post we will use the following Poll class as an example entity for creating specifications. It represents a poll that has a start and end ...

Read More »

Java: Moving conditions into Message files

java-logo

The Java classes ResourceBundle and MessageFormat provide a nice toolset for resolving localized messages inside Java applications. This post provides a small example on how you can move simple message related conditions from your Java code into message files using ChoiceFormat. If you already know ChoiceFormat I do not think you will learn anything new in this post. However, in ...

Read More »

Two things to remember when using Java RMI

java-interview-questions-answers

This is a short blog post about two common pitfalls you should be aware of when using Java RMI. Setting java.rmi.server.hostname If you are getting strange Connection refused to host: error messages on the RMI client and you are sure the connection should work (you double checked all the standard things like network configuration etc.) the RMI system property java.rmi.server.hostname is ...

Read More »

Getting started with Spring Data Solr

apache-solr-logo

Spring Data Solr is an extension to the Spring Data project which aims to simplify the usage of Apache Solr in Spring applications. Please note that this is not an introduction into Spring (Data) or Solr. I assume you have at least some basic understanding of both technologies. Within the following post I will show how you can use Spring ...

Read More »

Six things I learned for software localization

software-development-2-logo

This blog post is a personal compilation of six technology independent things I learned in the past months about software localization. A few weeks ago we finally went live with our application supporting 22 different languages. As a German development team working for a German customer we used German as our base language within the application. Our customer was responsible ...

Read More »

Groovy’s magical NullObject

groovy-logo

In this post I am going to explain some not that obvious differences of null in Java and null in Groovy. Let’s start with the following line:               Object o = null This statement works fine in Java and Groovy (except that Java requires a semicolon at line end). However, it has slightly different ...

Read More »

Getting Started with method security in Grails using Spring Security

grails-logo

This blog post will be about implementing method level security with security expressions in Grails using the Spring Security plugins. I assume you have some basic understanding of the Grails Spring Security Core plugin. Roles aren’t enough. When using the Spring Security Core plugin you typically start to configure which roles are required for accessing certain URLs. This configuration can ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close