You could try using each object's toString() method and merging that with a Velocity template at run-time. Use the MBean to associate each object with a template. Every object already has a toString() method and a String is already guaranteed to be serializable, so you're most of the way there.
That could be the default behavior. You could allow the programmer to specify the name of the String method in the MBean, so you could use MyObject.toWebMacroString() for one and MyObject.toVelocityString() for the other, or add support for different template engines in the future. For example, I usually have a toXML() method in my objects and I could use that to send the object straight through a template to a Web or WAP user without having to go through a servlet or JSP front end. >And auto-determin the template engine to use (WebMacro prefers .wm, and >Velocity has some other extensions (I don't remember exactly which right >now)) That would be ".vm". -- Ken Jenks, http://abiblion.com/ Tools for reading. _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
