EJB3 with Spring

Posted by fish on Stack Overflow See other posts from Stack Overflow or by fish
Published on 2010-06-01T13:21:17Z Indexed on 2010/06/08 8:42 UTC
Read the original article Hit count: 440

Filed under:
|
|
|
|

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"?

© Stack Overflow or respective owner

Related posts about java

Related posts about spring