All,
I find myself working through another departments code. I find a session bean which has a method foo() that participates in a transaction. This method then instantiates a
JDBC Data Access Object and calls a method bar(). This method obtains its own connection from the same JNDI DataSource and performs and insert/update and closes its own connection (connection creation and closure occurs within bar, there is no explicit transaction handling code in bar()).
My question, if the larger transaction in foo() gets rolled back for some reason, will the activity in bar() get rolled back also? I have not come across any documentation that indicates either way. I would like to be 100% sure. If you find a resource, please let me know.
I have read through the head first book and it does not mention what happens when and
EJB method calls a non EJB class that does JDBC work. Could someone please clarify this for me?
Best Regards,
Joshua