Annotations and reflection: Retention

The other day I tried to perform the following code:

public @interface MyAnn {
String value();
}
@MyAnn(value = “foo”)
public class MyClass {
}
..
MyClass.class.getAnnotation(MyAnn.class).value();

This gave me a NullPointerException because the annotation was not found.
I cursed, I googled, and I felt stupid for a whole day
Later, I figured out it has something to do with retention. [...]

JAXB 2.1 and Jdk 6 problem

Jaxb is part of the jdk since jdk version 6. The earliest versions of the jdk 6 (update 1 till 3) have jaxb 2.0 included. The later versions of jdk 6 make use of jaxb 2.1.
Our pearlchain application makes use of camel which on its turn depends on jaxb version 2.1.  In order to be [...]

NamedQuery annotations on package

In our projects we want to set NamedQuery annotations in customer specific projects. However our entities are placed in our product projects and we don’t want to clutter our product entities with queries which are customer specific.
The only two ways (I know about)  you can add namedquery annotations which will be interpret by hibernate are:

put [...]

Jasper reports integration into the client application

Jasper form has been introduced to add the facility of displaying jasper reports in our UI application.
net.pearlchain.prl.ui.jasperform.JasperForm is a subclass of be.retailability.util.springrich.form.GenericDetailForm and it has following parameters:

printService – This is reference to the print service where JasperPrint is created
reportFileLocation – This is the location of the compiled report at the server side. It defines relevant [...]

PearlChain style in google docs

 
If you are writing a document in Google Docs, and you would like to have a “Pearlchain flavor” to your document, then you can use the CSS below to get numbered and orange headers.
Simply past the CSS below in via the Edit menu –> Edit CSS