Can I perfectly replace ejbs with spring framework, using jta transaction manager?
Printable View
Can I perfectly replace ejbs with spring framework, using jta transaction manager?
You can replace EJBs with some other remoting strategy. However, if you have transactions that involve an EJB call that participates as part of a JTA transaction, you won't be able to replace that EJB call with something else. That is because I haven't seen another remoting strategy where a remote call can participate as part of a JTA transaction.
BTW, Spring can also fit into an EJB based system. It also can help you reduce your reliance on EJBs where they aren't really needed.
It's also worth nothing that in general the idea of propagating a tx context over the wire is someone you don't particularly want to do. In general, each remote endpoint is likely to be performing a piece of work that is complete in itself and corresponds to a transaction. I think that at least if you're using WebLogic with Spring remoting over RMI, with a JNDI lookup and JTA, you actually would get tx propagation without EJB. However, I haven't tried this.