Skip to main content

2015 | OriginalPaper | Buchkapitel

13. Transactions and Concurrency

verfasst von : Joseph Ottinger, Srinivas Guruzu, Gary Mak

Erschienen in: Hibernate Recipes

Verlag: Apress

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

Let’s say that a buyer logs in to the bookshop application and purchases a book. The following actions should take place in the event of a purchase:

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Fußnoten
1
Pay attention to this term—it shows up a lot.
 
2
This is not to imply that the Apache Commons-DBCP is not well-known, robust, or well-supported; it’s just that to Your Author, c3p0 is well-knownier, robuster, and well-supporteder. In other words, it is purely personal preference, and either library would work, although they’re configured differently.
 
3
We told you that you’d see the term “transaction demarcation” again!
 
4
Then again, you may not feel the need to execute rollback() in a try/catch block. There’s not much you can do if a rollback fails; it is probably one of those cases where you want to see a catastrophic failure so you can find out what went horribly, horribly wrong, as opposed to trying to recover. You see the same philosophy in motion when the openSession() call is not in a try/catch block; if I can’t open a Session, there’s no point in recovery. I want to fix that problem.
 
5
The technical reviewer (correctly) pointed out that JTA is an API, not an implementation, and it doesn’t actually provide transactions—only a way to manage them. If you use JTA in an environment outside of an application server, for example, you have to provide a JTA implementation as well.
 
Metadaten
Titel
Transactions and Concurrency
verfasst von
Joseph Ottinger
Srinivas Guruzu
Gary Mak
Copyright-Jahr
2015
Verlag
Apress
DOI
https://doi.org/10.1007/978-1-4842-0127-5_13