zhfeng commented on code in PR #4449:
URL: https://github.com/apache/camel-quarkus/pull/4449#discussion_r1089582613
##########
docs/modules/ROOT/pages/user-guide/cdi.adoc:
##########
@@ -178,6 +178,41 @@ public class CamelRoute extends RouteBuilder {
}
----
+As an alternative to `@Named`, you may also use
`io.smallrye.common.annotation.Identifier` to name and identify a bean. Note
that the bean is annotated with `@Unremovable`, since `@Identifier` is not a
bean defining annotation and thus Quarkus may potentially remove the bean if it
considers it unused.
+
Review Comment:
I'm just wondering if we can use
`UnremovableBeanBuildItem.beanClassAnnotation(DotName.create(Identifier.class)`
to avoid using `@Unremovable`. see
https://github.com/quarkusio/quarkus/blob/main/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/UnremovableBeanBuildItem.java#L140-L150
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]