Persisting Joda-Time Fields with openjpa

Lately i became curious about how to store joda-time objects into a database with openjpa. Well, its supprisingly easy if you only want to store/retrieve the objects:

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

import org.apache.openjpa.persistence.Persistent;
import org.joda.time.DateTime;

public class EntityA {
private Integer id;

private DateTime startDate;

Thats it .. of course what happens is, that openjpa does serialize the DateTime object and stores them as a BLOB field in the database, which might not be always the preferred solution.

Another way would be to add @Externalizer and @Factory annotations to the DateTime object, and write a custom convertor that would convert DateTime to SQL Timestamp or similar.

Posted in Uncategorized | Leave a comment

Reducing Raspberri PI’s memory usage

I just got my Raspberry pi recently and found this really usefull link for tuning Raspbian to use less memory :

Posted in Uncategorized | Tagged , , | Leave a comment

Git with Jenkins

Recently I did try to use jenkins together with git on windows. During configuration i stumbled along some blogpost that advised to use git.cmd instead of git.exe (which does set some more enviromnent variables, for example %HOME% to use _nettrc of curl)

Unfortunately using git.cmd leads to many very strange errors in jenkins, like missing branches, or ambiguous checkouts. Testing with some random Java project from github gave the same results, but reverting back to git.exe (and setting %HOME% for the serveruser manually) did the trick .. everything works correctly as expected :)

Posted in Uncategorized | Leave a comment

Hudson/Jenkins integration in Eclipse

Now, that the hudson-eclipse plugin seems dead for quite a while (not anything since 2009) i was briefly thinking about writing my own update with the xml-api by Jenkins.
But then i discovered that the mylyn project did what i wanted and even more ! With mylyn 3.5 there is an Jenkins/Hudson connector that will allow you to see the status of each job, see the test results, check the Jenkins console in eclipse, even provide a clickable changelog !

Check out the new features of !

Posted in buildmanagement, java | Tagged | Leave a comment