[JBoss JIRA] (ISPN-7351) Support @Named in CDI extension
by Seto Kaiba (JIRA)
[ https://issues.jboss.org/browse/ISPN-7351?page=com.atlassian.jira.plugin.... ]
Seto Kaiba commented on ISPN-7351:
----------------------------------
[~sebastian.laskawiec] Did you tried with multiple @Named without other qualifier? The documentation mentions @Named as String-based qualifier. Yet, it isn't normal qualifier. The @Default will be added automatically. But with normal qualifier @Default won't be added automatically. Then this exception will be thrown.
{panel}
org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type Configuration with qualifiers @Default
at injection point [UnbackedAnnotatedParameter] Parameter 1 of [UnbackedAnnotatedMethod] @Produces @ApplicationScoped @DefaultBeanInformation @Synthetic @DefaultBean public org.infinispan.cdi.DefaultEmbeddedCacheManagerProducer.getDefaultEmbeddedCacheManager(Configuration)
at org.infinispan.cdi.DefaultEmbeddedCacheManagerProducer.getDefaultEmbeddedCacheManager(DefaultEmbeddedCacheManagerProducer.java:38)
Possible dependencies:
- Producer Method [Configuration] with qualifiers [@Default @Named @Any] declared as [[BackedAnnotatedMethod] @ConfigureCache @Named @Produces public co.kaiba.blueeyes.impl.data.datastore.infinispan.CacheConfig.keyCacheConfig()],
- Producer Method [Configuration] with qualifiers [@Default @Named @Any] declared as [[BackedAnnotatedMethod] @ConfigureCache @Named @Produces public co.kaiba.blueeyes.impl.data.datastore.infinispan.CacheConfig.idCacheConfig()]
{panel}
> Support @Named in CDI extension
> -------------------------------
>
> Key: ISPN-7351
> URL: https://issues.jboss.org/browse/ISPN-7351
> Project: Infinispan
> Issue Type: Feature Request
> Components: CDI Integration
> Reporter: Sebastian Łaskawiec
> Assignee: Sebastian Łaskawiec
>
> Currently our users have to create lots and lots of {{@Qualifier}} type of annotations. It would be desirable to support {{@Named("driver")}} type of annotations.
> Useful links:
> * {{@Named}} Javadoc: http://docs.oracle.com/javaee/6/api/javax/inject/Named.html
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 2 months
[JBoss JIRA] (ISPN-7390) Fix DuplicatedDomainsCdiIT
by Sebastian Łaskawiec (JIRA)
Sebastian Łaskawiec created ISPN-7390:
-----------------------------------------
Summary: Fix DuplicatedDomainsCdiIT
Key: ISPN-7390
URL: https://issues.jboss.org/browse/ISPN-7390
Project: Infinispan
Issue Type: Bug
Reporter: Sebastian Łaskawiec
Assignee: Sebastian Łaskawiec
Priority: Blocker
http://ci.infinispan.org/viewLog.html?buildId=48419&tab=buildResultsDiv&b...
{noformat}
java.lang.RuntimeException: Could not invoke deployment method: public static org.jboss.shrinkwrap.api.Archive org.infinispan.test.integration.as.cdi.DuplicatedDomainsCdiIT.deployment()
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
at org.jboss.shrinkwrap.resolver.impl.maven.bootstrap.MavenRepositorySystem.resolveDependencies(MavenRepositorySystem.java:121)
at org.jboss.shrinkwrap.resolver.impl.maven.MavenWorkingSessionImpl.resolveDependencies(MavenWorkingSessionImpl.java:228)
at org.jboss.shrinkwrap.resolver.impl.maven.MavenStrategyStageBaseImpl.using(MavenStrategyStageBaseImpl.java:71)
at org.jboss.shrinkwrap.resolver.impl.maven.MavenStrategyStageBaseImpl.withTransitivity(MavenStrategyStageBaseImpl.java:53)
at org.jboss.shrinkwrap.resolver.impl.maven.MavenStrategyStageBaseImpl.withTransitivity(MavenStrategyStageBaseImpl.java:40)
at org.infinispan.test.integration.as.cdi.DuplicatedDomainsCdiIT.deployment(DuplicatedDomainsCdiIT.java:38)
------- Stdout: -------
[TestSuiteProgress] Test succeeded: DSLQueryIT.testDSLQuery
[TestSuiteProgress] Tests succeeded: 19, failed: 0, skipped: 4
[0m08:20:03,505 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 58) WFLYUT0022: Unregistered web context: /dsl
[0m[0m08:20:03,547 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-1) ISPN000080: Disconnecting JGroups channel Infinispan-Query-Cluster
[0m[0m08:20:03,555 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-1) ISPN000082: Stopping the RpcDispatcher for channel Infinispan-Query-Cluster
[0m[0m08:20:03,568 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0028: Stopped deployment dsl.war (runtime-name: dsl.war) in 67ms
[0m[33m08:20:03,584 WARN [org.jboss.as.controller] (management-handler-thread - 3) WFLYCTL0357: Notification of type deployment-undeployed is not described for the resource at the address []
[0m[0m08:20:03,585 INFO [org.jboss.as.repository] (management-handler-thread - 3) WFLYDR0002: Content removed from location /opt/buildAgent/work/4107e96132ab99f9/integrationtests/wildfly-modules/target/node1/wildfly-10.1.0.Final/standalone/data/content/28/05733a8f72bdf74102670f602b7b2616dc74b4/content
[0m[0m08:20:03,585 INFO [org.jboss.as.server] (management-handler-thread - 3) WFLYSRV0009: Undeployed "dsl.war" (runtime-name: "dsl.war")
[0m
------- Stderr: -------
Jan 24, 2017 8:20:04 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed
WARNING: Failed downloading org/infinispan/infinispan-cdi-embedded/9.0.0-SNAPSHOT/maven-metadata.xml from http://repo1.maven.org/maven2/. Reason:
org.eclipse.aether.transfer.MetadataNotFoundException: Could not find metadata org.infinispan:infinispan-cdi-embedded:9.0.0-SNAPSHOT/maven-metadata.xml in central (http://repo1.maven.org/maven2)
Jan 24, 2017 8:20:04 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed
WARNING: Failed downloading org/infinispan/infinispan-cdi-embedded/9.0.0-SNAPSHOT/infinispan-cdi-embedded-9.0.0-SNAPSHOT.pom from http://repo1.maven.org/maven2/. Reason:
org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.infinispan:infinispan-cdi-embedded:pom:9.0.0-SNAPSHOT in central (http://repo1.maven.org/maven2)
Jan 24, 2017 8:20:04 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogRepositoryListener artifactDescriptorMissing
WARNING: Missing artifact descriptor for org.infinispan:infinispan-cdi-embedded:jar:9.0.0-SNAPSHOT
Jan 24, 2017 8:20:04 AM org.jboss.shrinkwrap.resolver.impl.maven.logging.LogTransferListener transferFailed
WARNING: Failed downloading org/infinispan/infinispan-cdi-embedded/9.0.0-SNAPSHOT/infinispan-cdi-embedded-9.0.0-SNAPSHOT.jar from http://repo1.maven.org/maven2/. Reason:
org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.infinispan:infinispan-cdi-embedded:jar:9.0.0-SNAPSHOT in central (http://repo1.maven.org/maven2)
{noformat}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 2 months
[JBoss JIRA] (ISPN-7389) Fix ExampleConfigsIT.testSSLHotRodConfig
by Sebastian Łaskawiec (JIRA)
Sebastian Łaskawiec created ISPN-7389:
-----------------------------------------
Summary: Fix ExampleConfigsIT.testSSLHotRodConfig
Key: ISPN-7389
URL: https://issues.jboss.org/browse/ISPN-7389
Project: Infinispan
Issue Type: Bug
Reporter: Sebastian Łaskawiec
Assignee: Sebastian Łaskawiec
Priority: Blocker
http://ci.infinispan.org/viewLog.html?buildId=48419&tab=buildResultsDiv&b...
{noformat}
java.lang.RuntimeException: Could not retrieve HotRod host
at org.infinispan.arquillian.utils.MBeanUtils.getMBeanAttribute(MBeanUtils.java:59)
at org.infinispan.arquillian.core.HotRodEndpoint.getInetAddress(HotRodEndpoint.java:65)
at org.infinispan.server.test.configs.ExampleConfigsIT.securityConfig(ExampleConfigsIT.java:616)
at org.infinispan.server.test.configs.ExampleConfigsIT.testSSLHotRodConfig(ExampleConfigsIT.java:358)
Caused by: javax.management.InstanceNotFoundException: jboss.datagrid-infinispan:type=Server,name=HotRod,component=Transport
at org.jboss.as.jmx.PluggableMBeanServerImpl.findDelegate(PluggableMBeanServerImpl.java:1110)
at org.jboss.as.jmx.PluggableMBeanServerImpl.getAttribute(PluggableMBeanServerImpl.java:386)
at org.jboss.as.jmx.BlockingNotificationMBeanServer.getAttribute(BlockingNotificationMBeanServer.java:148)
at org.jboss.remotingjmx.protocol.v2.ServerProxy$GetAttributeHandler.handle(ServerProxy.java:689)
at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1$1.run(ServerCommon.java:153)
at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:75)
at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:70)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:149)
at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor.handleEvent(ServerInterceptorFactory.java:70)
at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1.run(ServerCommon.java:149)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
------- Stdout: -------
[TestSuiteProgress] Test succeeded: ExampleConfigsIT.testTopologyConfigSiteAttribute
[TestSuiteProgress] Tests succeeded: 165, failed: 1, skipped: 10
[TestSuiteProgress] Test starting: ExampleConfigsIT.testSSLHotRodConfig
[0m08:11:03,018 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.2.Final
[0m[0m08:11:03,188 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
[0m[0m08:11:03,267 INFO [org.jboss.as] (MSC service thread 1-1) WFLYSRV0049: Infinispan Server 9.0.0-SNAPSHOT (WildFly Core 2.2.0.Final) starting
[0m[0m08:11:04,195 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
[0m[0m08:11:04,219 INFO [org.xnio] (MSC service thread 1-4) XNIO version 3.4.0.Final
[0m[0m08:11:04,225 INFO [org.xnio.nio] (MSC service thread 1-4) XNIO NIO Implementation Version 3.4.0.Final
[0m[0m08:11:04,263 INFO [org.jboss.remoting] (MSC service thread 1-4) JBoss Remoting version 4.0.21.Final
[0m[0m08:11:04,275 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 19) Activating Infinispan subsystem.
[0m[0m08:11:04,319 INFO [org.wildfly.extension.io] (ServerService Thread Pool -- 21) WFLYIO001: Worker 'default' has auto-configured to 4 core threads with 32 task threads based on your 2 available processors
[0m[0m08:11:04,361 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 18) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
[0m[33m08:11:04,374 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 29) WFLYTX0013: Node identifier property is set to the default value. Please make sure it is unique.
[0m[0m08:11:04,376 INFO [org.jboss.as.security] (ServerService Thread Pool -- 27) WFLYSEC0002: Activating Security Subsystem
[0m[0m08:11:04,384 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 25) WFLYNAM0001: Activating Naming Subsystem
[0m[0m08:11:04,391 INFO [org.jboss.as.connector] (MSC service thread 1-2) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.3.4.Final)
[0m[0m08:11:04,417 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) WFLYJCA0018: Started Driver service with driver-name = h2
[0m[0m08:11:04,481 INFO [org.jboss.as.security] (MSC service thread 1-4) WFLYSEC0001: Current PicketBox version=4.9.6.Final
[0m[0m08:11:04,489 INFO [org.jboss.as.naming] (MSC service thread 1-2) WFLYNAM0003: Starting Naming Service
[0m[0m08:11:04,909 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-2) WFLYDS0013: Started FileSystemDeploymentService for directory /opt/buildAgent/work/4107e96132ab99f9/server/integration/testsuite/target/server/node1/standalone/deployments
[0m[0m08:11:04,931 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0027: Starting deployment of "custom-store.jar" (runtime-name: "custom-store.jar")
[0m[0m08:11:05,248 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
[0m[0m08:11:05,595 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-1) ISPN000128: Infinispan version: Infinispan 'Ruppaner' 9.0.0-SNAPSHOT
&#27;[0m&#27;[0m08:11:05,999 INFO [org.infinispan.expiration.impl.ExpirationManagerImpl] (MSC service thread 1-3) ISPN000025: wakeUpInterval is <= 0, not starting expired purge thread
&#27;[0m&#27;[0m08:11:06,000 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-3) DGISPN0001: Started default cache from local container
&#27;[0m&#27;[0m08:11:06,004 INFO [org.infinispan.expiration.impl.ExpirationManagerImpl] (MSC service thread 1-1) ISPN000025: wakeUpInterval is <= 0, not starting expired purge thread
&#27;[0m&#27;[0m08:11:06,004 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-1) DGISPN0001: Started namedCache cache from local container
&#27;[0m&#27;[0m08:11:06,011 INFO [org.infinispan.expiration.impl.ExpirationManagerImpl] (MSC service thread 1-2) ISPN000025: wakeUpInterval is <= 0, not starting expired purge thread
&#27;[0m&#27;[0m08:11:06,011 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-2) DGISPN0001: Started memcachedCache cache from local container
&#27;[0m&#27;[0m08:11:06,174 INFO [org.infinispan.server.endpoint] (MSC service thread 1-3) DGENDPT10000: HotRodServer hotrod2 starting
&#27;[0m&#27;[0m08:11:06,174 INFO [org.infinispan.server.endpoint] (MSC service thread 1-3) DGENDPT10033: Starting server HotRodServer hotrod2 without transport (use multi tenant router instead)
&#27;[0m&#27;[0m08:11:06,174 INFO [org.infinispan.server.endpoint] (MSC service thread 1-3) DGENDPT10001: HotRodServer hotrod2 listening on None
&#27;[0m&#27;[0m08:11:06,201 INFO [org.infinispan.server.endpoint] (MSC service thread 1-2) DGENDPT10000: rest2 starting
&#27;[0m&#27;[0m08:11:06,201 INFO [org.infinispan.server.endpoint] (MSC service thread 1-2) DGENDPT10033: Starting server REST without transport (use multi tenant router instead)
&#27;[0m&#27;[0m08:11:06,205 INFO [org.infinispan.server.endpoint] (MSC service thread 1-1) DGENDPT10000: rest1 starting
&#27;[0m&#27;[0m08:11:06,205 INFO [org.infinispan.server.endpoint] (MSC service thread 1-1) DGENDPT10033: Starting server REST without transport (use multi tenant router instead)
&#27;[0m&#27;[0m08:11:06,205 INFO [org.infinispan.server.endpoint] (MSC service thread 1-1) DGENDPT10002: rest1 mapped to /rest
&#27;[0m&#27;[0m08:11:06,206 INFO [org.infinispan.server.endpoint] (MSC service thread 1-1) DGENDPT10000: HotRodServer hotrod1 starting
&#27;[0m&#27;[0m08:11:06,206 INFO [org.infinispan.server.endpoint] (MSC service thread 1-1) DGENDPT10033: Starting server HotRodServer hotrod1 without transport (use multi tenant router instead)
&#27;[0m&#27;[0m08:11:06,206 INFO [org.infinispan.server.endpoint] (MSC service thread 1-1) DGENDPT10001: HotRodServer hotrod1 listening on None
&#27;[0m&#27;[0m08:11:06,210 INFO [org.infinispan.server.endpoint] (MSC service thread 1-2) DGENDPT10002: rest2 mapped to /rest
&#27;[0m&#27;[0m08:11:06,268 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-4) DGISPN0007: Registering Deployed Cache Store service for store 'org.infinispan.persistence.cluster.MyCustomCacheStore'
&#27;[0m&#27;[31m08:11:06,278 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datagrid-infinispan-endpoint"),
("router-connector" => "router")
]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => [
"jboss.server.controller.management.security_realm.other",
"jboss.server.controller.management.security_realm.other2"
],
"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.datagrid-infinispan-endpoint.router.router is missing [jboss.server.controller.management.security_realm.other, jboss.server.controller.management.security_realm.other2]"]
}
&#27;[0m&#27;[0m08:11:06,303 INFO [org.jboss.as.server] (ServerService Thread Pool -- 17) WFLYSRV0010: Deployed "custom-store.jar" (runtime-name : "custom-store.jar")
&#27;[0m&#27;[0m08:11:06,306 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0184: New missing/unsatisfied dependencies:
service jboss.server.controller.management.security_realm.other (missing) dependents: [service jboss.datagrid-infinispan-endpoint.router.router]
service jboss.server.controller.management.security_realm.other2 (missing) dependents: [service jboss.datagrid-infinispan-endpoint.router.router]
&#27;[0m&#27;[0m08:11:06,380 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
&#27;[0m&#27;[0m08:11:06,380 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
&#27;[0m&#27;[31m08:11:06,380 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: Infinispan Server 9.0.0-SNAPSHOT (WildFly Core 2.2.0.Final) started (with errors) in 3666ms - Started 179 of 191 services (1 services failed or missing dependencies, 54 services are lazy, passive or on-demand)
&#27;[0m&#27;[0m08:11:06,553 INFO [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0236: Suspending server with no timeout.
&#27;[0m&#27;[0m08:11:06,556 INFO [org.jboss.as.server] (Management Triggered Shutdown) WFLYSRV0241: Shutting down in response to management operation 'shutdown'
&#27;[0m&#27;[0m08:11:06,573 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-4) DGISPN0002: Stopped namedCache cache from local container
&#27;[0m&#27;[0m08:11:06,576 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-4) DGISPN0002: Stopped memcachedCache cache from local container
&#27;[0m&#27;[0m08:11:06,577 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) WFLYJCA0010: Unbound data source [java:jboss/datasources/ExampleDS]
&#27;[0m&#27;[0m08:11:06,585 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-4) DGISPN0002: Stopped default cache from local container
&#27;[0m&#27;[0m08:11:06,591 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) WFLYJCA0019: Stopped Driver service with driver-name = h2
&#27;[0m&#27;[0m08:11:06,602 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0028: Stopped deployment custom-store.jar (runtime-name: custom-store.jar) in 37ms
&#27;[0m&#27;[0m08:11:06,614 INFO [org.jboss.as] (MSC service thread 1-4) WFLYSRV0050: Infinispan Server 9.0.0-SNAPSHOT (WildFly Core 2.2.0.Final) stopped in 50ms
&#27;[0m
{noformat}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 2 months
[JBoss JIRA] (ISPN-7351) Support @Named in CDI extension
by Sebastian Łaskawiec (JIRA)
[ https://issues.jboss.org/browse/ISPN-7351?page=com.atlassian.jira.plugin.... ]
Sebastian Łaskawiec commented on ISPN-7351:
-------------------------------------------
[~Seto] I checked the {{@Named}} annotation and the implementation seems to work fine with it (see the [PR|https://github.com/infinispan/infinispan/pull/4793]).
However, let me clarify a couple of things:
* As the [Javadoc states|http://docs.oracle.com/javaee/6/api/javax/inject/Named.html], {{@Named}} is a String-based *qualifier*. This means that it can be used as a replacement for {{@Qualifier}} annotations.
* Since you might want to use {{Configuration}} as a standard, CDI managed bean, we need to use an additional annotation ({{ConfigureCache}}), to tell the CDI extension, that we want to use given {{Configuration}} instance for creating caches dynamically.
Having all of the above in mind, a proper configuration should look like this:
{code}
@Named("large") //A String-based *qualifier*
@ConfigureCache("large") //We ask CDI to use this bean for configuring Cache Manager
@Produces
public Configuration largeConfiguration = new ConfigurationBuilder().memory().size(3).build();
...
@Inject
@Named("large") //Those names need to match
private AdvancedCache<?, ?> largeCache;
{code}
Also, please make sure that you are using the latest Infinispan 9. We introduced a lot of improvements for CDI in this release.
> Support @Named in CDI extension
> -------------------------------
>
> Key: ISPN-7351
> URL: https://issues.jboss.org/browse/ISPN-7351
> Project: Infinispan
> Issue Type: Feature Request
> Components: CDI Integration
> Reporter: Sebastian Łaskawiec
> Assignee: Sebastian Łaskawiec
>
> Currently our users have to create lots and lots of {{@Qualifier}} type of annotations. It would be desirable to support {{@Named("driver")}} type of annotations.
> Useful links:
> * {{@Named}} Javadoc: http://docs.oracle.com/javaee/6/api/javax/inject/Named.html
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 2 months