Hi James,
Couple of key points:
1. Typically you would not be creating Connection objects in the Servlet or Web tier classes.
2. Also to make use to Container managed transactions (CMT)
you should never be calling Commit() on the Connection object
3. In CMT, the commit is automatically called by the
EJB container based on the Transaction attribute defined in the deployment descriptor.
4. Yes this code will definitely throw an Exception. The transaction attribute is Mandatory and therefore the method needs to be called in the context of an exiting transaction context initiated by the EJB Container.
Hope this helps,
Deepak