-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Named Redis client injection not working when used in separate JAR #15581
Comments
/cc @cescoffier, @gsmet, @machi1990, @manovotn, @mkouba |
Does the JAR contain |
Unfortunately, yes, the JAR contains an empty |
Hmm, not sure why you cannot see it then. |
It seems that the redis client extension only considers classes from the application root (i.e. CC @machi1990 |
If this consists of looking in all archive classes and adding a test, I can take care or it :) |
Thanks for spotting this @mkouba . What archive should have been used instead? I think the same problem can occur for the mongo-extension- Line 119 in 33364c8
/cc @glefloch |
I'd try with BeanArchiveIndexBuildItem. |
Describe the bug
We have an application scoped bean, defined in our common project and being used by other services, that utilizes
RedisClient
:This common project is packaged as JAR and then used as a Maven dependency from other services.
We keep getting this error when starting those other services:
We've defined an alternate Redis connection like this:
and made sure it's being used as expected by a Redis client defined in our service (not the common JAR!) like this:
Should it be possible to have a bean class contained in a dependency JAR and make it use Redis connection defined in the project that uses that JAR?
Expected behavior
Bean defined in a dependency JAR, which uses a Redis client annotated by
@RedisClientName
, properly using Redis connection defined in containing service.The text was updated successfully, but these errors were encountered: