All this time, I've been running my Java web applications on plain Tomcat... with a few jars thrown in. And I've been pretty happy. The only J2EE (or JEE?) thing I needed that Tomcat didn't provide out of the box was JavaMail support. (I'm trying to stay away from EJBs...)
Then I started thinking... it would be pretty nice to be able to update two or more databases in some future app I write. (For example, a global "user" database and an app-specific database.) So logically, of course, this brought me to JTA. I searched for free JTA implementations and found
JOTM, which seemed to meet my needs well. It even had documentation on how to integrate it with Tomcat. But unfortunately, the docs were quite outdated and I had no luck.
I was about to give up when I stumbled upon
this and subsequently
this. It was exactly what I needed... documentation on integrating JOTM with Tomcat 5.5.x running on Java 5. Aside from a minor shutdown problem (i.e. it didn't), it seemed to work nicely.
But the fact I had to cobble it together made me wary. (Not to mention JOTM hasn't been updated for a while and the mailing list seems a bit... dead.) So I started thinking along the lines of... what if I took a full J2EE container and stripped it down?
So for the last week or so, I've been playing with various (free) J2EE containers. I've tried out
Geronimo,
JOnAS,
JBoss AS. (This is hardly an exhaustive list, of course.) J2EE containers, I've learned, are rather large, almost-unwieldly beasts. Sure, my new server has 2GB of RAM, but I didn't want most of that to be taken up by an appserver. Anyhow, for technical, ideological, and ease-of-use reasons, I decided to go ahead with Geronimo.
Geronimo comes in two flavors: a full J2EE-certified container and a minimal installation ("Little-G"). After some playing around, it turns out what I needed was actually something in between. First I tried starting with the full thing and shutting down services I didn't need. It worked pretty well... aside from the fact that I needed axis-deployer to be running to successfully deploy war files. (Despite having turned off axis itself...)
So I tried the other way: started with Little-G and copied things from the full version. And that, it seems, is the better approach. (It gets around the axis-deployer problem by having a stub called unavailable-webservices-deployer... imagine that!

) Anyhow, for future reference, what I ended up copying to Little-G was:
- repository/tranql/tranql-connector
- repository/geronimo/geronimo-mail
- repository/geronimo/geronimo-javamail-transport
- repository/geronimo/javamail
And I also threw in the hot-deployer module and jar file because it's such a convenient way to deploy apps. The tranql module is needed to be able to deploy DB connection pools (odd that it isn't included in Little-G, huh?) and the rest are for JavaMail support.
Anyway, I moved all but one app to this new set up. (The holdout is
Roller... no matter what I did, it just wouldn't work. Not insurmountable, but seemingly just some annoying classloader problem I have to work out...)
Anyhow, after going through all that, I feel a bit compelled to write something that requires JTA now...