Questions tagged [cdi-2.0]
11 questions
7
votes
1 answer
Why Event.fireAsync() requires an @ObservesAsync annotation?
In CDI 2.0 one can fire an event asynchronously by calling Event.fireAsync() and then listen to this event by with a @ObservesAsync annotated listener.
Why do we need both Event.firesAsync() and @ObservesAsync?
Couldn't CDI 2.0 process…

brandizzi
- 26,083
- 8
- 103
- 158
4
votes
0 answers
JSF 2.3, CDI 2.0 | class com.sun.faces.flow.FlowDiscoveryCDIHelper is deprecated from CDI 1.1
Configured a maven webapp for JSF 2.3, CDI 2 on Tomcat 8.5 with WELD 3.
Cant figure out, how to fix this WARN-message:
WARN o.j.w.Bootstrap [addAnnotatedType:118] WELD-000146:
BeforeBeanDiscovery.addAnnotatedType(AnnotatedType) used for class
…

Jens Fuchs
- 65
- 1
- 9
3
votes
3 answers
Warning at Weld 3 startup with XSD invalid beans.xml for weld:scan tag
I just updated Weld from version 2.4.4 to 3.0.1. I am facing the following error at the application startup and I cannot found a solution. I am using Weld SE.
Sep 15, 2017 1:25:12 PM org.jboss.weld.xml.BeansXmlHandler error
WARN: WELD-001208: Error…

Nicolas Henneaux
- 11,507
- 11
- 57
- 82
2
votes
1 answer
Can CDI 2.0 be used with weblogic 12c?
I'm using Weblogic 12.2.1.3.0 and I would like to know if I can use CDI 2.0.
My beans.xml is like below:

Rambou
- 968
- 9
- 22
2
votes
1 answer
CDI 2.0: How to check how many asynchronous events fired with Event.fireAsync() can run simultaneously
I'm writing a REST web service using Jersey, CDI 2.0 (Weld 3.0.1.final implementation) and Tomcat. The goal of the webservice is to launch long computation tasks that can be running for several minutes or even hours. The task should be started with…

Bartek Małachowski
- 73
- 1
- 5
1
vote
1 answer
Why the CDI is not working in a singleton class
A singleton class is firing an Event but the container is not calling the CDI Event Listener.
Below, the creatData() in the DataLoaderSessionBean singleton class calls the loadUsers() method and in turn the loadUsers() is firing an event, which…

Darvin
- 148
- 8
1
vote
1 answer
Can you fire CDI 2.0 events of type AbstractClass extends Something>?
(For background, I've read You think you know everything about CDI events… Think again!, so I'm at least mostly familiar with many edge cases in CDI events.)
I'm using Weld 3.0.4.Final as an implementation of CDI 2.0.
I have an AbstractFoo extends…

Laird Nelson
- 15,321
- 19
- 73
- 127
0
votes
1 answer
Why CDI interceptor injected in a singleton is not called by the Glassfish 5.1 container
The CDI interceptor that records the method entry and exit in the log file is not being called for the singleton class by the container?
@Inherited
@InterceptorBinding
@Retention(RUNTIME)
@Target({METHOD, TYPE})
public @interface Logit {
}
Here is…

Darvin
- 148
- 8
0
votes
1 answer
CDI 2.0, Java SE - conditional observer method not called in weld-se-shaded 3.0.5.Final
I'm facing a problem with a conditional observer method that is not being called. Here is the code, starting with a junit test:
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.CoreMatchers.nullValue;
…

ruu
- 51
- 1
- 6
0
votes
1 answer
CDI extension dynamic update property
I read some documents about CDI custom extensions and read some sample codes like Properties loader on this links : Link-A - Link-B.
I wrote a simple cdi extension like this codes .
public class SystemStatisticExtension implements Extension…

mah454
- 1,571
- 15
- 38
-1
votes
1 answer
WildFly 12.0.0.Final + Weld 3.0.3.Final - How to use CDI 2.0?
On the Weld.org page, it says for WildFly 12.0.0.Final:
WildFly 12.0.0.Final Weld 3.0.3.Final CDI 1.2 and CDI 2.0 (opt-in
via property)
I can't see how to "opt-in via property"?

NOTiFY
- 1,255
- 1
- 20
- 36