jboss-weld Questions
1
I have a Service in a Java SE application (without any application server) which creates Algorithm instances and run them.
Every Algorithm instance needs a new (separate) ActionExecutor and a new...
Represent asked 13/3, 2014 at 11:7
1
I am trying to define a startup class for my application in Weld CDI with @Singleton and @Startup annotations (running on tomcat 7), but my PostConstruct method is never called.
Here is my Startup...
Hudson asked 7/5, 2013 at 7:55
5
Solved
I'm using JSF 2.0 and want to fill a selectOneMenu with the values of my Enum.
A simple example:
// Sample Enum
public enum Gender {
MALE("Male"),
FEMALE("Female");
private final String ...
Snead asked 19/5, 2010 at 19:36
2
Solved
I want to create a Producer that makes it possible to inject a java.util.ResourceBundle into any class in order to get localized Strings easily. My ResourceBundle-Producer looks like this:
public ...
Glycine asked 8/6, 2010 at 18:30
1
Solved
I'm trying to combine RESTEasy with Weld on AppEngine but having troubles to do constructor injection.
I've added the RESTEasy CdiInjectorFactory context param and the Weld servlet listener.
My R...
Mydriatic asked 30/1, 2014 at 21:13
3
I was playing with Weld-SE (Java SE) and noticed that if there are a lot of JARs in the classpath, the JVM startup time runs into several seconds.
Isn't there a way to specify/restrict the scan pa...
Permanent asked 18/8, 2011 at 22:28
3
Solved
I want to use weld-se for unit testing CDI. However, I am stuck with this problem that Weld cannot resolve beans. I created a mini-project to demonstrate the problem with gradle for building.
I ha...
Padlock asked 29/9, 2013 at 17:2
2
I ran into this confusion today. Quote from Weld's documentation (right under Section 9.3),
By default, all interceptors are disabled. We need to enable our
interceptor. We can do it using bean...
Clostridium asked 15/10, 2013 at 6:2
3
One of the beauties with Java EE 6 is the new dependency injection framework - CDI with the Weld reference implementation - which has prompted us to start migrating internally to JSR-330 in an impl...
Fokker asked 31/1, 2011 at 11:13
6
Solved
I have a @ConversationScoped bean, with a start method, like so:
@PostConstruct
public void start() {
if (conversation.isTransient()) {
conversation.begin();
log.debug("conversation.getId(): " ...
Crowe asked 28/5, 2011 at 12:22
3
Solved
I have an application with a well defined interface. It uses CDI for resolution of the modules, (Specifically it uses Instance<> injection points on API interfaces to resolve modules) and passes...
Personnel asked 1/6, 2011 at 10:5
7
I want to use the @ViewScoped - scope in my application for the backing beans of some web pages. Also I use CDI to inject the dependecies into the backing beans.
However, when I use a backing bea...
Zannini asked 1/2, 2011 at 16:18
1
Solved
Is there a way to create a interceptor qualifier annotation that ignores the annotation string value for qualifying?
for example:
Log.java
@Inherited
@InterceptorBinding
@Target({ElementType.MET...
Tachistoscope asked 16/4, 2013 at 21:6
3
Solved
I'm trying to create instances of CDI managed beans using the BeanManager rather than Instance .select().get().
This was suggested as a workaround to an issue I've been having with ApplicationSco...
Holiday asked 7/12, 2011 at 17:51
1
Solved
I am writing a Java EE 6 web application and I am noticing a significant performance impact when using an injected object versus creating and using the object directly. The overhead appears to be o...
Milagrosmilam asked 21/11, 2012 at 16:0
1
Solved
I would like to know if the RequestScoped context is currently active in a method or not.
At the moment, here is what I do :
@Inject private BeanManager beanManager;
public boolean isRequestScop...
Orpington asked 16/7, 2012 at 15:6
1
Solved
Since JPA 2.0 does not support injection into EntityListener (JPA 2.1 will), decided to use JNDI lookup to get the BeanManager and through it get the logged in user. I defined an EntityListener sim...
Morava asked 26/5, 2012 at 10:37
2
Solved
Section 5.4.1 of the CDI spec states that otherwise valid beans are unproxyable (and thus cannot be injected) if declared final. The spec gives no rationale and I can not think of a reason for this...
Goncourt asked 23/5, 2012 at 14:22
3
Solved
In Spring it was possible to instantiate any class by defining the corresponding bean in xml conf. It was also possible to instantiate more then one bean for the same class with different parameter...
Monagan asked 23/2, 2010 at 14:31
2
Solved
In terms of simplicity and correctness, what is the best way to inject objects of the same class with different scopes?
In a servlet I want to have injected objects of the same class with differen...
Barracks asked 29/4, 2012 at 16:3
1
Solved
Is there any default scope for a @Named CDI bean without additional @...Scoped annotations? I have not found any relevant information in the official Weld documentation.
A @Named bean can be acces...
Cogon asked 24/4, 2012 at 7:24
3
Solved
Is there an existing, or upcoming book on CDI/Weld that you can recommend?
I'm looking for something that's similar in scope and quality to Seam in Action, which was a great reference for S...
Amp asked 14/3, 2011 at 1:47
1
I'm a little confused about which to use in the following situation:
Suppose the servlet creates an Application that handles the user's http session, and the application is this:
public class App...
Shirberg asked 26/3, 2012 at 21:36
2
Solved
Is it possible to use type variance in CDI events? here is the case:
Suppose i have a root event type MyEvent and subclass DummyEvent
My goal is to process a list of events received from a remote...
Deathday asked 28/1, 2012 at 2:28
2
Solved
I am trying to observe both the startup and shutdown events for a CDI web application. I have an ApplicationScoped bean that listens for those events:
@ApplicationScoped
public class PrettyfacesSt...
Sideswipe asked 22/8, 2010 at 4:25
© 2022 - 2024 — McMap. All rights reserved.