When using JDBC to execute updates in the database, if you use a statement like the following in a J2EE application:
does the commit action actually get executed on the database because I am under the impression that all transactions are managed by the container?
If this is the case, is the commit() method simply ignored?
Joined: Jul 13, 2004
When the transaction setting in the config file (ejb-jar.xml) is "Container", the transactions are indeed managed by the container and as per spec's, commit and rollback statements are not to be used in code.
These are to be used only incase of Bean Managed Transaction, where in the transaction setting in ejb-jar.xml file would be "Bean".