quarkusquarkus-panachehexagonal-architecturequarkus-hibernate-reactive

Hexagonal Architecture with Hibernate Reactive and Quarkus


I am using Hexagonal Architecture, Hibernate Reactive with Panache and Quarkus in a Kotlin Project.

Transaction boundaries are set using @ReactiveTransactional annotation.

The problem is that I had to add the whole Hibernate Reactive with Panache dependency in the domain and application layers just to make this annotation available.

Is there a way to avoid this?

I was hoping it would be possible to create a domain annotation and then in the adapters layer replace it with the @ReactiveTransactional somehow.


Solution

  • You could remove the annotation from the class, and wrap it into a service, and implement this service in the adapter layer using the annotation.