
Originally Posted by
wpoitras
I would suggest neither. You don't need to pool objects unless there is a compelling reason to do so. You can attach a stateless POJO to a queue using the asynchronous JMS stuff in Spring 2.0. Adding pooling or session beans adds overhead you may not want.
In thinking about it briefly, you might consider writing your code such that you can decide after some testing. Just make sure your message processing logic is in a POJO that you can attach to the infrastructure that makes the most sense for your system. Spring helps you do that allowing you to add failover, transactions and other services without having to add such logic to your POJO.