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
7
votes
1 answer

WELD-001318 Cannot resolve an ambiguous dependency

I am getting an error when deploying my application as follows.. Caused by: org.jboss.weld.exceptions.AmbiguousResolutionException: WELD-001318 Cannot resolve an ambiguous dependency between [ Producer Method [String] with qualifiers [@Any @Config]…
Peter Vanleeuwen
  • 327
  • 3
  • 10
7
votes
2 answers

Dynamically fire CDI event with qualifier with members

I'm trying to use CDI events in my backend services, on JBoss AS6 - ideally with maximum code reuse. I can see from the docs I can cut down on the qualifier annotation classes I have to create by using a qualifier with members…
Ben Kirby
  • 904
  • 2
  • 11
  • 29
7
votes
1 answer

Injecting generic Beans with CDI/Weld

I just come from my tiny nice JavaSE/Guice world and am currently discovering the path of "carried by the container"-EE6. After having some trouble with Glassfish3.1, I just switched to JBoss and am now facing a problem that shouldnt be one. As…
dwegener
  • 482
  • 5
  • 15
7
votes
3 answers

Inject a stateless EJB with @Inject into CDI Weld ManagedBean (JSF 1.2 EJB Application on jboss 6 AS)

Currently I am trying to inject a stateless EJB into a CDI managed controller on Jboss 6 AS Final. The controller is managed in the context an accessible from the JSF pages. If I inject the stateless bean with @EJB it is working. If I inject the…
ich-bin-drin
  • 543
  • 3
  • 12
  • 23
7
votes
3 answers

Unsatisfied dependencies with Weld during integration testing

I am able to deploy a RESTEasy application working well with Weld (meaning my CDI works) but I am having some trouble with my integration tests. I get this error: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies…
Maxime Laval
  • 4,068
  • 8
  • 40
  • 60
7
votes
2 answers

Can CDI be lessened towards Java SE?

JSR-330 dependency injection can be applied to both Java SE and Java EE environments, while JSR-299 is titled "Contexts and Dependency Injection for the Java EE platform". Except strictly Java EE-oriented features, what CDI features make sense on…
sof
  • 9,113
  • 16
  • 57
  • 83
7
votes
1 answer

CDI/Weld unable to do constructor injection of RESTEasy resource

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 RESTEasy application class looks like: public class…
Marcel Overdijk
  • 11,041
  • 17
  • 71
  • 110
6
votes
1 answer

How do I combine @Asynchronous and Weld/CDI Events and @Observes(during=TransactionPhase.AFTER_COMPLETION) in Glassfish 3.1

First of all let me state, that the following code example worked just fine in GF 3.0.1. The troubles started when we switched to GF 3.1. I'm using a method @Asynchronous public void executeFlowStep( …
Michael
  • 61
  • 2
6
votes
1 answer

Inject String with qualifier in CDI

I'm trying to do simple thing. Inject qualified String (or File) in CDI. So I have a qualifier: @Retention(RetentionPolicy.RUNTIME) @Target({FIELD,METHOD,PARAMETER,TYPE}) @Qualifier public @interface FilesRepositoryPath {} I have a producer: public…
amorfis
  • 15,390
  • 15
  • 77
  • 125
6
votes
2 answers

CDI - Observing Container Events

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 PrettyfacesStartupObserver { private static final Log LOGGER…
Walter White
6
votes
1 answer

"Unable to convert ejbRef for ejb" on CDI (Weld) injection of @Stateless EJB into @SessionScoped JSF2 bean in Glassfish

[UPDATE: After discussion on the Glassfish forums/ML at http://forums.java.net/jive/thread.jspa?messageID=480532 a bug was filed against Glassfish https://glassfish.dev.java.net/issues/show_bug.cgi?id=13040 for this issue.] I'm trying to inject a…
Craig Ringer
  • 307,061
  • 76
  • 688
  • 778
6
votes
3 answers

how to instantiate more than one CDI/Weld bean for one class?

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 parameters..... Are the such features in CDI as well,…
qwertz1123
  • 1,173
  • 10
  • 27
6
votes
2 answers

Resolution of external (3rd party) beans in weld

I know it is still not quite popular, since the spec was released just a few months ago. I haven't "installed" weld yet, I'm just reading, and by this question I want to make sure I've understood this important point correct: Is resolution of beans…
Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140
6
votes
1 answer

Creating and wiring related instances at runtime with CDI

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 (separate) AlgorithmState. ActionExecutor also needs…
palacsint
  • 28,416
  • 10
  • 82
  • 109
6
votes
3 answers

Debugging's step into won't work on own code: MyClass$Proxy$_$$_WeldClientProxy.myMethod() line: not available

When debugging I set a breakpoint to a line that calls a method from another (own) class. On step into I get a Source not found in the editor with the title MyClass$Proxy$_$$_WeldClientProxy.myMethod() line: not available in the stacktrace. I can…
Lester
  • 1,830
  • 1
  • 27
  • 44