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

Why are my @Inject'ed fields null when using the Converter with @Param?

I've a pretty basic setup here: @Named @ApplicationScoped public class TalentIdConverter implements Converter { @EJB private EntityManagerDao em; @Override public Object getAsObject(FacesContext context, UIComponent component,…
mabi
  • 5,279
  • 2
  • 43
  • 78
4
votes
2 answers

Testing with CDI, mocking a bean

I am wondering how i am doing tests with CDI. and mocking classes during injection. if i have the class: @Named @RequestScoped public class ItemProcessor { @Inject private ItemDao itemDao; public void execute() { List items =…
Trind
  • 1,583
  • 4
  • 18
  • 38
4
votes
1 answer

Is Seam3 and Weld CDI the same thing?

Maybe this seems like a foolish question but I am really confused. Is Seam 3 and Weld CDI the same things? I am reading some posts which refers to "CDI (Weld) / Seam 3", should I consider them as the same thing?
Yashar
  • 1,122
  • 2
  • 15
  • 43
3
votes
1 answer

Specifying a stereotype with a qualifier won't work?

Specifying a stereotype with a qualifier? I can't understand why it seems illegal to include a qualifier when specifying a stereotype? Trying to do so resulted in the following error message: jboss.weld.exceptions.DefinitionException: WELD-001103…
Karl Kildén
  • 2,415
  • 22
  • 34
3
votes
1 answer

Decorator and decorated classes are in different bean archives

My ear application which runs on JBoss AS 7.1.0.Final consists of two jars: lib/one.jar lib/two.jar Both jars are CDI bean archives. The two.jar depends on one.jar. The class beeing decorated is in one.jar. The decorator class is in two.jar If the…
frol
  • 185
  • 8
3
votes
2 answers

CDI on GlassFish 3.1.1 b12 generates error "WELD-001408 Unsatisfied dependencies"

I'm trying to evaluate CDI on Glassfish 3.1 and even though I have accomplished to make it work well, when I'm trying to split my code in separate deployment modules I get a weird error. More specifically: I have two classes bundled in the same…
Keith
  • 31
  • 2
3
votes
1 answer

Using CDI in JSF, Weld or Solder

Hmm I starting with a jsf webapplication, will be using CDI, but am a bit confused between Weld & Solder, or is it that Solder use's Weld under the hood. Also was Weld called WebBeans before ? Like incase of Apache MyFaces it clear that the CDI…
Abdullah Shaikh
  • 2,567
  • 6
  • 30
  • 43
3
votes
1 answer

JSR-299 (CDI) configuration at runtime

I need to configure different @Alternatives, @Decorators and @Injectors for different runtime environments (think testing, staging and production servers). Right now I use maven to create three wars, and the only difference between those wars are in…
nsn
  • 138
  • 2
  • 9
3
votes
2 answers

Weld archetype vs Seam Forge

I'm building a new project using Seam 3. I don't understand what the difference is between Weld archetype and Seam Forge. Both of them help us to build a simple project template to start with.
Vu Pham
  • 33
  • 3
3
votes
3 answers

Java configuration and dependency injection (akin to Springs IoC vs. Weld / Guice)

Lets say I have a class ListCreator which I want to configure. I want to be able to tell it the sort order and the how to output my table. Therefore I have the boolean sortDescending property and the TableWriter interface which is implemented by…
samy-delux
  • 3,061
  • 2
  • 29
  • 32
3
votes
1 answer

Inject CDI Session Bean in Servlet

I'm getting in my project inject (@ Inject) CDI Beans scopes Request and Session in a servlet. The problem is that for session beans CDI I'm not getting that states remain. I try to modify the state of the bean from my servlet but when I try to…
Rafael Soto
  • 165
  • 1
  • 2
  • 8
3
votes
2 answers

Get the real object from CDI Proxy

I looked for a clean CDI solution and not a WELD dependent one but so far nothing... I need to test if every element of a list of objects that I get with @Inject @Any MyInterface beans is a proxy, and when true I need to get the real object to do…
Paolof76
  • 889
  • 1
  • 9
  • 23
3
votes
2 answers

Test DeltaSpike Repositories cannot inject EntityManager

I am trying to run a simple test for DeltaSpike repository. However, I cannot get the Entity Manager injected. I am using producer which is located and test sources: @ApplicationScoped public class EntityManagerProducer { @Produces public…
Adam
  • 884
  • 7
  • 29
3
votes
3 answers

Error when try run Weld Se Applicaton - Weld SE container cannot be initialized - no bean archives found

I create a simple JavaSE app using Weld SE. I'm I try to run with gradle run it throws an exception: :compileJava UP-TO-DATE :processResources UP-TO-DATE :classes UP-TO-DATE :runmai 17, 2016 12:55:55 AM org.jboss.weld.bootstrap.WeldStartup…
alexpfx
  • 6,412
  • 12
  • 52
  • 88
3
votes
1 answer

Arquillian can't @Inject Stateless bean

I have an Integration test with Arquillian 1.1.8 and I am using Wildfly 8.2.1 as container. This is the Test: @RunWith(Arquillian.class) public class FileReaderAndWriterTest { private final MockDataFactory dataFactory = new MockDataFactory(); …
olkoza
  • 715
  • 2
  • 17
  • 35