Skip to content

Instantly share code, notes, and snippets.

@maniksurtani
Created September 21, 2011 13:16
Show Gist options
  • Save maniksurtani/1232002 to your computer and use it in GitHub Desktop.
Save maniksurtani/1232002 to your computer and use it in GitHub Desktop.
...
import org.infinispan.cdi.ConfigureCache;
import javax.enterprise.inject.Produces;
class Config {
@ConfigureCache("my-cache-name")
@MyCacheQualifier
@Produces
Configuration myCacheConfiguration() {
return new Configuration()
.fluent()
.eviction()
.strategy(FIFO)
.maxEntries(2048)
.build();
}
}
@Stateless
class FooEJB {
@Inject @MyCacheQualifier
Cache<String, String> myCache;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment