Java software development

Angular UI

A little while ago, the AngularJS framework was brought to my attention. The guys that did the presentation really piqued my curiosity, so I started exploring. There is a tutorial on the Angular site that gets you up and running pretty quick. But then I wanted to add an input field for a date. Now […]

Simple git server

If you want a hosted git repository and for some reason don’t want to use Bitbucket or github, getting a private repository up and running is relatively easy. You need A linux server with SSH access git A user, perhaps a special git account Login as <gituser> mkdir -p path/to/repos git init –bare path/to/repos/first_repo.git Add […]

JAX-WS and Spring

Pretty much everyone agrees that creating webservices om a contract-first basis is a good thing. So you start out writing your WSDL and defining the schema. Now you’ll want to bind this contract to your code. I think the best way to go is to use the wsimport tool. This will generate the Java interface […]

[JSF] Finding components in a ui:repe...

Java server faces allows you to find a component by it’s id. There is a findComponent method just for that. However, when a component is containt within a ui:repeat (or a4j:repeat) tag, this does not work. Lets say the component id is root:repeat:4:input. In this case findComponent will choke on the ‘4’ and return null. […]

Hibernate, JPA and @SequenceGenerator...

This is about sequence generators in Hibernate EntityManager/Annotations 3.4.0.GA. You’ll easily recognize the problem: your generated id values just explode into extremely high ranges that seem to have nothing to do at all with the current value of the sequence used in the annotation. This is because whenever the Hibernate AnnotationBinder encounters an @SequenceGenerator annotation, […]

HOWTO: SVN Merging

To merge a branch back to the trunk, first determine the revision when you made the branch using: svn log –stop-on-copy on the branch. Now check out the trunk and run svn merge -r{branch rev}:HEAD {branch URL} on the working copy. OK, you could do a svn diff -r{branch rev}:HEAD first at this point to […]

HOWTO: Create & apply a patch

Assuming 2 directories: original, containing the unmodified files and altered, containing the files you modified. Create the patch: diff -crBN original altered > patchfile.patch Apply the patch. Doing a dry run is optional, but recommended: cd target patch –dry-run -p1 -i patchfile.patch

HOWTO: Find & replace in files u...

Sometimes you need to replace some text in a couple of files. Usually you can just fire up a tool like Eclipse or some other kind of programmer’s editor. For those cases that you’re stuck with just a text shell, it’s the (*nix) command line utilities to the rescue. Living in a Windows world? -> […]

Hello World!

Sorry about the title. Just can’t help it – it’s kind of ingrained that whenever I try something new, I start out with a ‘Hello World!’. Keep it simple, get a first feel of the mechanics. So there it is.