Veit's Blog

Hej! 👋 Welcome to my curated space of insights on software development and the tapestry of life.

JPA 2.1 and UUID

2015-04-12
Recently I came over to map a table in a Postgres Database that contains a UUID Column. With JPA 2.1 there is a very simple way to map this column to the java.util.UUID-Field in the entity. Continue reading

Java vs. C#: Inheritance of annotations

2015-03-14
Recently a friend and I came over with the idea to blog a series of Java vs. C#. Everything related to this topic you’ll find on the internet is too superficial. We are experienced in both technologies and environments (although my friend is more a .NET guy and my daily bread is Java EE) and could provide a more detailed point of view. Built-in-annotations in Java are not inherited. I think there is no need for an code example because it’s a fact :). But for your own annotations, there is a way to inherit them with the @Inherited-annotation. Continue reading

Static Code Blocks

2015-02-04
In a presentation that I gave recently, I noticed that some of the participants never heard of static code blocks before. Static code blocks let you execute something at class loading time (assign a value for example). They are like “Class-Constructors”. In this example i created a @Default-Configuration-annotation. Once the Application was loaded, the static code block was looking for the annotation and set the default configuration (a property-file) The annotation: Continue reading

Filter Requests with JEE 6 / 7

2015-01-15
A tiny but shiny improvement with Java EE 6 was the @WebFilter – Annotation which made the filtering and manipulating of requests very easy: No more com.sun.jersey.spi.container.ContainerResponseFilters entries in the web.xml. All you have to do is to implements the Filter-Interface and annotate your class. Continue reading
Newer posts