Questions tagged [jboss-weld]

Weld is the reference implementation (RI) for JSR-299: Java Contexts and Dependency Injection for the Java EE platform (CDI)

Weld is the reference implementation (RI) for JSR-299: Java Contexts and Dependency Injection for the Java EE platform (CDI). CDI is the Java standard for dependency injection and contextual lifecycle management, a Java Community Process (JCP) specification that integrates cleanly with the Java EE platform. Any Java EE 6-compliant application server provides support for JSR-299 (even the web profile).

http://seamframework.org/Weld

See also

393 questions
0
votes
3 answers

Inject list of service objects in CDI (Weld)

Let's say I have an interface called SocialNetworkService, and multiple implementations - TwitterService, FacebookService and FriendFeedService, MyService etc. Now I want, whenever my managed bean receives a message, to select one/or more…
user390517
0
votes
1 answer

JBoss Weld @Any Instance do not find all instances

I have some problem with injecting dependencies to the project. In my case I have WAR file with some specialized GWT handlers, and jar with dispatcher classes (dispatcher + common: actions, handlers, results). In this jar I try scan all Handlers and…
ggolebio
  • 423
  • 4
  • 9
0
votes
2 answers

Using dependency injection in an existing project

We have an old application which uses modules. The main entry point (main() method) instantiates modules (classes) with reflection based on an XML configuration file, like:
0
votes
1 answer

Weld Instance<> and garbage collector

My question will be quite simple : How to avoid JBoss Weld (1.1.5) to keep references to objects produced by Instance ? Typically, the following code : class B{} class A { @Inject private Instance instanceB; public B produce(){ return…
Rémi Doolaeghe
  • 2,262
  • 3
  • 31
  • 50
0
votes
1 answer

WELD: Two beans cannot specialize the same Managed Bean

I found this error trying to have two beans that specializes a third one in the same project. Even when one is activated through the beans.xml and other doesn't. I haven´t found any reference of this behavior in the documentation and seems very…
Rafael
  • 2,521
  • 2
  • 33
  • 59
0
votes
1 answer

weld-se with StartMain not working

I am trying to make weld-se work in a very simple example, which basically follows this one. However, I can't get it work. I use gradle for building. Here is my build.gradle: apply plugin: 'java' version='1.0-SNAPSHOT' repositories { …
JBT
  • 8,498
  • 18
  • 65
  • 104
0
votes
1 answer

ClassCastException when using Bean Validation with weld

I'm running an application in Tomcat using Weld (org.jboss.weld.servlet:weld-servlet:2.0.2.Final with maven) to produces ValidatorFactory and Validator components like this: @Produces @Default @javax.enterprise.context.ApplicationScoped public…
Otávio Garcia
  • 1,372
  • 1
  • 15
  • 27
0
votes
1 answer

Issues while deploying a seam 2.3 application on jboss 7.1.1 and Weld

I have an application that I'm trying to migrate from seam 2.1 to 2.3, and deploy to Jboss 7.1.1. I have managed to resolve many issues that I faced while doing so. The issue that I'm here to ask about is pertaining to coexistence of seam 2.3 and…
Mustafa
  • 5,624
  • 3
  • 24
  • 40
0
votes
1 answer

Tomcat with unpackWARs="false" fails to deploy CDI Weld based application

I'm a java developer and I'm working on a java based web application project. We're using tomcat 7.0.40 application server. Since I migrated the application to support jsr299 provided by jboss-weld 1.1.10.Final, I'm having troubles with the…
abertschi
  • 41
  • 3
0
votes
1 answer

Declarative conversation management on GlassFish 3, Java EE

I'm relying on @ConversationScoped EntityManagers in one of my applications. However, I now need to access said EntityManagers from outside a conversation (Timer EJB). I read a tutorial on how to write an Interceptor which opens a new conversation…
chzbrgla
  • 5,158
  • 7
  • 39
  • 56
0
votes
1 answer

Weld CDI : Using @Alternative @Singleton

I have a Producers class annotated with @Singleton, containing a method annotated with @Produces. I want to write unit test using an alternative of this method, but can't manage to do it. here's a summary of my code : package…
Rémi Doolaeghe
  • 2,262
  • 3
  • 31
  • 50
0
votes
0 answers

How to discover a CDI producer in a WAR context?

I'm stuck with a CDI problem. I've deployed a war that contains various jars in its WEB-INF/lib folder. One of those jars has a Logger producer (a class with a method which is annotated with @Produces) and some custom qualifier annotations, some…
Andreas Dolk
  • 113,398
  • 19
  • 180
  • 268
0
votes
1 answer

WELD Exception when using SLSB interface

I have a Java EE 6 CDI based application running on JBoss AS 7.1.1 which contains some Session Beans too. @Stateless public class OrderService { @Inject private Logger log; @Inject private EntityManager em; . . . . . } Everything worked…
Max Korn
  • 275
  • 7
  • 18
0
votes
1 answer

How to select between different CDI-bean implementations runtime

I have a messageListener which purpose is to start clients implementing the Client-interface. The different implementations of the Client-interface is not know at compile time. The messageListener uses the Launcher-bean to start the clients. So my…
Aksel Willgert
  • 11,367
  • 5
  • 53
  • 74
0
votes
1 answer

CDI and WELD in java-web-start APP (java se)

Im trying to use CDI in a Java-web-start app but get stuck at classloading. Looks like FileSystemURLHandler treats the URLs in the web-start cache as files. org.jboss.weld.environment.se.discovery.url.FileSystemURLHandler - could not read…
Aksel Willgert
  • 11,367
  • 5
  • 53
  • 74