Composite Primary Key pattern in Hibernate

I was trying to create a relationship without using surrogate primary keys the other day in Hibernate. I started searching around for examples, but did not find many examples that used Annotations.
So here is what I implemented:
I have an Application that can have many Accounts spread across many Machines. Each Machine can only have 1 [...]

Tags:

Centralizing PMD rules for use with Maven.

PMD has long been a great report to find out many useful details of your code base.
I find that the default ruleset does not contain some checks that I find very useful especially when I have more junior developers. I can catch many problematic errors.
<?xml version=”1.0″?>
<ruleset name=”Custom ruleset”
xmlns=”http://pmd.sf.net/ruleset/1.0.0″
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd”
xsi:noNamespaceSchemaLocation=”http://pmd.sf.net/ruleset_xml_schema.xsd”>

<description>
This [...]

Tags:

Updating Maven on Mac OS X

Maven, has been my project build centric tool for many years now. I have never really had an issue updating to the latest version on Windows, Linux or Unix environments, but every-time I update Mac, I tend to forget the subtleties in the process, so I thought I would blog my findings.
1. download the zip [...]

Tags:

Cannot locate BeanDefinitionParser for element

When I upgraded from Camel 2.0-SNAPSHOT to 2.0.0, while I was using Spring 2.5.6, I started getting the following errors on deployment:
error:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Cannot locate BeanDefinitionParser for element [jta-transaction-manager]
This was my original email thread on the Camel list:
http://www.nabble.com/endpoint-not-found-after-2.0.0-upgrade-td25174532.html
This is a Spring configuration issue, and required context changes to separate concerns.
I solved the issue [...]

Tags:

Maven Archetype Directory Structure

I created a Visio diagram of an Executable Jar and Web Application Archetype Template for Maven. I wanted to share the image and hopefully this can help someone.
My goal in creating this diagram was to give developers that are new to Maven, a primer as to where various application files will reside within a standard [...]

Tags: