Databinding with POJOs

I came across a similar problem that this fellow encountered when attempting to find a way bind POJOs in Hibernate to a Swing UI. I had developed several web apps using Hibernate with much success and recently, I have been exploring using Swing and Hibernate by extending one of my prior projects. In general, the domain models consist of dumb data objects with just setter and getter method and nothing more. I started looking into the JGoodies data biding framework as many have been raving about it.

The problem with this API is that your domain objects now have to extend Model. This is a pain in the ass task plus, I’m lazy :). You see, I have 29 objects that I would have to change and add property change events for each setter in each class. Sure not a hard thing to do, but tedious and BORING, and probably error prone. So, I am now experimenting by “Introducing” the Model behavior to my domain model using JBoss AOP. We’ll see how it goes.