-
Notifications
You must be signed in to change notification settings - Fork 304
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
Use name from CacheDefaults when injecting JCache (PAYARA-1106) #1126
Use name from CacheDefaults when injecting JCache (PAYARA-1106) #1126
Conversation
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
jenkins test please |
1 similar comment
jenkins test please |
One or more tests have failed |
jenkins test please |
All tests have passed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the example application we have ScheduleDAO. @CacheDefaults is already being declared at the class level. i.e.
@ApplicationScoped
@CacheDefaults(cacheName = "schedule")
public class ScheduleDAO {
...
}
So this change means that we don't need to keep using the cacheName on individual annotations which is why @CacheDefaults was added to the spec in the first place.
Use name from CacheDefaults when injecting JCache (PAYARA-1106)
Fixes #1124
Disclaimer: I don't really understand CDI lifecycle. I assume the producer method is called for each injection point.
Example usage (depends also on #1125)