We have several Quarkus apps now in development that have duplicate code. We want to move that duplicate code to separate standalone Maven modules as per standard practice for Java modules, components.However some of this shared, duplicate code uses Quarkus features. Specifically it uses CDI @Inject in a few places and @Inject @PersistenceUnit("PU") in one place for the ORM bindings. In addition this shared module will have several @Entities with all the typical JPA, Jackson, Validation annotations.So how will making a shared component work in Quarkus? Some questions/concerns are:1. Will Quarkus find/apply the Quarkus annotations in the compiled Java jar file just as it does now for source code?
2. Is it preferable to not include Quarkus @Inject, @PersistenceUnit in the component? E.g. @Inject can be replaced with normal Java object creation and @PersistenceUnit could be externalized so the EntityManagerFactory that it was injecting is done in the application and then pass the EntityManagerFactory to the component.
Anything else I should be aware of making shared Quarkus components?-Dave
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/674ba54b-7440-4893-a260-7fe93d8c7ee8n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/d2de2760-08b2-4ead-a623-41436e83ae5cn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAO8YPTQpBrkOwLk3ZiTt0sp7n3XTT1TTt57AFNamxUR-DLOXOw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/d2de2760-08b2-4ead-a623-41436e83ae5cn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/b91692d9-faf0-488b-b929-1e90222df2e6n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAJ97idFRL3mSBQmSNrYu%2BeMBkfQMbq7dmOr4ggUXbf_Ud%2BV5tw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAJ97idHCRAccRzxN-X9%2BXNU8chWwwZxgR6G-PHov_04MELw-QA%40mail.gmail.com.