Vita Rara: A Life Uncommon


Spring Has Sprung

Seeing as Spring is here, I decided it was time for a Spring theme. Hope you like it!

Here's wishing you and yours a happy wonderful season.

The Definitive Guide to Grails

Categories: | | |

I picked up a copy of The Definitive Guide to Grails this week. I'm most of the way through it, and I'm impressed. The Grails team has definitely done a lot of work. As a result I've started to dig into the code, and I'm getting a lot of ideas for Groovy Works.

Overall I highly recommend getting a copy of the book, whether you use Grails or not. It is well worth a look.

I'll post more thoughts when I finish the book.

I'm Hiring

I'm hiring a new developer for Vita Rara. As you can tell from my blog, we're a Java and Groovy house. It is not necessary that someone already know Java, Struts, EJB, JPA, Spring, etc. I'm willing to train and mentor. I do want someone who has coded before, and has a good knowledge of the Unix user environment. Take a look at the full Help Wanted ad.

If you'd be interested drop your resume to, along wit

Flying Standby from Chicago O'Hare Airport


This past Friday I had to be in Chicago for a meeting. I booked a round-trip flight on United, departing Friday morning, returning late Friday evening. There was a Noreaster moving into the North East. My return flight was canceled before I even took off, and I was re-booked on the first flight Saturday, the next morning. I was fine with that.

So, Saturday I get to the airport and the security lines are insane. Worst I've seen in a long time. Worse than Christmas week at O'Hare. Come to find out it's spring break. Well, I make it through security, and run to my gate, to find my flight canceled. I've never been in this situation before. I've only had one prior flight canceled on me, and I realize now that I was a neophyte when it came to flying "stand-by".

Groovy Works

Categories: | | | |

What is Groovy Works?

Groovy Works is a marriage of the Groovy programming language, Struts 2 and the Spring Framework.

Using Groovy Works you can develop your "Java" web application and avoid time consuming re-deployments and re-starts. Using Spring's support for dynamic re-compilation of scripted beans you can simply code, save, test in your browser. No need for costly recompilation, package, deploy, restart cycles.

Right now Groovy Works exists as a Struts 2 Plug-in, and an example application. Groovy Works depends on Spring 2.0.3.

Groovy and Struts 2 Integration

Categories: | | | |

I've done more work on integrating Struts 2 and Groovy. The short news is I'm making progress. I have reloading service beans and actions sort of working. Most of the issues are Spring related (more), but I'm working through those and we'll see what comes of it. With the release of Spring 2.0.3 the AOP issues should be fixed. I haven't actually gotten to testing that yet.

Groovy GPath: That WOW Moment

Categories: |

I'm writing a lot of integration tests for Quadran. I just wrote one where I needed to traverse a a complicated series of relationships, including collective relationships, through my domain model to test that a collection was initialized by Hibernate JPA. Here's the code:

Integration Testing Struts 2, Spring, and Hibernate JPA

Categories: | | | |

Last night with the help of loraxorg on the Spring Forums I got integration testing working under Maven 2 with Struts 2, Spring, and Hibernate JPA working. This was failing priorly due to a transient dependency in Maven 2 to an old version of Xerces. (See the Spring Forum thread for the solution.)

I have not done a lot of test driven development in the past, and personally I don't really get a lot of value out of isolated Unit tests. Integration testing on the other hand I like. Real data, real connections, real functionality, and at the moment for me real failures. I'd rather know now though.

Open That Bottle Day


Several years ago I heard about a special, but little know, holiday, "Open That Bottle Day." I remember the date as being February 28, but it might have been the last day of February. I immediately added it as a recurring event on my calendar, and have celebrated it with a little regularity over the past few years.

So, you ask, what is "Open That Bottle Day?" Well, do you have a bottle of wine that has been sitting around for years? You're just waiting for that "special occasion" to open it? Well, here it is, "Open That Bottle Day!"

Open That Bottle Day is a day top open that special bottle of wine for no other reason than to enjoy it and share with friends.

Getting a Transactional EntityManager in a JpaDaoSupport Derived DAO

Categories: | |

In Quadran my Data Access Objects (DAO) are descendants of JpaDaoSupport. JpaDaoSupport provides nice one liner convenience methods for finding entities and such. Sometimes though I find I need to actually get a handle to a JPA EntityManager. If you do this, and you are using Spring's transaction support it is important that you get the EntityManager in the proper way. Otherwise you will get an EntityManager that is not bound to the transaction, and will not be closed when your transaction completes and commit its changes, or close the session.

When I first tried getting an EntityManager I used the following code:

Syndicate content