Hi,
Does anyone ever deploy and
test the CMT stateful session bean example from Sun
J2EE Tutorial(the source code is in the directory of j2eetutorial\examples\src\ejb\bank)?
I've tried it and found the transaction cannot rollback!(By setting the balance of checking account to less than 40).
In the code provided by Sun, it creates a java.sql.Connection in ejbCreate() and stored it as a instance variable. Then use this connection in the transactional business method transferToSaving().
I try to modify to this way then the transaction works well(can rollback): create java.sql.Connection in the business method transferToSaving().
I wonder whether my solution is correct way to write CMT session bean or something wrong with my deployment( I deployed the bean on weblogic server 6.1)
Thank you,
Tom