Log in to follow, share, and participate in this community.
Thread Programmatically added observer methods and lifecycles
Programmatically added observer methods and lifecyclesI had a question about what happens when you programmatically add an observer method to a bean. In my case, I am programmatically adding an observer method that @Observes @Initialized(ApplicationScoped.class) ...
ObservesAsync: reception not guaranteed?I have a bean like this: @ApplicationScoped public class Foo { private Bar bar; @Inject public void initMethod(final Bar bar) { System.out.println...
Thread Can Weld Cdi omit @Inject annotation in favour of HK2
Can Weld Cdi omit @Inject annotation in favour of HK2Hello Discussion is moved from here. I really wanted to make things simple but it seems that it is not possible to not give more details. I am operating on glassfish 4.1.1 using WELD-000900: 2.2.13 (Final), d...
Thread Beans with a dependent scope and an observer method - weird behavior
Beans with a dependent scope and an observer method - weird behaviorConsidering the following environment: Weld SE (2.4.0) A Main class starting Weld SE An application scoped class named Application A dependent scope class named Child And the following binding: Applicati...
Thread Assisted injection - I have a working prototype, but...
Assisted injection - I have a working prototype, but...I'm currently in the process of integrating a DI framework in an old Java SE legacy application. As you can imagine, this application has many classes with multiple constructors that are not eligible for injections. A...
Thread Adding an annotation to a method via an extension: surprises
Adding an annotation to a method via an extension: surprisesFor posterity I thought I would record this here. I am futzing around with an extension that programmatically turns JSR-330 Providers into producer methods. I am not entirely sure where I'm going with th...
Thread AnnotatedTypeConfigurator::add: what is this supposed to do?
AnnotatedTypeConfigurator::add: what is this supposed to do?The documentation on the AnnotatedTypeConfigurator::add method says, in total: Add an annotation to the field. What field? I thought AnnotatedType represented a, well, type. Best, Laird
Thread Should CDI.current() work in code called by a portable extension?
Should CDI.current() work in code called by a portable extension?Admittedly I am deep in the weeds here. This is with Weld SE 3.0.0.Alpha17. I am writing a portable extension that is reacting to the AfterDeploymentValidation event. This means the container, so f...
Updating WELD in glassfish 4Hi there, I would like to upgrade the version of WELD glassfish 4.1.1 uses. I've done this before for glassfish 3.1.1, but it was a long time ago, my memory is foggy. I know normally you need to ov...
Thread Inject custom security principal (via login module)
Inject custom security principal (via login module)Hello I am part of a team developing a thin framework to provide some basic JavaEE features for you applications (web & ejb). Part of this framework includes a custom Wildfly login module, which createa a...
Specializing a bean you don't control?How do you specialize a bean you don't control? I hope this is a sensible question. What I mean is: suppose a colleague hands me a bean archive with a FrobnicatorImpl bean in it (that implements Frobnicator). ...
Thread Accessing class annotation on a Weld-made proxy?
Accessing class annotation on a Weld-made proxy?(This is tangentially related to WELD-1131 and this forum thread.) When Weld hands me a bean instance, and I want to inspect that instance's class for a class-level annotation, I cannot, because the class of t...
Thread TypeLiteral and Instance::select(TypeLiteral): limitations?
TypeLiteral and Instance::select(TypeLiteral): limitations?(I have also asked this question on StackOverflow.) Suppose I have an interface like this: public interface Converter<T> { /*...*/ }And suppose in a CDI environment I have successfully done this: @Inject @Any pr...
Thread WELD-001456: Argument resolvedBean must not be null?
WELD-001456: Argument resolvedBean must not be null?Hello; I'm using Weld 3.0.0 Alpha17 (using it in a unit test, so Weld SE, if it matters). I have a @Produces method annotated like this: @Produces @Dependent @Foo public String getFoo(final InjectionPoi...
Working with huge class hierarchyHello, I have a huge class hierarchy and the child class has to be decorated. There are no big methods in classes, but ca. 1800 methods in total. In ProxyFactory I get the exception java.lang.RuntimeEx...
how do I get the container?I have the id of the running container through getRunningContainerIds(). But now that I have the id of the container, how do I grab the container itself?