From mkouba at redhat.com Wed Nov 11 04:29:39 2015 From: mkouba at redhat.com (Martin Kouba) Date: Wed, 11 Nov 2015 10:29:39 +0100 Subject: [weld-dev] New blog post: Weld development mode and JMX support Message-ID: <56430A83.4010306@redhat.com> http://weld.cdi-spec.org/news/2015/11/10/weld-probe-jmx/ -- Martin Kouba Software Engineer Red Hat, Czech Republic From EMIJIANG at uk.ibm.com Mon Nov 16 17:15:49 2015 From: EMIJIANG at uk.ibm.com (Emily Jiang) Date: Mon, 16 Nov 2015 22:15:49 +0000 Subject: [weld-dev] potential weld jira Message-ID: <201511162216.tAGMFwiF025797@d06av12.portsmouth.uk.ibm.com> I'm trying to deploy the attached war but got Weld alidation error. On Glassfish 4.1, I got this error: Error occurred during deployment: Exception while loading the app : CDI deployment failure:WELD-001408: Unsatisfied dependencies for type String with qualifiers @DiffBDACounterQualifier at injection point [BackedAnnotatedField] @Inject @DiffBDACounterQualifier com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer at com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer(CounterProducerConsumerModified.java:0) WELD-001475: The following beans match by type, but none have matching qualifiers: - Producer Method [String] with qualifiers [@CounterUnmodifiedQualifier @Any] declared as [[BackedAnnotatedMethod] @ExcludeClassInterceptors @Produces @CounterUnmodifiedQualifier com.ibm.jcdi.test.beansxml.CounterProducerNoModifiers.getCounterBeanProducer()], - Producer Method [String] with qualifiers [@BatchProperty @Any] declared as [[UnbackedAnnotatedMethod] @Produces @Dependent @BatchProperty public com.ibm.jbatch.container.cdi.BatchProducerBean.p .... msg.seeServerLog The app works fine on OpenWebBeans. Any ideas on what was wrong? Many thanks, Emily =========================== Emily Jiang WebSphere Application Server, CDI Development Lead MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN Phone: +44 (0)1962 816278 Internal: 246278 Email: emijiang at uk.ibm.com Lotus Notes: Emily Jiang/UK/IBM at IBMGB -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20151116/92cbea4f/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: testDiffBDA.war Type: application/octet-stream Size: 33245 bytes Desc: not available Url : http://lists.jboss.org/pipermail/weld-dev/attachments/20151116/92cbea4f/attachment-0001.obj From EMIJIANG at uk.ibm.com Tue Nov 17 17:15:02 2015 From: EMIJIANG at uk.ibm.com (Emily Jiang) Date: Tue, 17 Nov 2015 22:15:02 +0000 Subject: [weld-dev] clean up unused conversations Message-ID: <201511172216.tAHMG5ns031355@d06av03.portsmouth.uk.ibm.com> In OpenWebBeans, there is a configuration org.apache.webbeans.conversation.Conversation.periodicDelay Specifies a delay in milliseconds. Use the conversation periodic delay custom property to search for and delete unused conversations. Is there such configuration in Weld? Many thanks, Emily =========================== Emily Jiang WebSphere Application Server, CDI Development Lead MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN Phone: +44 (0)1962 816278 Internal: 246278 Email: emijiang at uk.ibm.com Lotus Notes: Emily Jiang/UK/IBM at IBMGB Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20151117/8c5691a6/attachment.html From mkouba at redhat.com Wed Nov 18 02:52:26 2015 From: mkouba at redhat.com (Martin Kouba) Date: Wed, 18 Nov 2015 08:52:26 +0100 Subject: [weld-dev] clean up unused conversations In-Reply-To: <201511172216.tAHMG5ns031355@d06av03.portsmouth.uk.ibm.com> References: <201511172216.tAHMG5ns031355@d06av03.portsmouth.uk.ibm.com> Message-ID: <564C2E3A.60908@redhat.com> Hi Emily, in Weld all expired/timed-out conversations are marked as transient and destroyed during every ServletRequestListener.requestDestroyed() notification. So there is no such configuration property. Martin Dne 17.11.2015 v 23:15 Emily Jiang napsal(a): > In OpenWebBeans, there is a configuration > *org.apache.webbeans.conversation.Conversation.periodicDelay* > > Specifies a delay in milliseconds. Use the conversation periodic delay > custom property to search for and delete unused conversations. > > Is there such configuration in Weld? > > Many thanks, > Emily > =========================== > Emily Jiang > WebSphere Application Server, CDI Development Lead > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > Phone: +44 (0)1962 816278 Internal: 246278 > > Email: emijiang at uk.ibm.com > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > Unless stated otherwise above: > IBM United Kingdom Limited - Registered in England and Wales with number > 741598. > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU > > > > _______________________________________________ > weld-dev mailing list > weld-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/weld-dev > -- Martin Kouba Software Engineer Red Hat, Czech Republic From mkouba at redhat.com Wed Nov 18 02:58:24 2015 From: mkouba at redhat.com (Martin Kouba) Date: Wed, 18 Nov 2015 08:58:24 +0100 Subject: [weld-dev] potential weld jira In-Reply-To: <201511162116.tAGLGoZg029081@d06av10.portsmouth.uk.ibm.com> References: <201511162116.tAGLGoZg029081@d06av10.portsmouth.uk.ibm.com> Message-ID: <564C2FA0.5050605@redhat.com> Hi Emily, a brief description would be helpful - it's not a trivial deployment/reproducer. Martin Dne 16.11.2015 v 23:15 Emily Jiang napsal(a): > I'm trying to deploy the attached war but got Weld alidation error. On > Glassfish 4.1, I got this error: > Error occurred during deployment: Exception while loading the app : CDI > deployment failure:WELD-001408: Unsatisfied dependencies for type String > with qualifiers @DiffBDACounterQualifier at injection point > [BackedAnnotatedField] @Inject @DiffBDACounterQualifier > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer > at > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer(CounterProducerConsumerModified.java:0) > WELD-001475: The following beans match by type, but none have matching > qualifiers: - Producer Method [String] with qualifiers > [@CounterUnmodifiedQualifier @Any] declared as [[BackedAnnotatedMethod] > @ExcludeClassInterceptors @Produces @CounterUnmodifiedQualifier > com.ibm.jcdi.test.beansxml.CounterProducerNoModifiers.getCounterBeanProducer()], > - Producer Method [String] with qualifiers [@BatchProperty @Any] > declared as [[UnbackedAnnotatedMethod] @Produces @Dependent > @BatchProperty public com.ibm.jbatch.container.cdi.BatchProducerBean.p > .... msg.seeServerLog > > > > > > The app works fine on OpenWebBeans. Any ideas on what was wrong? > > Many thanks, > Emily > =========================== > Emily Jiang > WebSphere Application Server, CDI Development Lead > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > Phone: +44 (0)1962 816278 Internal: 246278 > > Email: emijiang at uk.ibm.com > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > -- Martin Kouba Software Engineer Red Hat, Czech Republic From EMIJIANG at uk.ibm.com Wed Nov 18 10:14:20 2015 From: EMIJIANG at uk.ibm.com (Emily Jiang) Date: Wed, 18 Nov 2015 15:14:20 +0000 Subject: [weld-dev] potential weld jira In-Reply-To: <564C2FA0.5050605@redhat.com> References: <201511162116.tAGLGoZg029081@d06av10.portsmouth.uk.ibm.com> <564C2FA0.5050605@redhat.com> Message-ID: <201511181514.tAIFEWc5022374@d06av04.portsmouth.uk.ibm.com> Hi Martin, Here's a simplified form of the test case: The application does not start, reporting [ERROR ] CWWKZ0004E: An exception occurred while starting the application testDiffBDA. The exception message was: com.ibm.ws.container.service.state.StateChangeException: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type String with qualifiers @CounterModifiedQualifier at injection point [BackedAnnotatedField] @Inject @CounterModifiedQualifier com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified2.modifiedProducer at com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified2.modifiedProducer(CounterProducerConsumerModified2.java:0) There are five classes in the .war. testDiffBDA.war/WEB-INF/classes/test/diff/web/FrontEndServlet.class @Inject CounterProducerConsumerModified2 bean; This class, CounterProducerConsumerModified2.class is packaged in the first of two WEB-INF/lib jars, at testDiffBDA.war/WEB-INF/lib/beans-xml-modified2.jar.jar/com/ibm/jcdi/test/beans/xml. There is a bean that needs another bean injected into it: @Inject @CounterModifiedQualifier String modifiedProducer; The remaining three classes are all in the second WEB-INF/lib jar, at testDiffBDA.war/WEB-INF/lib/beans-xml-modified.jar.jar/com/ibm/jcdi/test/beansxml/. The classes are CounterModifiedQualifier (the interface) CounterProducerModified (the bean implementing that interface) AlternativeCounterProducerModified (an alternative bean) The AlternativeCounterProducerModified class is declared in testDiffBDA.war/WEB-INF/lib/beans-xml-modified.jar.jar/META-INF/beans.xml, com.ibm.jcdi.test.beansxml.AlternativeCounterProducerModified The test app starts correctly if the stanza is commented out. Many thanks, Emily =========================== Emily Jiang WebSphere Application Server, CDI Development Lead MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN Phone: +44 (0)1962 816278 Internal: 246278 Email: emijiang at uk.ibm.com Lotus Notes: Emily Jiang/UK/IBM at IBMGB From: Martin Kouba To: Emily Jiang/UK/IBM at IBMGB, Weld , Date: 18/11/2015 07:58 Subject: Re: potential weld jira Hi Emily, a brief description would be helpful - it's not a trivial deployment/reproducer. Martin Dne 16.11.2015 v 23:15 Emily Jiang napsal(a): > I'm trying to deploy the attached war but got Weld alidation error. On > Glassfish 4.1, I got this error: > Error occurred during deployment: Exception while loading the app : CDI > deployment failure:WELD-001408: Unsatisfied dependencies for type String > with qualifiers @DiffBDACounterQualifier at injection point > [BackedAnnotatedField] @Inject @DiffBDACounterQualifier > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer > at > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer(CounterProducerConsumerModified.java:0) > WELD-001475: The following beans match by type, but none have matching > qualifiers: - Producer Method [String] with qualifiers > [@CounterUnmodifiedQualifier @Any] declared as [[BackedAnnotatedMethod] > @ExcludeClassInterceptors @Produces @CounterUnmodifiedQualifier > com.ibm.jcdi.test.beansxml.CounterProducerNoModifiers.getCounterBeanProducer()], > - Producer Method [String] with qualifiers [@BatchProperty @Any] > declared as [[UnbackedAnnotatedMethod] @Produces @Dependent > @BatchProperty public com.ibm.jbatch.container.cdi.BatchProducerBean.p > .... msg.seeServerLog > > > > > > The app works fine on OpenWebBeans. Any ideas on what was wrong? > > Many thanks, > Emily > =========================== > Emily Jiang > WebSphere Application Server, CDI Development Lead > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > Phone: +44 (0)1962 816278 Internal: 246278 > > Email: emijiang at uk.ibm.com > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > -- Martin Kouba Software Engineer Red Hat, Czech Republic -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20151118/90094f8f/attachment-0001.html From mkouba at redhat.com Wed Nov 18 10:51:50 2015 From: mkouba at redhat.com (Martin Kouba) Date: Wed, 18 Nov 2015 16:51:50 +0100 Subject: [weld-dev] potential weld jira In-Reply-To: <201511181515.tAIFFIQv016369@d06av02.portsmouth.uk.ibm.com> References: <201511162116.tAGLGoZg029081@d06av10.portsmouth.uk.ibm.com> <564C2FA0.5050605@redhat.com> <201511181515.tAIFFIQv016369@d06av02.portsmouth.uk.ibm.com> Message-ID: <564C9E96.1090408@redhat.com> Well, it seems the problem is that CounterProducerModified is specialized by AlternativeCounterProducerModified and so it's not enabled and therefore it's producer method is also disabled (see also 5.1.2. Enabled and disabled beans [1]), i.e. it's not available for injection in beans-xml-modified2.jar. And AlternativeCounterProducerModified is an alternative which is not selected for beans-xml-modified2.jar. It should work if you enable AlternativeCounterProducerModified globally or select AlternativeCounterProducerModified for beans-xml-modified2.jar. Martin [1] http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#enablement Dne 18.11.2015 v 16:14 Emily Jiang napsal(a): > Hi Martin, > > Here's a simplified form of the test case: > > > The application does not start, reporting > > [ERROR ] CWWKZ0004E: An exception occurred while starting the > application testDiffBDA. The exception message was: > com.ibm.ws.container.service.state.StateChangeException: > org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied > dependencies for type String with qualifiers @CounterModifiedQualifier > at injection point [BackedAnnotatedField] @Inject > @CounterModifiedQualifier > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified2.modifiedProducer > at > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified2.modifiedProducer(CounterProducerConsumerModified2.java:0) > > There are five classes in the .war. > > testDiffBDA.war/WEB-INF/classes/test/diff/web/FrontEndServlet.class > > @Inject CounterProducerConsumerModified2 bean; > > This class, CounterProducerConsumerModified2.class is packaged in the > first of two WEB-INF/lib jars, at > testDiffBDA.war/WEB-INF/lib/beans-xml-modified2.jar.jar/com/ibm/jcdi/test/beans/xml. > There is a bean that needs another bean injected into it: > > @Inject at CounterModifiedQualifierString modifiedProducer; > > The remaining three classes are all in the second WEB-INF/lib jar, at > testDiffBDA.war/WEB-INF/lib/beans-xml-modified.jar.jar/com/ibm/jcdi/test/beansxml/. > The classes are > > CounterModifiedQualifier (the interface) > CounterProducerModified (the bean implementing that interface) > AlternativeCounterProducerModified (an alternative bean) > > The AlternativeCounterProducerModified class is declared in > testDiffBDA.war/WEB-INF/lib/beans-xml-modified.jar.jar/META-INF/beans.xml, > > > com.ibm.jcdi.test.beansxml.AlternativeCounterProducerModified > > > The test app starts correctly if the stanza is commented out. > > > Many thanks, > Emily > =========================== > Emily Jiang > WebSphere Application Server, CDI Development Lead > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > Phone: +44 (0)1962 816278 Internal: 246278 > > Email: emijiang at uk.ibm.com > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > From: Martin Kouba > To: Emily Jiang/UK/IBM at IBMGB, Weld , > Date: 18/11/2015 07:58 > Subject: Re: potential weld jira > ------------------------------------------------------------------------ > > > > Hi Emily, > > a brief description would be helpful - it's not a trivial > deployment/reproducer. > > Martin > > Dne 16.11.2015 v 23:15 Emily Jiang napsal(a): > > I'm trying to deploy the attached war but got Weld alidation error. On > > Glassfish 4.1, I got this error: > > Error occurred during deployment: Exception while loading the app : CDI > > deployment failure:WELD-001408: Unsatisfied dependencies for type String > > with qualifiers @DiffBDACounterQualifier at injection point > > [BackedAnnotatedField] @Inject @DiffBDACounterQualifier > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer > > at > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer(CounterProducerConsumerModified.java:0) > > WELD-001475: The following beans match by type, but none have matching > > qualifiers: - Producer Method [String] with qualifiers > > [@CounterUnmodifiedQualifier @Any] declared as [[BackedAnnotatedMethod] > > @ExcludeClassInterceptors @Produces @CounterUnmodifiedQualifier > > > com.ibm.jcdi.test.beansxml.CounterProducerNoModifiers.getCounterBeanProducer()], > > - Producer Method [String] with qualifiers [@BatchProperty @Any] > > declared as [[UnbackedAnnotatedMethod] @Produces @Dependent > > @BatchProperty public com.ibm.jbatch.container.cdi.BatchProducerBean.p > > .... msg.seeServerLog > > > > > > > > > > > > The app works fine on OpenWebBeans. Any ideas on what was wrong? > > > > Many thanks, > > Emily > > =========================== > > Emily Jiang > > WebSphere Application Server, CDI Development Lead > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > Email: emijiang at uk.ibm.com > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > -- > Martin Kouba > Software Engineer > Red Hat, Czech Republic > > > -- Martin Kouba Software Engineer Red Hat, Czech Republic From EMIJIANG at uk.ibm.com Wed Nov 18 12:14:05 2015 From: EMIJIANG at uk.ibm.com (Emily Jiang) Date: Wed, 18 Nov 2015 17:14:05 +0000 Subject: [weld-dev] potential weld jira In-Reply-To: <564C9E96.1090408@redhat.com> References: <201511162116.tAGLGoZg029081@d06av10.portsmouth.uk.ibm.com> <564C2FA0.5050605@redhat.com> <201511181515.tAIFFIQv016369@d06av02.portsmouth.uk.ibm.com> <564C9E96.1090408@redhat.com> Message-ID: <201511181615.tAIGF7tI010812@d06av10.portsmouth.uk.ibm.com> Thank you Martin! I interpreted this enablement differently. The CDI 1.2 spec states: A bean is said to be enabled if: it is deployed in a bean archive, and it is not a producer method or field of a disabled bean, and it is not specialized by any other enabled bean, as defined in Specialization, and either it is not an alternative, or it is a selected alternative of at least one bean archive or the application. Otherwise, the bean is said to be disabled. In the above app, there are two jars. The jar beans-xml-modified2.jar.jar does not enable the alternative and in its injection, it should only see the CounterProducerModified. While in another jar, the alternative AlternativeCounterProducerModified completely disabled the CounterProducerModified. Any injection in that jar should only see the specialized bean. >From what you explained, the beans.xml in one jar enabled the alternative bean and affect other jars. From my understanding, the enablement of alternatives/interceptors are specific for that archive and should not affect other jars. Also OpenWebBeans behaves differently from Weld, and OpenWebBeans does what I have expected (enablement are per jar only). Many thanks, Emily =========================== Emily Jiang WebSphere Application Server, CDI Development Lead MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN Phone: +44 (0)1962 816278 Internal: 246278 Email: emijiang at uk.ibm.com Lotus Notes: Emily Jiang/UK/IBM at IBMGB From: Martin Kouba To: Emily Jiang/UK/IBM at IBMGB, Cc: Weld Date: 18/11/2015 15:52 Subject: Re: potential weld jira Well, it seems the problem is that CounterProducerModified is specialized by AlternativeCounterProducerModified and so it's not enabled and therefore it's producer method is also disabled (see also 5.1.2. Enabled and disabled beans [1]), i.e. it's not available for injection in beans-xml-modified2.jar. And AlternativeCounterProducerModified is an alternative which is not selected for beans-xml-modified2.jar. It should work if you enable AlternativeCounterProducerModified globally or select AlternativeCounterProducerModified for beans-xml-modified2.jar. Martin [1] http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#enablement Dne 18.11.2015 v 16:14 Emily Jiang napsal(a): > Hi Martin, > > Here's a simplified form of the test case: > > > The application does not start, reporting > > [ERROR ] CWWKZ0004E: An exception occurred while starting the > application testDiffBDA. The exception message was: > com.ibm.ws.container.service.state.StateChangeException: > org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied > dependencies for type String with qualifiers @CounterModifiedQualifier > at injection point [BackedAnnotatedField] @Inject > @CounterModifiedQualifier > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified2.modifiedProducer > at > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified2.modifiedProducer(CounterProducerConsumerModified2.java:0) > > There are five classes in the .war. > > testDiffBDA.war/WEB-INF/classes/test/diff/web/FrontEndServlet.class > > @Inject CounterProducerConsumerModified2 bean; > > This class, CounterProducerConsumerModified2.class is packaged in the > first of two WEB-INF/lib jars, at > testDiffBDA.war/WEB-INF/lib/beans-xml-modified2.jar.jar/com/ibm/jcdi/test/beans/xml. > There is a bean that needs another bean injected into it: > > @Inject at CounterModifiedQualifierString modifiedProducer; > > The remaining three classes are all in the second WEB-INF/lib jar, at > testDiffBDA.war/WEB-INF/lib/beans-xml-modified.jar.jar/com/ibm/jcdi/test/beansxml/. > The classes are > > CounterModifiedQualifier (the interface) > CounterProducerModified (the bean implementing that interface) > AlternativeCounterProducerModified (an alternative bean) > > The AlternativeCounterProducerModified class is declared in > testDiffBDA.war/WEB-INF/lib/beans-xml-modified.jar.jar/META-INF/beans.xml, > > > com.ibm.jcdi.test.beansxml.AlternativeCounterProducerModified > > > The test app starts correctly if the stanza is commented out. > > > Many thanks, > Emily > =========================== > Emily Jiang > WebSphere Application Server, CDI Development Lead > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > Phone: +44 (0)1962 816278 Internal: 246278 > > Email: emijiang at uk.ibm.com > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > From: Martin Kouba > To: Emily Jiang/UK/IBM at IBMGB, Weld , > Date: 18/11/2015 07:58 > Subject: Re: potential weld jira > ------------------------------------------------------------------------ > > > > Hi Emily, > > a brief description would be helpful - it's not a trivial > deployment/reproducer. > > Martin > > Dne 16.11.2015 v 23:15 Emily Jiang napsal(a): > > I'm trying to deploy the attached war but got Weld alidation error. On > > Glassfish 4.1, I got this error: > > Error occurred during deployment: Exception while loading the app : CDI > > deployment failure:WELD-001408: Unsatisfied dependencies for type String > > with qualifiers @DiffBDACounterQualifier at injection point > > [BackedAnnotatedField] @Inject @DiffBDACounterQualifier > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer > > at > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer(CounterProducerConsumerModified.java:0) > > WELD-001475: The following beans match by type, but none have matching > > qualifiers: - Producer Method [String] with qualifiers > > [@CounterUnmodifiedQualifier @Any] declared as [[BackedAnnotatedMethod] > > @ExcludeClassInterceptors @Produces @CounterUnmodifiedQualifier > > > com.ibm.jcdi.test.beansxml.CounterProducerNoModifiers.getCounterBeanProducer()], > > - Producer Method [String] with qualifiers [@BatchProperty @Any] > > declared as [[UnbackedAnnotatedMethod] @Produces @Dependent > > @BatchProperty public com.ibm.jbatch.container.cdi.BatchProducerBean.p > > .... msg.seeServerLog > > > > > > > > > > > > The app works fine on OpenWebBeans. Any ideas on what was wrong? > > > > Many thanks, > > Emily > > =========================== > > Emily Jiang > > WebSphere Application Server, CDI Development Lead > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > Email: emijiang at uk.ibm.com > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > -- > Martin Kouba > Software Engineer > Red Hat, Czech Republic > > > -- Martin Kouba Software Engineer Red Hat, Czech Republic -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20151118/472094d7/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: testDiffBDA.war Type: application/octet-stream Size: 7618 bytes Desc: not available Url : http://lists.jboss.org/pipermail/weld-dev/attachments/20151118/472094d7/attachment-0001.obj From mkouba at redhat.com Thu Nov 19 02:45:45 2015 From: mkouba at redhat.com (Martin Kouba) Date: Thu, 19 Nov 2015 08:45:45 +0100 Subject: [weld-dev] potential weld jira In-Reply-To: <201511181714.tAIHEEjb032242@d06av05.portsmouth.uk.ibm.com> References: <201511162116.tAGLGoZg029081@d06av10.portsmouth.uk.ibm.com> <564C2FA0.5050605@redhat.com> <201511181515.tAIFFIQv016369@d06av02.portsmouth.uk.ibm.com> <564C9E96.1090408@redhat.com> <201511181714.tAIHEEjb032242@d06av05.portsmouth.uk.ibm.com> Message-ID: <564D7E29.8090802@redhat.com> The enablement is per bean archive but specialization is not, see also 4.3. Specialization: "When an enabled bean, as defined in Enabled and disabled beans, specializes a second bean, we can be certain that the second bean is never instantiated or called by the container. Even if the second bean defines a producer or observer method, the method will never be called." In other words, AlternativeCounterProducerModified (which is enabled in beans-xml-modified.jar) specializes CounterProducerModified. And so CounterProducerModified is not enabled for beans-xml-modified2.jar because it is specialized by any other enabled bean. Feel free to post a question to the cdi-dev ML. Martin Dne 18.11.2015 v 18:14 Emily Jiang napsal(a): > Thank you Martin! > > I interpreted this enablement differently. > > The CDI 1.2 spec states: > > A bean is said to be /enabled/ if: > > * it is deployed in a bean archive, and > * it is not a producer method or field of a disabled bean, and > * it is not specialized by any other enabled bean, as defined in > _Specialization_ > , > and either > * it is not an alternative, or it is a selected alternative of at > least one bean archive or the application. > > Otherwise, the bean is said to be disabled. > > In the above app, there are two jars. The jar > beans-xml-modified2.jar.jar does not enable the alternative and in its > injection, it should only see the CounterProducerModified. While in > another jar, the alternative AlternativeCounterProducerModified > completely disabled the CounterProducerModified. Any injection in that > jar should only see the specialized bean. > > From what you explained, the beans.xml in one jar enabled the > alternative bean and affect other jars. From my understanding, the > enablement of alternatives/interceptors are specific for that archive > and should not affect other jars. > > Also OpenWebBeans behaves differently from Weld, and OpenWebBeans does > what I have expected (enablement are per jar only). > > Many thanks, > Emily > =========================== > Emily Jiang > WebSphere Application Server, CDI Development Lead > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > Phone: +44 (0)1962 816278 Internal: 246278 > > Email: emijiang at uk.ibm.com > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > From: Martin Kouba > To: Emily Jiang/UK/IBM at IBMGB, > Cc: Weld > Date: 18/11/2015 15:52 > Subject: Re: potential weld jira > > ------------------------------------------------------------------------ > > > > Well, it seems the problem is that CounterProducerModified is > specialized by AlternativeCounterProducerModified and so it's not > enabled and therefore it's producer method is also disabled (see also > 5.1.2. Enabled and disabled beans [1]), i.e. it's not available for > injection in beans-xml-modified2.jar. And > AlternativeCounterProducerModified is an alternative which is not > selected for beans-xml-modified2.jar. > > It should work if you enable AlternativeCounterProducerModified globally > or select AlternativeCounterProducerModified for beans-xml-modified2.jar. > > Martin > > [1] > http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#enablement > > Dne 18.11.2015 v 16:14 Emily Jiang napsal(a): > > Hi Martin, > > > > Here's a simplified form of the test case: > > > > > > The application does not start, reporting > > > > [ERROR ] CWWKZ0004E: An exception occurred while starting the > > application testDiffBDA. The exception message was: > > com.ibm.ws.container.service.state.StateChangeException: > > org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied > > dependencies for type String with qualifiers @CounterModifiedQualifier > > at injection point [BackedAnnotatedField] @Inject > > @CounterModifiedQualifier > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified2.modifiedProducer > > at > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified2.modifiedProducer(CounterProducerConsumerModified2.java:0) > > > > There are five classes in the .war. > > > > testDiffBDA.war/WEB-INF/classes/test/diff/web/FrontEndServlet.class > > > > @Inject CounterProducerConsumerModified2 bean; > > > > This class, CounterProducerConsumerModified2.class is packaged in the > > first of two WEB-INF/lib jars, at > > > testDiffBDA.war/WEB-INF/lib/beans-xml-modified2.jar.jar/com/ibm/jcdi/test/beans/xml. > > There is a bean that needs another bean injected into it: > > > > @Inject at CounterModifiedQualifierString modifiedProducer; > > > > The remaining three classes are all in the second WEB-INF/lib jar, at > > > testDiffBDA.war/WEB-INF/lib/beans-xml-modified.jar.jar/com/ibm/jcdi/test/beansxml/. > > The classes are > > > > CounterModifiedQualifier (the interface) > > CounterProducerModified (the bean implementing that interface) > > AlternativeCounterProducerModified (an alternative bean) > > > > The AlternativeCounterProducerModified class is declared in > > > testDiffBDA.war/WEB-INF/lib/beans-xml-modified.jar.jar/META-INF/beans.xml, > > > > > > > com.ibm.jcdi.test.beansxml.AlternativeCounterProducerModified > > > > > > The test app starts correctly if the stanza is > commented out. > > > > > > Many thanks, > > Emily > > =========================== > > Emily Jiang > > WebSphere Application Server, CDI Development Lead > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > Email: emijiang at uk.ibm.com > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > > > > > > From: Martin Kouba > > To: Emily Jiang/UK/IBM at IBMGB, Weld , > > Date: 18/11/2015 07:58 > > Subject: Re: potential weld jira > > ------------------------------------------------------------------------ > > > > > > > > Hi Emily, > > > > a brief description would be helpful - it's not a trivial > > deployment/reproducer. > > > > Martin > > > > Dne 16.11.2015 v 23:15 Emily Jiang napsal(a): > > > I'm trying to deploy the attached war but got Weld alidation error. On > > > Glassfish 4.1, I got this error: > > > Error occurred during deployment: Exception while loading the app > : CDI > > > deployment failure:WELD-001408: Unsatisfied dependencies for type > String > > > with qualifiers @DiffBDACounterQualifier at injection point > > > [BackedAnnotatedField] @Inject @DiffBDACounterQualifier > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer > > > at > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer(CounterProducerConsumerModified.java:0) > > > WELD-001475: The following beans match by type, but none have matching > > > qualifiers: - Producer Method [String] with qualifiers > > > [@CounterUnmodifiedQualifier @Any] declared as > [[BackedAnnotatedMethod] > > > @ExcludeClassInterceptors @Produces @CounterUnmodifiedQualifier > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerNoModifiers.getCounterBeanProducer()], > > > - Producer Method [String] with qualifiers [@BatchProperty @Any] > > > declared as [[UnbackedAnnotatedMethod] @Produces @Dependent > > > @BatchProperty public com.ibm.jbatch.container.cdi.BatchProducerBean.p > > > .... msg.seeServerLog > > > > > > > > > > > > > > > > > > The app works fine on OpenWebBeans. Any ideas on what was wrong? > > > > > > Many thanks, > > > Emily > > > =========================== > > > Emily Jiang > > > WebSphere Application Server, CDI Development Lead > > > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > > > Email: emijiang at uk.ibm.com > > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > > > -- > > Martin Kouba > > Software Engineer > > Red Hat, Czech Republic > > > > > > > > -- > Martin Kouba > Software Engineer > Red Hat, Czech Republic > > > -- Martin Kouba Software Engineer Red Hat, Czech Republic From EMIJIANG at uk.ibm.com Thu Nov 19 04:07:10 2015 From: EMIJIANG at uk.ibm.com (Emily Jiang) Date: Thu, 19 Nov 2015 09:07:10 +0000 Subject: [weld-dev] potential weld jira In-Reply-To: <564D7E29.8090802@redhat.com> References: <201511162116.tAGLGoZg029081@d06av10.portsmouth.uk.ibm.com><564C2FA0.5050605@redhat.com><201511181515.tAIFFIQv016369@d06av02.portsmouth.uk.ibm.com><564C9E96.1090408@redhat.com><201511181714.tAIHEEjb032242@d06av05.portsmouth.uk.ibm.com> <564D7E29.8090802@redhat.com> Message-ID: <201511190907.tAJ97EBY026189@d06av08.portsmouth.uk.ibm.com> Hi Martin, The issue is that the specialized bean is not enabled for beans-xml-modified2.jar. @Alternative @Specialized annotated beans should not be active if it is not enabled. I think the specialized should not be active if the alternative is not. Otherwise, we run into the situation where the specialized bean disabled a second bean but itself is not active. ok. I'll post the question on cdi-dev. Many thanks, Emily =========================== Emily Jiang WebSphere Application Server, CDI Development Lead MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN Phone: +44 (0)1962 816278 Internal: 246278 Email: emijiang at uk.ibm.com Lotus Notes: Emily Jiang/UK/IBM at IBMGB From: Martin Kouba To: Emily Jiang/UK/IBM at IBMGB, Cc: Weld Date: 19/11/2015 07:46 Subject: Re: [weld-dev] potential weld jira Sent by: weld-dev-bounces at lists.jboss.org The enablement is per bean archive but specialization is not, see also 4.3. Specialization: "When an enabled bean, as defined in Enabled and disabled beans, specializes a second bean, we can be certain that the second bean is never instantiated or called by the container. Even if the second bean defines a producer or observer method, the method will never be called." In other words, AlternativeCounterProducerModified (which is enabled in beans-xml-modified.jar) specializes CounterProducerModified. And so CounterProducerModified is not enabled for beans-xml-modified2.jar because it is specialized by any other enabled bean. Feel free to post a question to the cdi-dev ML. Martin Dne 18.11.2015 v 18:14 Emily Jiang napsal(a): > Thank you Martin! > > I interpreted this enablement differently. > > The CDI 1.2 spec states: > > A bean is said to be /enabled/ if: > > * it is deployed in a bean archive, and > * it is not a producer method or field of a disabled bean, and > * it is not specialized by any other enabled bean, as defined in > _Specialization_ > , > and either > * it is not an alternative, or it is a selected alternative of at > least one bean archive or the application. > > Otherwise, the bean is said to be disabled. > > In the above app, there are two jars. The jar > beans-xml-modified2.jar.jar does not enable the alternative and in its > injection, it should only see the CounterProducerModified. While in > another jar, the alternative AlternativeCounterProducerModified > completely disabled the CounterProducerModified. Any injection in that > jar should only see the specialized bean. > > From what you explained, the beans.xml in one jar enabled the > alternative bean and affect other jars. From my understanding, the > enablement of alternatives/interceptors are specific for that archive > and should not affect other jars. > > Also OpenWebBeans behaves differently from Weld, and OpenWebBeans does > what I have expected (enablement are per jar only). > > Many thanks, > Emily > =========================== > Emily Jiang > WebSphere Application Server, CDI Development Lead > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > Phone: +44 (0)1962 816278 Internal: 246278 > > Email: emijiang at uk.ibm.com > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > From: Martin Kouba > To: Emily Jiang/UK/IBM at IBMGB, > Cc: Weld > Date: 18/11/2015 15:52 > Subject: Re: potential weld jira > > ------------------------------------------------------------------------ > > > > Well, it seems the problem is that CounterProducerModified is > specialized by AlternativeCounterProducerModified and so it's not > enabled and therefore it's producer method is also disabled (see also > 5.1.2. Enabled and disabled beans [1]), i.e. it's not available for > injection in beans-xml-modified2.jar. And > AlternativeCounterProducerModified is an alternative which is not > selected for beans-xml-modified2.jar. > > It should work if you enable AlternativeCounterProducerModified globally > or select AlternativeCounterProducerModified for beans-xml-modified2.jar. > > Martin > > [1] > http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#enablement > > Dne 18.11.2015 v 16:14 Emily Jiang napsal(a): > > Hi Martin, > > > > Here's a simplified form of the test case: > > > > > > The application does not start, reporting > > > > [ERROR ] CWWKZ0004E: An exception occurred while starting the > > application testDiffBDA. The exception message was: > > com.ibm.ws.container.service.state.StateChangeException: > > org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied > > dependencies for type String with qualifiers @CounterModifiedQualifier > > at injection point [BackedAnnotatedField] @Inject > > @CounterModifiedQualifier > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified2.modifiedProducer > > at > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified2.modifiedProducer(CounterProducerConsumerModified2.java:0) > > > > There are five classes in the .war. > > > > testDiffBDA.war/WEB-INF/classes/test/diff/web/FrontEndServlet.class > > > > @Inject CounterProducerConsumerModified2 bean; > > > > This class, CounterProducerConsumerModified2.class is packaged in the > > first of two WEB-INF/lib jars, at > > > testDiffBDA.war/WEB-INF/lib/beans-xml-modified2.jar.jar/com/ibm/jcdi/test/beans/xml. > > There is a bean that needs another bean injected into it: > > > > @Inject at CounterModifiedQualifierString modifiedProducer; > > > > The remaining three classes are all in the second WEB-INF/lib jar, at > > > testDiffBDA.war/WEB-INF/lib/beans-xml-modified.jar.jar/com/ibm/jcdi/test/beansxml/. > > The classes are > > > > CounterModifiedQualifier (the interface) > > CounterProducerModified (the bean implementing that interface) > > AlternativeCounterProducerModified (an alternative bean) > > > > The AlternativeCounterProducerModified class is declared in > > > testDiffBDA.war/WEB-INF/lib/beans-xml-modified.jar.jar/META-INF/beans.xml, > > > > > > > com.ibm.jcdi.test.beansxml.AlternativeCounterProducerModified > > > > > > The test app starts correctly if the stanza is > commented out. > > > > > > Many thanks, > > Emily > > =========================== > > Emily Jiang > > WebSphere Application Server, CDI Development Lead > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > Email: emijiang at uk.ibm.com > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > > > > > > From: Martin Kouba > > To: Emily Jiang/UK/IBM at IBMGB, Weld , > > Date: 18/11/2015 07:58 > > Subject: Re: potential weld jira > > ------------------------------------------------------------------------ > > > > > > > > Hi Emily, > > > > a brief description would be helpful - it's not a trivial > > deployment/reproducer. > > > > Martin > > > > Dne 16.11.2015 v 23:15 Emily Jiang napsal(a): > > > I'm trying to deploy the attached war but got Weld alidation error. On > > > Glassfish 4.1, I got this error: > > > Error occurred during deployment: Exception while loading the app > : CDI > > > deployment failure:WELD-001408: Unsatisfied dependencies for type > String > > > with qualifiers @DiffBDACounterQualifier at injection point > > > [BackedAnnotatedField] @Inject @DiffBDACounterQualifier > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer > > > at > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer(CounterProducerConsumerModified.java:0) > > > WELD-001475: The following beans match by type, but none have matching > > > qualifiers: - Producer Method [String] with qualifiers > > > [@CounterUnmodifiedQualifier @Any] declared as > [[BackedAnnotatedMethod] > > > @ExcludeClassInterceptors @Produces @CounterUnmodifiedQualifier > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerNoModifiers.getCounterBeanProducer()], > > > - Producer Method [String] with qualifiers [@BatchProperty @Any] > > > declared as [[UnbackedAnnotatedMethod] @Produces @Dependent > > > @BatchProperty public com.ibm.jbatch.container.cdi.BatchProducerBean.p > > > .... msg.seeServerLog > > > > > > > > > > > > > > > > > > The app works fine on OpenWebBeans. Any ideas on what was wrong? > > > > > > Many thanks, > > > Emily > > > =========================== > > > Emily Jiang > > > WebSphere Application Server, CDI Development Lead > > > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > > > Email: emijiang at uk.ibm.com > > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > > > -- > > Martin Kouba > > Software Engineer > > Red Hat, Czech Republic > > > > > > > > -- > Martin Kouba > Software Engineer > Red Hat, Czech Republic > > > -- Martin Kouba Software Engineer Red Hat, Czech Republic _______________________________________________ weld-dev mailing list weld-dev at lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-dev Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20151119/7b7c6425/attachment-0001.html From mkouba at redhat.com Thu Nov 19 04:11:00 2015 From: mkouba at redhat.com (Martin Kouba) Date: Thu, 19 Nov 2015 10:11:00 +0100 Subject: [weld-dev] potential weld jira In-Reply-To: <201511190907.tAJ97ENZ011343@d06av12.portsmouth.uk.ibm.com> References: <201511162116.tAGLGoZg029081@d06av10.portsmouth.uk.ibm.com> <564C2FA0.5050605@redhat.com> <201511181515.tAIFFIQv016369@d06av02.portsmouth.uk.ibm.com> <564C9E96.1090408@redhat.com> <201511181714.tAIHEEjb032242@d06av05.portsmouth.uk.ibm.com> <564D7E29.8090802@redhat.com> <201511190907.tAJ97ENZ011343@d06av12.portsmouth.uk.ibm.com> Message-ID: <564D9224.5030108@redhat.com> Dne 19.11.2015 v 10:07 Emily Jiang napsal(a): > Hi Martin, > > The issue is that the specialized bean is not enabled for > beans-xml-modified2.jar. Yep, but the spec does not state this should be taken into account. > @Alternative @Specialized annotated beans should not be active if it is > not enabled. I think the specialized should not be active if the > alternative is not. Otherwise, we run into the situation where the > specialized bean disabled a second bean but itself is not active. > > ok. I'll post the question on cdi-dev. > > Many thanks, > Emily > =========================== > Emily Jiang > WebSphere Application Server, CDI Development Lead > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > Phone: +44 (0)1962 816278 Internal: 246278 > > Email: emijiang at uk.ibm.com > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > From: Martin Kouba > To: Emily Jiang/UK/IBM at IBMGB, > Cc: Weld > Date: 19/11/2015 07:46 > Subject: Re: [weld-dev] potential weld jira > Sent by: weld-dev-bounces at lists.jboss.org > ------------------------------------------------------------------------ > > > > The enablement is per bean archive but specialization is not, see also > 4.3. Specialization: > > "When an enabled bean, as defined in Enabled and disabled beans, > specializes a second bean, we can be certain that the second bean is > never instantiated or called by the container. Even if the second bean > defines a producer or observer method, the method will never be called." > > In other words, AlternativeCounterProducerModified (which is enabled in > beans-xml-modified.jar) specializes CounterProducerModified. And so > CounterProducerModified is not enabled for beans-xml-modified2.jar > because it is specialized by any other enabled bean. > > Feel free to post a question to the cdi-dev ML. > > Martin > > Dne 18.11.2015 v 18:14 Emily Jiang napsal(a): > > Thank you Martin! > > > > I interpreted this enablement differently. > > > > The CDI 1.2 spec states: > > > > A bean is said to be /enabled/ if: > > > > * it is deployed in a bean archive, and > > * it is not a producer method or field of a disabled bean, and > > * it is not specialized by any other enabled bean, as defined in > > _Specialization_ > > , > > and either > > * it is not an alternative, or it is a selected alternative of at > > least one bean archive or the application. > > > > Otherwise, the bean is said to be disabled. > > > > In the above app, there are two jars. The jar > > beans-xml-modified2.jar.jar does not enable the alternative and in its > > injection, it should only see the CounterProducerModified. While in > > another jar, the alternative AlternativeCounterProducerModified > > completely disabled the CounterProducerModified. Any injection in that > > jar should only see the specialized bean. > > > > From what you explained, the beans.xml in one jar enabled the > > alternative bean and affect other jars. From my understanding, the > > enablement of alternatives/interceptors are specific for that archive > > and should not affect other jars. > > > > Also OpenWebBeans behaves differently from Weld, and OpenWebBeans does > > what I have expected (enablement are per jar only). > > > > Many thanks, > > Emily > > =========================== > > Emily Jiang > > WebSphere Application Server, CDI Development Lead > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > Email: emijiang at uk.ibm.com > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > > > > > > From: Martin Kouba > > To: Emily Jiang/UK/IBM at IBMGB, > > Cc: Weld > > Date: 18/11/2015 15:52 > > Subject: Re: potential weld jira > > > > ------------------------------------------------------------------------ > > > > > > > > Well, it seems the problem is that CounterProducerModified is > > specialized by AlternativeCounterProducerModified and so it's not > > enabled and therefore it's producer method is also disabled (see also > > 5.1.2. Enabled and disabled beans [1]), i.e. it's not available for > > injection in beans-xml-modified2.jar. And > > AlternativeCounterProducerModified is an alternative which is not > > selected for beans-xml-modified2.jar. > > > > It should work if you enable AlternativeCounterProducerModified globally > > or select AlternativeCounterProducerModified for beans-xml-modified2.jar. > > > > Martin > > > > [1] > > http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#enablement > > > > Dne 18.11.2015 v 16:14 Emily Jiang napsal(a): > > > Hi Martin, > > > > > > Here's a simplified form of the test case: > > > > > > > > > The application does not start, reporting > > > > > > [ERROR ] CWWKZ0004E: An exception occurred while starting the > > > application testDiffBDA. The exception message was: > > > com.ibm.ws.container.service.state.StateChangeException: > > > org.jboss.weld.exceptions.DeploymentException: WELD-001408: > Unsatisfied > > > dependencies for type String with qualifiers @CounterModifiedQualifier > > > at injection point [BackedAnnotatedField] @Inject > > > @CounterModifiedQualifier > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified2.modifiedProducer > > > at > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified2.modifiedProducer(CounterProducerConsumerModified2.java:0) > > > > > > There are five classes in the .war. > > > > > > testDiffBDA.war/WEB-INF/classes/test/diff/web/FrontEndServlet.class > > > > > > @Inject CounterProducerConsumerModified2 bean; > > > > > > This class, CounterProducerConsumerModified2.class is packaged in the > > > first of two WEB-INF/lib jars, at > > > > > > testDiffBDA.war/WEB-INF/lib/beans-xml-modified2.jar.jar/com/ibm/jcdi/test/beans/xml. > > > There is a bean that needs another bean injected into it: > > > > > > @Inject at CounterModifiedQualifierString modifiedProducer; > > > > > > The remaining three classes are all in the second WEB-INF/lib jar, at > > > > > > testDiffBDA.war/WEB-INF/lib/beans-xml-modified.jar.jar/com/ibm/jcdi/test/beansxml/. > > > The classes are > > > > > > CounterModifiedQualifier (the interface) > > > CounterProducerModified (the bean implementing that interface) > > > AlternativeCounterProducerModified (an alternative bean) > > > > > > The AlternativeCounterProducerModified class is declared in > > > > > > testDiffBDA.war/WEB-INF/lib/beans-xml-modified.jar.jar/META-INF/beans.xml, > > > > > > > > > > > > com.ibm.jcdi.test.beansxml.AlternativeCounterProducerModified > > > > > > > > > The test app starts correctly if the stanza is > > commented out. > > > > > > > > > Many thanks, > > > Emily > > > =========================== > > > Emily Jiang > > > WebSphere Application Server, CDI Development Lead > > > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > > > Email: emijiang at uk.ibm.com > > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > > > > > > > > > > > From: Martin Kouba > > > To: Emily Jiang/UK/IBM at IBMGB, Weld , > > > Date: 18/11/2015 07:58 > > > Subject: Re: potential weld jira > > > > ------------------------------------------------------------------------ > > > > > > > > > > > > Hi Emily, > > > > > > a brief description would be helpful - it's not a trivial > > > deployment/reproducer. > > > > > > Martin > > > > > > Dne 16.11.2015 v 23:15 Emily Jiang napsal(a): > > > > I'm trying to deploy the attached war but got Weld alidation > error. On > > > > Glassfish 4.1, I got this error: > > > > Error occurred during deployment: Exception while loading the app > > : CDI > > > > deployment failure:WELD-001408: Unsatisfied dependencies for type > > String > > > > with qualifiers @DiffBDACounterQualifier at injection point > > > > [BackedAnnotatedField] @Inject @DiffBDACounterQualifier > > > > > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer > > > > at > > > > > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer(CounterProducerConsumerModified.java:0) > > > > WELD-001475: The following beans match by type, but none have > matching > > > > qualifiers: - Producer Method [String] with qualifiers > > > > [@CounterUnmodifiedQualifier @Any] declared as > > [[BackedAnnotatedMethod] > > > > @ExcludeClassInterceptors @Produces @CounterUnmodifiedQualifier > > > > > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerNoModifiers.getCounterBeanProducer()], > > > > - Producer Method [String] with qualifiers [@BatchProperty @Any] > > > > declared as [[UnbackedAnnotatedMethod] @Produces @Dependent > > > > @BatchProperty public > com.ibm.jbatch.container.cdi.BatchProducerBean.p > > > > .... msg.seeServerLog > > > > > > > > > > > > > > > > > > > > > > > > The app works fine on OpenWebBeans. Any ideas on what was wrong? > > > > > > > > Many thanks, > > > > Emily > > > > =========================== > > > > Emily Jiang > > > > WebSphere Application Server, CDI Development Lead > > > > > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > > > > > Email: emijiang at uk.ibm.com > > > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > > > > > > -- > > > Martin Kouba > > > Software Engineer > > > Red Hat, Czech Republic > > > > > > > > > > > > > -- > > Martin Kouba > > Software Engineer > > Red Hat, Czech Republic > > > > > > > > -- > Martin Kouba > Software Engineer > Red Hat, Czech Republic > _______________________________________________ > weld-dev mailing list > weld-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/weld-dev > > > Unless stated otherwise above: > IBM United Kingdom Limited - Registered in England and Wales with number > 741598. > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU > -- Martin Kouba Software Engineer Red Hat, Czech Republic From EMIJIANG at uk.ibm.com Thu Nov 19 04:58:48 2015 From: EMIJIANG at uk.ibm.com (Emily Jiang) Date: Thu, 19 Nov 2015 09:58:48 +0000 Subject: [weld-dev] potential weld jira In-Reply-To: <564D9224.5030108@redhat.com> References: <201511162116.tAGLGoZg029081@d06av10.portsmouth.uk.ibm.com><564C2FA0.5050605@redhat.com><201511181515.tAIFFIQv016369@d06av02.portsmouth.uk.ibm.com><564C9E96.1090408@redhat.com><201511181714.tAIHEEjb032242@d06av05.portsmouth.uk.ibm.com><564D7E29.8090802@redhat.com><201511190907.tAJ97ENZ011343@d06av12.portsmouth.uk.ibm.com> <564D9224.5030108@redhat.com> Message-ID: <201511190959.tAJ9xoq5007881@d06av03.portsmouth.uk.ibm.com> I found this in the spec: Hi Martin, I found this: In 4.3 Specialization, @Alternative @Specializes public class MockAsynchronousService extends AsynchronousService { ... } When an enabled bean, as defined in Section 5.1.2, ?Enabled and disabled beans?, specializes a second bean, we can be certain that the second bean is never instantiated or called by the container. If the alternative bean is not enabled, it should not specialise/disable another bean. Do you agree with me or you still want me to raise a question in cdi-dev? Many thanks, Emily =========================== Emily Jiang WebSphere Application Server, CDI Development Lead MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN Phone: +44 (0)1962 816278 Internal: 246278 Email: emijiang at uk.ibm.com Lotus Notes: Emily Jiang/UK/IBM at IBMGB From: Martin Kouba To: Emily Jiang/UK/IBM at IBMGB, Cc: Weld Date: 19/11/2015 09:11 Subject: Re: [weld-dev] potential weld jira Sent by: weld-dev-bounces at lists.jboss.org Dne 19.11.2015 v 10:07 Emily Jiang napsal(a): > Hi Martin, > > The issue is that the specialized bean is not enabled for > beans-xml-modified2.jar. Yep, but the spec does not state this should be taken into account. > @Alternative @Specialized annotated beans should not be active if it is > not enabled. I think the specialized should not be active if the > alternative is not. Otherwise, we run into the situation where the > specialized bean disabled a second bean but itself is not active. > > ok. I'll post the question on cdi-dev. > > Many thanks, > Emily > =========================== > Emily Jiang > WebSphere Application Server, CDI Development Lead > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > Phone: +44 (0)1962 816278 Internal: 246278 > > Email: emijiang at uk.ibm.com > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > From: Martin Kouba > To: Emily Jiang/UK/IBM at IBMGB, > Cc: Weld > Date: 19/11/2015 07:46 > Subject: Re: [weld-dev] potential weld jira > Sent by: weld-dev-bounces at lists.jboss.org > ------------------------------------------------------------------------ > > > > The enablement is per bean archive but specialization is not, see also > 4.3. Specialization: > > "When an enabled bean, as defined in Enabled and disabled beans, > specializes a second bean, we can be certain that the second bean is > never instantiated or called by the container. Even if the second bean > defines a producer or observer method, the method will never be called." > > In other words, AlternativeCounterProducerModified (which is enabled in > beans-xml-modified.jar) specializes CounterProducerModified. And so > CounterProducerModified is not enabled for beans-xml-modified2.jar > because it is specialized by any other enabled bean. > > Feel free to post a question to the cdi-dev ML. > > Martin > > Dne 18.11.2015 v 18:14 Emily Jiang napsal(a): > > Thank you Martin! > > > > I interpreted this enablement differently. > > > > The CDI 1.2 spec states: > > > > A bean is said to be /enabled/ if: > > > > * it is deployed in a bean archive, and > > * it is not a producer method or field of a disabled bean, and > > * it is not specialized by any other enabled bean, as defined in > > _Specialization_ > > , > > and either > > * it is not an alternative, or it is a selected alternative of at > > least one bean archive or the application. > > > > Otherwise, the bean is said to be disabled. > > > > In the above app, there are two jars. The jar > > beans-xml-modified2.jar.jar does not enable the alternative and in its > > injection, it should only see the CounterProducerModified. While in > > another jar, the alternative AlternativeCounterProducerModified > > completely disabled the CounterProducerModified. Any injection in that > > jar should only see the specialized bean. > > > > From what you explained, the beans.xml in one jar enabled the > > alternative bean and affect other jars. From my understanding, the > > enablement of alternatives/interceptors are specific for that archive > > and should not affect other jars. > > > > Also OpenWebBeans behaves differently from Weld, and OpenWebBeans does > > what I have expected (enablement are per jar only). > > > > Many thanks, > > Emily > > =========================== > > Emily Jiang > > WebSphere Application Server, CDI Development Lead > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > Email: emijiang at uk.ibm.com > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > > > > > > From: Martin Kouba > > To: Emily Jiang/UK/IBM at IBMGB, > > Cc: Weld > > Date: 18/11/2015 15:52 > > Subject: Re: potential weld jira > > > > ------------------------------------------------------------------------ > > > > > > > > Well, it seems the problem is that CounterProducerModified is > > specialized by AlternativeCounterProducerModified and so it's not > > enabled and therefore it's producer method is also disabled (see also > > 5.1.2. Enabled and disabled beans [1]), i.e. it's not available for > > injection in beans-xml-modified2.jar. And > > AlternativeCounterProducerModified is an alternative which is not > > selected for beans-xml-modified2.jar. > > > > It should work if you enable AlternativeCounterProducerModified globally > > or select AlternativeCounterProducerModified for beans-xml-modified2.jar. > > > > Martin > > > > [1] > > http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#enablement > > > > Dne 18.11.2015 v 16:14 Emily Jiang napsal(a): > > > Hi Martin, > > > > > > Here's a simplified form of the test case: > > > > > > > > > The application does not start, reporting > > > > > > [ERROR ] CWWKZ0004E: An exception occurred while starting the > > > application testDiffBDA. The exception message was: > > > com.ibm.ws.container.service.state.StateChangeException: > > > org.jboss.weld.exceptions.DeploymentException: WELD-001408: > Unsatisfied > > > dependencies for type String with qualifiers @CounterModifiedQualifier > > > at injection point [BackedAnnotatedField] @Inject > > > @CounterModifiedQualifier > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified2.modifiedProducer > > > at > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified2.modifiedProducer(CounterProducerConsumerModified2.java:0) > > > > > > There are five classes in the .war. > > > > > > testDiffBDA.war/WEB-INF/classes/test/diff/web/FrontEndServlet.class > > > > > > @Inject CounterProducerConsumerModified2 bean; > > > > > > This class, CounterProducerConsumerModified2.class is packaged in the > > > first of two WEB-INF/lib jars, at > > > > > > testDiffBDA.war/WEB-INF/lib/beans-xml-modified2.jar.jar/com/ibm/jcdi/test/beans/xml. > > > There is a bean that needs another bean injected into it: > > > > > > @Inject at CounterModifiedQualifierString modifiedProducer; > > > > > > The remaining three classes are all in the second WEB-INF/lib jar, at > > > > > > testDiffBDA.war/WEB-INF/lib/beans-xml-modified.jar.jar/com/ibm/jcdi/test/beansxml/. > > > The classes are > > > > > > CounterModifiedQualifier (the interface) > > > CounterProducerModified (the bean implementing that interface) > > > AlternativeCounterProducerModified (an alternative bean) > > > > > > The AlternativeCounterProducerModified class is declared in > > > > > > testDiffBDA.war/WEB-INF/lib/beans-xml-modified.jar.jar/META-INF/beans.xml, > > > > > > > > > > > > com.ibm.jcdi.test.beansxml.AlternativeCounterProducerModified > > > > > > > > > The test app starts correctly if the stanza is > > commented out. > > > > > > > > > Many thanks, > > > Emily > > > =========================== > > > Emily Jiang > > > WebSphere Application Server, CDI Development Lead > > > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > > > Email: emijiang at uk.ibm.com > > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > > > > > > > > > > > From: Martin Kouba > > > To: Emily Jiang/UK/IBM at IBMGB, Weld , > > > Date: 18/11/2015 07:58 > > > Subject: Re: potential weld jira > > > > ------------------------------------------------------------------------ > > > > > > > > > > > > Hi Emily, > > > > > > a brief description would be helpful - it's not a trivial > > > deployment/reproducer. > > > > > > Martin > > > > > > Dne 16.11.2015 v 23:15 Emily Jiang napsal(a): > > > > I'm trying to deploy the attached war but got Weld alidation > error. On > > > > Glassfish 4.1, I got this error: > > > > Error occurred during deployment: Exception while loading the app > > : CDI > > > > deployment failure:WELD-001408: Unsatisfied dependencies for type > > String > > > > with qualifiers @DiffBDACounterQualifier at injection point > > > > [BackedAnnotatedField] @Inject @DiffBDACounterQualifier > > > > > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer > > > > at > > > > > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer(CounterProducerConsumerModified.java:0) > > > > WELD-001475: The following beans match by type, but none have > matching > > > > qualifiers: - Producer Method [String] with qualifiers > > > > [@CounterUnmodifiedQualifier @Any] declared as > > [[BackedAnnotatedMethod] > > > > @ExcludeClassInterceptors @Produces @CounterUnmodifiedQualifier > > > > > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerNoModifiers.getCounterBeanProducer()], > > > > - Producer Method [String] with qualifiers [@BatchProperty @Any] > > > > declared as [[UnbackedAnnotatedMethod] @Produces @Dependent > > > > @BatchProperty public > com.ibm.jbatch.container.cdi.BatchProducerBean.p > > > > .... msg.seeServerLog > > > > > > > > > > > > > > > > > > > > > > > > The app works fine on OpenWebBeans. Any ideas on what was wrong? > > > > > > > > Many thanks, > > > > Emily > > > > =========================== > > > > Emily Jiang > > > > WebSphere Application Server, CDI Development Lead > > > > > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > > > > > Email: emijiang at uk.ibm.com > > > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > > > > > > -- > > > Martin Kouba > > > Software Engineer > > > Red Hat, Czech Republic > > > > > > > > > > > > > -- > > Martin Kouba > > Software Engineer > > Red Hat, Czech Republic > > > > > > > > -- > Martin Kouba > Software Engineer > Red Hat, Czech Republic > _______________________________________________ > weld-dev mailing list > weld-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/weld-dev > > > Unless stated otherwise above: > IBM United Kingdom Limited - Registered in England and Wales with number > 741598. > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU > -- Martin Kouba Software Engineer Red Hat, Czech Republic _______________________________________________ weld-dev mailing list weld-dev at lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-dev Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20151119/2c85676d/attachment-0001.html From mkouba at redhat.com Thu Nov 19 05:06:11 2015 From: mkouba at redhat.com (Martin Kouba) Date: Thu, 19 Nov 2015 11:06:11 +0100 Subject: [weld-dev] potential weld jira In-Reply-To: <201511190958.tAJ9wsd2009083@d06av07.portsmouth.uk.ibm.com> References: <201511162116.tAGLGoZg029081@d06av10.portsmouth.uk.ibm.com> <564C2FA0.5050605@redhat.com> <201511181515.tAIFFIQv016369@d06av02.portsmouth.uk.ibm.com> <564C9E96.1090408@redhat.com> <201511181714.tAIHEEjb032242@d06av05.portsmouth.uk.ibm.com> <564D7E29.8090802@redhat.com> <201511190907.tAJ97ENZ011343@d06av12.portsmouth.uk.ibm.com> <564D9224.5030108@redhat.com> <201511190958.tAJ9wsd2009083@d06av07.portsmouth.uk.ibm.com> Message-ID: <564D9F13.8030003@redhat.com> AlternativeCounterProducerModified is enabled in beans-xml-modified.jar and specializes CounterProducerModified. So I don't agree, raise a question pls. Martin Dne 19.11.2015 v 10:58 Emily Jiang napsal(a): > I found this in the spec: > > > Hi Martin, > I found this: > > In 4.3 Specialization, > @Alternative @Specializes > public class MockAsynchronousService extends AsynchronousService { > ... > } > *When an enabled bean*, as defined in Section 5.1.2, ?Enabled and > disabled beans?, specializes > a second bean, we can be certain that the second bean is never > instantiated or called by the > container. > > If the alternative bean is not enabled, it should not specialise/disable > another bean. Do you agree with me or you still want me to raise a > question in cdi-dev? > > > Many thanks, > Emily > =========================== > Emily Jiang > WebSphere Application Server, CDI Development Lead > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > Phone: +44 (0)1962 816278 Internal: 246278 > > Email: emijiang at uk.ibm.com > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > From: Martin Kouba > To: Emily Jiang/UK/IBM at IBMGB, > Cc: Weld > Date: 19/11/2015 09:11 > Subject: Re: [weld-dev] potential weld jira > Sent by: weld-dev-bounces at lists.jboss.org > ------------------------------------------------------------------------ > > > > Dne 19.11.2015 v 10:07 Emily Jiang napsal(a): > > Hi Martin, > > > > The issue is that the specialized bean is not enabled for > > beans-xml-modified2.jar. > > Yep, but the spec does not state this should be taken into account. > > > @Alternative @Specialized annotated beans should not be active if it is > > not enabled. I think the specialized should not be active if the > > alternative is not. Otherwise, we run into the situation where the > > specialized bean disabled a second bean but itself is not active. > > > > ok. I'll post the question on cdi-dev. > > > > Many thanks, > > Emily > > =========================== > > Emily Jiang > > WebSphere Application Server, CDI Development Lead > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > Email: emijiang at uk.ibm.com > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > > > > > > From: Martin Kouba > > To: Emily Jiang/UK/IBM at IBMGB, > > Cc: Weld > > Date: 19/11/2015 07:46 > > Subject: Re: [weld-dev] potential weld jira > > Sent by: weld-dev-bounces at lists.jboss.org > > ------------------------------------------------------------------------ > > > > > > > > The enablement is per bean archive but specialization is not, see also > > 4.3. Specialization: > > > > "When an enabled bean, as defined in Enabled and disabled beans, > > specializes a second bean, we can be certain that the second bean is > > never instantiated or called by the container. Even if the second bean > > defines a producer or observer method, the method will never be called." > > > > In other words, AlternativeCounterProducerModified (which is enabled in > > beans-xml-modified.jar) specializes CounterProducerModified. And so > > CounterProducerModified is not enabled for beans-xml-modified2.jar > > because it is specialized by any other enabled bean. > > > > Feel free to post a question to the cdi-dev ML. > > > > Martin > > > > Dne 18.11.2015 v 18:14 Emily Jiang napsal(a): > > > Thank you Martin! > > > > > > I interpreted this enablement differently. > > > > > > The CDI 1.2 spec states: > > > > > > A bean is said to be /enabled/ if: > > > > > > * it is deployed in a bean archive, and > > > * it is not a producer method or field of a disabled bean, and > > > * it is not specialized by any other enabled bean, as defined in > > > _Specialization_ > > > , > > > and either > > > * it is not an alternative, or it is a selected alternative of at > > > least one bean archive or the application. > > > > > > Otherwise, the bean is said to be disabled. > > > > > > In the above app, there are two jars. The jar > > > beans-xml-modified2.jar.jar does not enable the alternative and > in its > > > injection, it should only see the CounterProducerModified. While in > > > another jar, the alternative AlternativeCounterProducerModified > > > completely disabled the CounterProducerModified. Any injection in that > > > jar should only see the specialized bean. > > > > > > From what you explained, the beans.xml in one jar enabled the > > > alternative bean and affect other jars. From my understanding, the > > > enablement of alternatives/interceptors are specific for that archive > > > and should not affect other jars. > > > > > > Also OpenWebBeans behaves differently from Weld, and OpenWebBeans does > > > what I have expected (enablement are per jar only). > > > > > > Many thanks, > > > Emily > > > =========================== > > > Emily Jiang > > > WebSphere Application Server, CDI Development Lead > > > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > > > Email: emijiang at uk.ibm.com > > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > > > > > > > > > > > From: Martin Kouba > > > To: Emily Jiang/UK/IBM at IBMGB, > > > Cc: Weld > > > Date: 18/11/2015 15:52 > > > Subject: Re: potential weld jira > > > > > > > ------------------------------------------------------------------------ > > > > > > > > > > > > Well, it seems the problem is that CounterProducerModified is > > > specialized by AlternativeCounterProducerModified and so it's not > > > enabled and therefore it's producer method is also disabled (see also > > > 5.1.2. Enabled and disabled beans [1]), i.e. it's not available for > > > injection in beans-xml-modified2.jar. And > > > AlternativeCounterProducerModified is an alternative which is not > > > selected for beans-xml-modified2.jar. > > > > > > It should work if you enable AlternativeCounterProducerModified > globally > > > or select AlternativeCounterProducerModified for > beans-xml-modified2.jar. > > > > > > Martin > > > > > > [1] > > > http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#enablement > > > > > > Dne 18.11.2015 v 16:14 Emily Jiang napsal(a): > > > > Hi Martin, > > > > > > > > Here's a simplified form of the test case: > > > > > > > > > > > > The application does not start, reporting > > > > > > > > [ERROR ] CWWKZ0004E: An exception occurred while starting the > > > > application testDiffBDA. The exception message was: > > > > com.ibm.ws.container.service.state.StateChangeException: > > > > org.jboss.weld.exceptions.DeploymentException: WELD-001408: > > Unsatisfied > > > > dependencies for type String with qualifiers > @CounterModifiedQualifier > > > > at injection point [BackedAnnotatedField] @Inject > > > > @CounterModifiedQualifier > > > > > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified2.modifiedProducer > > > > at > > > > > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified2.modifiedProducer(CounterProducerConsumerModified2.java:0) > > > > > > > > There are five classes in the .war. > > > > > > > > testDiffBDA.war/WEB-INF/classes/test/diff/web/FrontEndServlet.class > > > > > > > > @Inject CounterProducerConsumerModified2 bean; > > > > > > > > This class, CounterProducerConsumerModified2.class is packaged > in the > > > > first of two WEB-INF/lib jars, at > > > > > > > > > > testDiffBDA.war/WEB-INF/lib/beans-xml-modified2.jar.jar/com/ibm/jcdi/test/beans/xml. > > > > There is a bean that needs another bean injected into it: > > > > > > > > @Inject at CounterModifiedQualifierString modifiedProducer; > > > > > > > > The remaining three classes are all in the second WEB-INF/lib > jar, at > > > > > > > > > > testDiffBDA.war/WEB-INF/lib/beans-xml-modified.jar.jar/com/ibm/jcdi/test/beansxml/. > > > > The classes are > > > > > > > > CounterModifiedQualifier (the interface) > > > > CounterProducerModified (the bean implementing that interface) > > > > AlternativeCounterProducerModified (an alternative bean) > > > > > > > > The AlternativeCounterProducerModified class is declared in > > > > > > > > > > testDiffBDA.war/WEB-INF/lib/beans-xml-modified.jar.jar/META-INF/beans.xml, > > > > > > > > > > > > > > > > > > com.ibm.jcdi.test.beansxml.AlternativeCounterProducerModified > > > > > > > > > > > > The test app starts correctly if the stanza is > > > commented out. > > > > > > > > > > > > Many thanks, > > > > Emily > > > > =========================== > > > > Emily Jiang > > > > WebSphere Application Server, CDI Development Lead > > > > > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > > > > > Email: emijiang at uk.ibm.com > > > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > > > > > > > > > > > > > > > > From: Martin Kouba > > > > To: Emily Jiang/UK/IBM at IBMGB, Weld , > > > > Date: 18/11/2015 07:58 > > > > Subject: Re: potential weld jira > > > > > > ------------------------------------------------------------------------ > > > > > > > > > > > > > > > > Hi Emily, > > > > > > > > a brief description would be helpful - it's not a trivial > > > > deployment/reproducer. > > > > > > > > Martin > > > > > > > > Dne 16.11.2015 v 23:15 Emily Jiang napsal(a): > > > > > I'm trying to deploy the attached war but got Weld alidation > > error. On > > > > > Glassfish 4.1, I got this error: > > > > > Error occurred during deployment: Exception while loading > the app > > > : CDI > > > > > deployment failure:WELD-001408: Unsatisfied dependencies for > type > > > String > > > > > with qualifiers @DiffBDACounterQualifier at injection point > > > > > [BackedAnnotatedField] @Inject @DiffBDACounterQualifier > > > > > > > > > > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer > > > > > at > > > > > > > > > > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerConsumerModified.diffBDAProducer(CounterProducerConsumerModified.java:0) > > > > > WELD-001475: The following beans match by type, but none have > > matching > > > > > qualifiers: - Producer Method [String] with qualifiers > > > > > [@CounterUnmodifiedQualifier @Any] declared as > > > [[BackedAnnotatedMethod] > > > > > @ExcludeClassInterceptors @Produces @CounterUnmodifiedQualifier > > > > > > > > > > > > > > > com.ibm.jcdi.test.beansxml.CounterProducerNoModifiers.getCounterBeanProducer()], > > > > > - Producer Method [String] with qualifiers [@BatchProperty @Any] > > > > > declared as [[UnbackedAnnotatedMethod] @Produces @Dependent > > > > > @BatchProperty public > > com.ibm.jbatch.container.cdi.BatchProducerBean.p > > > > > .... msg.seeServerLog > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > The app works fine on OpenWebBeans. Any ideas on what was wrong? > > > > > > > > > > Many thanks, > > > > > Emily > > > > > =========================== > > > > > Emily Jiang > > > > > WebSphere Application Server, CDI Development Lead > > > > > > > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > > > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > > > > > > > Email: emijiang at uk.ibm.com > > > > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > > > > > > > > > -- > > > > Martin Kouba > > > > Software Engineer > > > > Red Hat, Czech Republic > > > > > > > > > > > > > > > > > > -- > > > Martin Kouba > > > Software Engineer > > > Red Hat, Czech Republic > > > > > > > > > > > > > -- > > Martin Kouba > > Software Engineer > > Red Hat, Czech Republic > > _______________________________________________ > > weld-dev mailing list > > weld-dev at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/weld-dev > > > > > > Unless stated otherwise above: > > IBM United Kingdom Limited - Registered in England and Wales with number > > 741598. > > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire > PO6 3AU > > > > -- > Martin Kouba > Software Engineer > Red Hat, Czech Republic > _______________________________________________ > weld-dev mailing list > weld-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/weld-dev > > > Unless stated otherwise above: > IBM United Kingdom Limited - Registered in England and Wales with number > 741598. > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU > -- Martin Kouba Software Engineer Red Hat, Czech Republic From EMIJIANG at uk.ibm.com Wed Nov 25 09:40:43 2015 From: EMIJIANG at uk.ibm.com (Emily Jiang) Date: Wed, 25 Nov 2015 14:40:43 +0000 Subject: [weld-dev] clean up unused conversations In-Reply-To: <564C2E3A.60908@redhat.com> References: <201511172216.tAHMG5ns031355@d06av03.portsmouth.uk.ibm.com> <564C2E3A.60908@redhat.com> Message-ID: <201511251340.tAPDepk1005665@d06av10.portsmouth.uk.ibm.com> Thank you Martin! Is there any way to destroy the unused conversations earlier before ServletRequestListener.requestDestroyed()? Many thanks, Emily =========================== Emily Jiang WebSphere Application Server, CDI Development Lead MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN Phone: +44 (0)1962 816278 Internal: 246278 Email: emijiang at uk.ibm.com Lotus Notes: Emily Jiang/UK/IBM at IBMGB From: Martin Kouba To: weld-dev at lists.jboss.org, Date: 18/11/2015 07:53 Subject: Re: [weld-dev] clean up unused conversations Sent by: weld-dev-bounces at lists.jboss.org Hi Emily, in Weld all expired/timed-out conversations are marked as transient and destroyed during every ServletRequestListener.requestDestroyed() notification. So there is no such configuration property. Martin Dne 17.11.2015 v 23:15 Emily Jiang napsal(a): > In OpenWebBeans, there is a configuration > *org.apache.webbeans.conversation.Conversation.periodicDelay* > > Specifies a delay in milliseconds. Use the conversation periodic delay > custom property to search for and delete unused conversations. > > Is there such configuration in Weld? > > Many thanks, > Emily > =========================== > Emily Jiang > WebSphere Application Server, CDI Development Lead > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > Phone: +44 (0)1962 816278 Internal: 246278 > > Email: emijiang at uk.ibm.com > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > Unless stated otherwise above: > IBM United Kingdom Limited - Registered in England and Wales with number > 741598. > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU > > > > _______________________________________________ > weld-dev mailing list > weld-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/weld-dev > -- Martin Kouba Software Engineer Red Hat, Czech Republic _______________________________________________ weld-dev mailing list weld-dev at lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20151125/fb93a29e/attachment.html From mkouba at redhat.com Thu Nov 26 03:04:23 2015 From: mkouba at redhat.com (Martin Kouba) Date: Thu, 26 Nov 2015 09:04:23 +0100 Subject: [weld-dev] clean up unused conversations In-Reply-To: <201511251441.tAPEfgZr005961@d06av11.portsmouth.uk.ibm.com> References: <201511172216.tAHMG5ns031355@d06av03.portsmouth.uk.ibm.com> <564C2E3A.60908@redhat.com> <201511251441.tAPEfgZr005961@d06av11.portsmouth.uk.ibm.com> Message-ID: <5656BD07.6060804@redhat.com> Hi Emily, there is no such way. Of course, if an HTTP session times out all the conversations are destroyed as well. Martin Dne 25.11.2015 v 15:40 Emily Jiang napsal(a): > Thank you Martin! Is there any way to destroy the unused conversations > earlier before ServletRequestListener.requestDestroyed()? > > Many thanks, > Emily > =========================== > Emily Jiang > WebSphere Application Server, CDI Development Lead > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > Phone: +44 (0)1962 816278 Internal: 246278 > > Email: emijiang at uk.ibm.com > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > From: Martin Kouba > To: weld-dev at lists.jboss.org, > Date: 18/11/2015 07:53 > Subject: Re: [weld-dev] clean up unused conversations > Sent by: weld-dev-bounces at lists.jboss.org > ------------------------------------------------------------------------ > > > > Hi Emily, > > in Weld all expired/timed-out conversations are marked as transient and > destroyed during every ServletRequestListener.requestDestroyed() > notification. So there is no such configuration property. > > Martin > > Dne 17.11.2015 v 23:15 Emily Jiang napsal(a): > > In OpenWebBeans, there is a configuration > > *org.apache.webbeans.conversation.Conversation.periodicDelay* > > > > Specifies a delay in milliseconds. Use the conversation periodic delay > > custom property to search for and delete unused conversations. > > > > Is there such configuration in Weld? > > > > Many thanks, > > Emily > > =========================== > > Emily Jiang > > WebSphere Application Server, CDI Development Lead > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > Email: emijiang at uk.ibm.com > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > Unless stated otherwise above: > > IBM United Kingdom Limited - Registered in England and Wales with number > > 741598. > > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire > PO6 3AU > > > > > > > > _______________________________________________ > > weld-dev mailing list > > weld-dev at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/weld-dev > > > > -- > Martin Kouba > Software Engineer > Red Hat, Czech Republic > _______________________________________________ > weld-dev mailing list > weld-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/weld-dev > > > -- Martin Kouba Software Engineer Red Hat, Czech Republic From EMIJIANG at uk.ibm.com Thu Nov 26 04:48:26 2015 From: EMIJIANG at uk.ibm.com (Emily Jiang) Date: Thu, 26 Nov 2015 09:48:26 +0000 Subject: [weld-dev] clean up unused conversations In-Reply-To: <5656BD07.6060804@redhat.com> References: <201511172216.tAHMG5ns031355@d06av03.portsmouth.uk.ibm.com><564C2E3A.60908@redhat.com><201511251441.tAPEfgZr005961@d06av11.portsmouth.uk.ibm.com> <5656BD07.6060804@redhat.com> Message-ID: <201511260948.tAQ9mUFu016752@d06av11.portsmouth.uk.ibm.com> Hi Martin, Let me clarify with a scenario: If I set the conversation timeout to be 30s, the unused conversations is destroyed after the timeout, e.g. 31s, automatically. No user interactions are involved. No ServletRequestListener needs to be registered by the customer applications. In summary, the unused conversations will be cleared either during ServletRequestListner.requestDestroyed() notification or HTTPSession timeout. Do you have anyone complain about unused conversations not cleared up timely? Many thanks, Emily =========================== Emily Jiang WebSphere Application Server, CDI Development Lead MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN Phone: +44 (0)1962 816278 Internal: 246278 Email: emijiang at uk.ibm.com Lotus Notes: Emily Jiang/UK/IBM at IBMGB From: Martin Kouba To: Emily Jiang/UK/IBM at IBMGB, Cc: weld-dev at lists.jboss.org Date: 26/11/2015 08:04 Subject: Re: [weld-dev] clean up unused conversations Sent by: weld-dev-bounces at lists.jboss.org Hi Emily, there is no such way. Of course, if an HTTP session times out all the conversations are destroyed as well. Martin Dne 25.11.2015 v 15:40 Emily Jiang napsal(a): > Thank you Martin! Is there any way to destroy the unused conversations > earlier before ServletRequestListener.requestDestroyed()? > > Many thanks, > Emily > =========================== > Emily Jiang > WebSphere Application Server, CDI Development Lead > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > Phone: +44 (0)1962 816278 Internal: 246278 > > Email: emijiang at uk.ibm.com > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > From: Martin Kouba > To: weld-dev at lists.jboss.org, > Date: 18/11/2015 07:53 > Subject: Re: [weld-dev] clean up unused conversations > Sent by: weld-dev-bounces at lists.jboss.org > ------------------------------------------------------------------------ > > > > Hi Emily, > > in Weld all expired/timed-out conversations are marked as transient and > destroyed during every ServletRequestListener.requestDestroyed() > notification. So there is no such configuration property. > > Martin > > Dne 17.11.2015 v 23:15 Emily Jiang napsal(a): > > In OpenWebBeans, there is a configuration > > *org.apache.webbeans.conversation.Conversation.periodicDelay* > > > > Specifies a delay in milliseconds. Use the conversation periodic delay > > custom property to search for and delete unused conversations. > > > > Is there such configuration in Weld? > > > > Many thanks, > > Emily > > =========================== > > Emily Jiang > > WebSphere Application Server, CDI Development Lead > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > Email: emijiang at uk.ibm.com > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > Unless stated otherwise above: > > IBM United Kingdom Limited - Registered in England and Wales with number > > 741598. > > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire > PO6 3AU > > > > > > > > _______________________________________________ > > weld-dev mailing list > > weld-dev at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/weld-dev > > > > -- > Martin Kouba > Software Engineer > Red Hat, Czech Republic > _______________________________________________ > weld-dev mailing list > weld-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/weld-dev > > > -- Martin Kouba Software Engineer Red Hat, Czech Republic _______________________________________________ weld-dev mailing list weld-dev at lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20151126/58dd3a60/attachment.html From mkouba at redhat.com Thu Nov 26 06:45:52 2015 From: mkouba at redhat.com (Martin Kouba) Date: Thu, 26 Nov 2015 12:45:52 +0100 Subject: [weld-dev] clean up unused conversations In-Reply-To: <201511260948.tAQ9mUU3027439@d06av12.portsmouth.uk.ibm.com> References: <201511172216.tAHMG5ns031355@d06av03.portsmouth.uk.ibm.com> <564C2E3A.60908@redhat.com> <201511251441.tAPEfgZr005961@d06av11.portsmouth.uk.ibm.com> <5656BD07.6060804@redhat.com> <201511260948.tAQ9mUU3027439@d06av12.portsmouth.uk.ibm.com> Message-ID: <5656F0F0.6050009@redhat.com> Dne 26.11.2015 v 10:48 Emily Jiang napsal(a): > Hi Martin, > > Let me clarify with a scenario: > > If I set the conversation timeout to be 30s, the unused conversations is > destroyed after the timeout, e.g. 31s, automatically. No user > interactions are involved. No ServletRequestListener needs to be > registered by the customer applications. > > In summary, the unused conversations will be cleared either during > ServletRequestListner.requestDestroyed() notification or HTTPSession > timeout. Do you have anyone complain about unused conversations not > cleared up timely? Yes, the timed out conversations are automatically destroyed after the next ServletRequestListner.requestDestroyed() or when the session times out or when the session is invalidated. No ServletRequestListener needs to be registered by the application. No complaints so far. > > Many thanks, > Emily > =========================== > Emily Jiang > WebSphere Application Server, CDI Development Lead > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > Phone: +44 (0)1962 816278 Internal: 246278 > > Email: emijiang at uk.ibm.com > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > From: Martin Kouba > To: Emily Jiang/UK/IBM at IBMGB, > Cc: weld-dev at lists.jboss.org > Date: 26/11/2015 08:04 > Subject: Re: [weld-dev] clean up unused conversations > Sent by: weld-dev-bounces at lists.jboss.org > ------------------------------------------------------------------------ > > > > Hi Emily, > > there is no such way. Of course, if an HTTP session times out all the > conversations are destroyed as well. > > Martin > > Dne 25.11.2015 v 15:40 Emily Jiang napsal(a): > > Thank you Martin! Is there any way to destroy the unused conversations > > earlier before ServletRequestListener.requestDestroyed()? > > > > Many thanks, > > Emily > > =========================== > > Emily Jiang > > WebSphere Application Server, CDI Development Lead > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > Email: emijiang at uk.ibm.com > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > > > > > > > > From: Martin Kouba > > To: weld-dev at lists.jboss.org, > > Date: 18/11/2015 07:53 > > Subject: Re: [weld-dev] clean up unused conversations > > Sent by: weld-dev-bounces at lists.jboss.org > > ------------------------------------------------------------------------ > > > > > > > > Hi Emily, > > > > in Weld all expired/timed-out conversations are marked as transient and > > destroyed during every ServletRequestListener.requestDestroyed() > > notification. So there is no such configuration property. > > > > Martin > > > > Dne 17.11.2015 v 23:15 Emily Jiang napsal(a): > > > In OpenWebBeans, there is a configuration > > > *org.apache.webbeans.conversation.Conversation.periodicDelay* > > > > > > Specifies a delay in milliseconds. Use the conversation periodic delay > > > custom property to search for and delete unused conversations. > > > > > > Is there such configuration in Weld? > > > > > > Many thanks, > > > Emily > > > =========================== > > > Emily Jiang > > > WebSphere Application Server, CDI Development Lead > > > > > > MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN > > > Phone: +44 (0)1962 816278 Internal: 246278 > > > > > > Email: emijiang at uk.ibm.com > > > Lotus Notes: Emily Jiang/UK/IBM at IBMGB > > > Unless stated otherwise above: > > > IBM United Kingdom Limited - Registered in England and Wales with > number > > > 741598. > > > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire > > PO6 3AU > > > > > > > > > > > > _______________________________________________ > > > weld-dev mailing list > > > weld-dev at lists.jboss.org > > > https://lists.jboss.org/mailman/listinfo/weld-dev > > > > > > > -- > > Martin Kouba > > Software Engineer > > Red Hat, Czech Republic > > _______________________________________________ > > weld-dev mailing list > > weld-dev at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/weld-dev > > > > > > > > -- > Martin Kouba > Software Engineer > Red Hat, Czech Republic > _______________________________________________ > weld-dev mailing list > weld-dev at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/weld-dev > > > -- Martin Kouba Software Engineer Red Hat, Czech Republic