Title: Use try-with-resources for Transactions · Issue #49 · googleapis/google-cloud-java · GitHub
Open Graph Title: Use try-with-resources for Transactions · Issue #49 · googleapis/google-cloud-java
X Title: Use try-with-resources for Transactions · Issue #49 · googleapis/google-cloud-java
Description: It would be nice to be able to use the resource pattern around a Transaction: try (Transaction tx = datastore.newTransaction()) { // do stuff tx.commit(); } Default behaviour of close() would be to roll back a transaction. This is to avo...
Open Graph Description: It would be nice to be able to use the resource pattern around a Transaction: try (Transaction tx = datastore.newTransaction()) { // do stuff tx.commit(); } Default behaviour of close() would be to...
X Description: It would be nice to be able to use the resource pattern around a Transaction: try (Transaction tx = datastore.newTransaction()) { // do stuff tx.commit(); } Default behaviour of close() would be to...
Opengraph URL: https://github.com/googleapis/google-cloud-java/issues/49
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Use try-with-resources for Transactions","articleBody":"It would be nice to be able to use the resource pattern around a Transaction:\n\n``` java\ntry (Transaction tx = datastore.newTransaction()) {\n // do stuff\n tx.commit();\n}\n```\n\nDefault behaviour of close() would be to roll back a transaction. This is to avoid potential errors caused by the application failing to catch unexpected Throwables causing incomplete work to be auto-committed.\n","author":{"url":"https://github.com/jboynes","@type":"Person","name":"jboynes"},"datePublished":"2015-05-10T17:21:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/49/google-cloud-java/issues/49"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0630cbe9-58f3-a8fa-db9e-67a507fe582a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DD0C:268F8:CFF866:1196E86:6A4D57A0 |
| html-safe-nonce | e088ef83994df8c5ebdec22fc7eb7b32ce71d63e9763b6da383c03d030954512 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDBDOjI2OEY4OkNGRjg2NjoxMTk2RTg2OjZBNEQ1N0EwIiwidmlzaXRvcl9pZCI6IjYxMTQ4MjA1MDU2MjQ0NzI2NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a75fec25441f05a5bbd28e23228e289330f582a76eb753d18aa926d099499212 |
| hovercard-subject-tag | issue:74961582 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-java/49/issue_layout |
| twitter:image | https://opengraph.githubassets.com/99762224c40a11445d29bc4857fc221745cd6e2de9ec87fafffbb12ca3fba0f9/googleapis/google-cloud-java/issues/49 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/99762224c40a11445d29bc4857fc221745cd6e2de9ec87fafffbb12ca3fba0f9/googleapis/google-cloud-java/issues/49 |
| og:image:alt | It would be nice to be able to use the resource pattern around a Transaction: try (Transaction tx = datastore.newTransaction()) { // do stuff tx.commit(); } Default behaviour of close() would be to... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jboynes |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2a1443ff9733a3016431263ea73c93d8fe00c195eb4a7670ac30e7848f045441 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-java git https://github.com/googleapis/google-cloud-java.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 26181278 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 26181278 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f3bdd3157ea1f0fd738d408eceeead721acf1dc3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width