|
From: Jason C. <ja...@ze...> - 2004-10-28 14:51:59
|
Eugene Kuleshov wrote: > jas...@ma... wrote: > >> Another idea to reuse legacy containers would be to just write a MDB >> wrapper which delegated to Spring to create the POJO. While its more >> painful to configure, it would allow you to reuse the legacy MDB >> infrastructure and use Spring for Dependency Injection. > > > That is exactly what we are using for a while. MDB and SSLB's for > remoting/facades/CMT and all internals is managed by Spring (pojo's, > IOC, AOP, pooling...). The only uglines is that to start nested > transactions we can't use Spring's TX wrappers and have to use helper > SSLB's to plug in into CMT. > > regards, > Eugene > This is kind of like what I built... I built a JMS dispatcher for XWork which is all wired together with Spring. The components you write are just XWork Actions (just POJOs which implement the Action interface) and the rest of what happens, whether it's sending a response Message or sending 100 messages, one for each Object in a List, is handled by the framework outside the Action based on configuration. I made the Dispatcher a MessageListener and created a sub-class which is an MDB. I'm very interested in seeing how this Spring MDB replacement goes with transactional semantics, 'cause then this could be deployed in a very light container. If anyone's interested in trying this out in a "real app" let me know, for now it's just been an interesting intellectual challenge and an example to use for the WebWork book of how XWork can be used outside the web... Jason |