I have understood that if I use EJB in Spring context, I get all the same benefits as if I was using it in “pure” EJB3 environment, is this true? I have googled but can’t find a definitive, clear answer.
For example, let’s say I have a session bean that updates some tables in the database and it throws a System Exception. In “pure” EJB3 environment the transaction is rolled back. What if I for example @Autowire this bean using Spring, does Spring take care of the transaction handling same way as does the EJB3 container? Or what? Does it maybe require some specific configuration or is it fully “automatic”?
I got very good answers with links to articles, and from those I compiled my understanding that yes, the session beans work the same way regardless of if they are used with Spring or without, as long as the beans are defined in the Spring context with
<jee:jndi-lookup>. Also found a good, simple article about this: http://java.dzone.com/articles/ejb-30-and-spring-25However I can’t accept just one answer because to me they are all equally good, but none of them exactly in point 🙂 Could be that my question was not clear enough to start with…
(It was suggested that I post this as an answer to my own question)