[ all snipped ]
A problem with redefining the lifetime of a PREPARE'd statement
according to if it was defined within an explicitly managed transaction
or not would be with middlewares such as J2EE / EJB containers. The
container / JDBC driver performs most operations within explicitly
managed transactions *by the middleware container*, and, if the
middleware container is configured to cache prepared statements between
transactions, then it will expect them to live well beyond their
initial explicitly-managed transaction.
----
James Robinson
Socialserve.com