Ratings

Rating

Custom Spring Editors

I had the need recently to inject an array of strings (java.lang.String[]) into a bean property and I was curious about whether or not I could inject the strings as comma-separated values (CSV). With a little poking around in the Spring API I found that the supporting PropertyEditor is already there, but not configured by default. My next question was about how you go about configuring custom property editors.

Average: 5 (3 votes)

Columns4Eclipse Fix for Eclipse 3.3.x

I loved the Columns4Eclipse plug-in. It was well-written and well-documented… and then as of 3.2.x (or 3.3.x I don’t remember), it died. I posted a note on the forum as the bug ticket had already been made, but it seems that the project has died.

Average: 5 (3 votes)

Perforce Eclipse Plug-in Issues

The Perforce integration plug-in for Eclipse seems to have some issues with Eclipse 3.3.x, which just came out a few weeks ago.

Average: 5 (1 vote)

Are You Still Mocking Me?

JMock 2 came out not too long ago and after some initial worry about backwards compatibility I decided to give it a try. It plays very nicely with version one, but you will want to run out and convert all of your tests once you see how truly beautiful version two is.

Average: 5 (1 vote)

Jakarta Commons Collection - Predicates

Nestled in the Jakarta Commons is a monstrosity called the Jakarta Commons - Collections API. It contains a wealth of extensions to the standard collections as well as new collections and collection-related utilities.

Average: 4.6 (11 votes)

Embedding Jetty in Spring

This is my most popular article and it is a bit outdated. The discussion here is based on Jetty 5, while Jetty 6 makes things a lot easier to do. I am working on a follow up to this article that will redo the embedding using Jetty 6.

I came across Jetty a while back and finally got around to really playing with it recently. I was amazed at how flexible it was and how easy it was to embed it inside a Spring Application Context. I did have to write a couple of small helper extensions to ease things along but other than that it was pretty much just a configuration exercise. What follows is a brief discussion on what I did and how I did it.1

Average: 4.5 (4 votes)

Death and Marriage

WOMAN: What would you do if I died? Would you get married again?
MAN: Definitely not!
WOMAN: Why not - don’t you like being married?
MAN: Of course I do.
WOMAN: Then why wouldn’t you remarry?
MAN: Okay, I’d get married again.
WOMAN: You would? (with a hurt look on her face)
MAN: (makes audible groan)
WOMAN: Would you live with her in our house?
MAN: Well, probably, it is paid for.
WOMAN: Would you replace my pictures with hers?
MAN: That would seem like the proper thing to do.
WOMAN: Would you sleep with her in our bed?

Average: 4 (1 vote)

Spring + RMI + JNDI = Cool

I started looking into RMI again; it’s been a while since I have used it directly and as often happens, I got sidetracked. I found out how easy it is very to setup an RMI registry with Spring and then access the bound objects via JNDI.

Average: 3.8 (4 votes)

Jakarta Collections - Transformers

I could say that “they’re more than meets the eye", but that would really date me.

Continuing the example from my discussion of Predicates, I would not like to take a quick look at Transformers. According to the JavaDocs:

A Tranformer defines a functor interface implemented by classes that transform one object into another.

They are very useful when you need to preform an action of some sort on every element, or a group of elements, in a collection.

Average: 3.7 (7 votes)

Creating Spring Contexts Programmatically

If you are familiar with the Spring Framework I am sure that you know how to create a context and fill it with beans using XML (DTD or Schema) or maybe even using properties files (have to try that one sometime), but have you ever tried creating a context programmatically… purely in Java? It’s actually not all that difficult, just a little verbose.

Average: 3.5 (2 votes)