Skip to content

Why is the CacheKeyGenerator resolved as a CDI bean in cache-annotations-ri-cdi? #73

Description

@cen1
@CachePut(cacheName = "default", cacheKeyGenerator=MyKeyGenerator.class)

How would one know when using cache-annotations-ri-cdi MyKeyGenerator must be a bean instance and not just a plain class? There is no mention of this in the spec javadoc. I assume because spec does not want to narrow it down but ri-cdi specifically looks up the bean instance instead of instantiating the class.

I could not find documentation on this kind of cdi-ri specifics. Maybe I missed some document section that mentions which classes need to be bean instances?

And as a side topic, is it correct assumption that 3rd party implementations are reimplementing cache-ri-impl only? Is there a 3rd party implementation of cache-annotations-ri-cdi or is this module de-facto standard implementation for CDI activation?

Best regards

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions