Contribute to help us improve!

Are there edge cases or problems that we didn't consider? Is there a technical pitfall that we should add? Did we miss a comma in a sentence?

If you have any input for us, we would love to hear from you and appreciate every contribution. Our goal is to learn from projects for projects such that nobody has to reinvent the wheel.

Let's collect our experiences together to make room to explore the novel!

To contribute click on Contribute to this page on the toolbar.

Transaction

Use declarative transaction handling

  • Spring

  • Quarkus

See the spring reference guide for a detailed explanation of springs transaction management.

  • Use the declarative way with @Transactional wherever possible.

  • Only in reasonable cases manual programmatic transaction handling should be used.

See the transaction guide of quarkus for a detailed explanation.

  • Use the declarative way with @Transactional wherever possible.

  • Only in reasonable cases manual programmatic transaction handling should be used.

Handling constraint violations

Because database constraints are checked by the database when the transaction gets committed, constraint violations will be thrown outside the business code. In case constraint violations have to be handled manually, it should be done in code outside the logic that is annotated with @Transactional. This may be done in a service operation by catching a ConstraintViolationException (org.hibernate.exception.ConstraintViolationException for hibernate).