I'm revisiting the system used to generate lots of Entity and Session beans for the system at work. It uses a Java class to dump JDBC metadata to a file, then a series of Perl clases that use this data metadata, human-entered relationship and usage metadata, and s series of Template Toolkit templates to generate lots of Java source and the necessary XML deployment descriptors. (Huh, maybe I should have submitted that to OSCON...)
It works pretty well right now, but my reasons for revisiting are:
I toyed with the idea of rewriting it in Java so the system would be more homogenous (and I'd get some experierience with Java templating systems) but there's not enough time for that.
(Originally posted elsewhere)