tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars-Fredrik Smedberg <itsme...@gmail.com>
Subject JDBC Transactions vs EJBs and @TransactionAttribute(...) and more...
Date Tue, 14 Oct 2014 22:14:33 GMT
Hi

Using JDBC, creating a connection and setting it to auto commit false to be
able to group more than one statement into a single transaction I
understand.

- Is it possible to compare that to an EJB with a @TransactionAttribute
set? I would like to understand more in detail how the EJB handles
transactions, datasources and connections "under the hood".
(it all comes from a discussion with a DBA)

If I use @Resource to inject a Datasource and use to retrieve a connection
I usually call close on it after I done using it,

- Will close on the connection actually close it or is that done at the
commit of the transaction (assume we are in an EJB with
@TransactionAttribute set)?
- Will the container automatically set auto commit false to any connections
retrieved within the transaction?
- ... and many more questions :)

Maybe I'm mixing the topics a bit but it would be really great to
understand it all more in-depth to be able to have the understanding and
discuss it with the DBA.

Thanks



-- 
Med vänlig hälsning / Best regards

Lars-Fredrik Smedberg

STATEMENT OF CONFIDENTIALITY:
The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
address(es) and may contain confidential or privileged information. If
you are not the intended recipient, please notify Lars-Fredrik Smedberg
immediately at itsmeden@gmail.com, and destroy all copies of this
message and any attachments.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message