JBoss Message Driven POJOs, really are POJOs. Unlike Spring MDP, there is no MessageListener interface you have to implement. You define Java methods, expose them through a Producer interface. Your invocations are turned into JMS messages underneath.Bill
Often in JMS/MOM applications you actually want to use the JMS API to see the various headers of the message (has it been redelivered, if so how many times, whats the reply to destination, its time to live, priority and so forth). So being dependent on a simple JMS interface MessageListener is not a big deal.
Though if you want to hide the JMS API and MessageListener interface, you can use
Lingo which is a Spring remoting library for JMS which works great with Spring MDPs to hide the JMS API. Whats more, Lingo works great on the client side too - providing a clean, load balanced and clustered POJO based remoting solution using the performance and reliability of JMS. In addition Lingo can handle asynchronous one way method calls or asynchronous request/response queries as well as the regular synchronous request/response of remoting/RMI.
Its worth highlighting again that Spring MDBs work great today, in any JVM 1.4 or later, in any servlet engine or in any ap server 1.4 onwards. EJB 3.0 only really works in Java 5 onwards with Java EE 5.0. I don't know about you but few of our customers can move to Java 5 yet.
Incidentally Bill, its kinda funny you see being dependent on 1 well established JMS interface as being somehow bad; yet are happy to promote a solution which adds exactly the same kind of runtime dependency - but this time on a number of annotations which are defined in EJB 3.0, which is still early draft and only works on Java 5. Thats way more restrictive and risky than using a MessageListener :).
Remember if you're using JMS you are
already dependent, in jar form at least, on the JMS API - so EJB 3.0 actually adds more dependencies - Java 5, an EJB 3.0 application server and the EJB 3.0 annotations plus the added risk of the specification still being an early draft.
James
LogicBlaze