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

375 questions
0
votes
3 answers

Ambiguous dependency while using @Produces annotation

I have been studying @Produces annotation of CDI dependency injection from here. I just created my own same example. However, I am facing with ambiguous dependency. public interface Bank { public void withdrawal(); public void…
quartaela
  • 2,289
  • 14
  • 52
  • 89
0
votes
1 answer

Migration from singletone to java ee injection

I have Jboss AS 6.1 and war and sar applications on it. I use cassandra. So i need managers to access database and cache database objects for fast access. So i did it in such a way: public class AsaBlackSubsManager extends…
Alex Belov
  • 111
  • 4
0
votes
1 answer

CDI @ApplicationScoped

I have an on Object with an annotation @ApplicationScoped public class DbGraphConnectionLocator implements ServerStopTask { ... } This object create an embedded database. I have tried to create an hook to shutdown database when i redeploy the…
Antimo
  • 431
  • 7
  • 17
0
votes
1 answer

Java Weld CDI alternative Factory

In my production code I have an factory, this factory should be mocked in my test code. I have an interface which both factories implement: public interface FtpTransferFactory { FtpTransfer createFtpTransfer(String host, String…
Velth
  • 1,068
  • 3
  • 14
  • 28
0
votes
2 answers

CDI Unit Test fails with unsatisified dependency Exception for Qualifier Type

Hi I have a following Qualifier Type defined.. @Qualifier @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.TYPE, ElementType.FIELD }) public @interface SortAndFilterType { /** * The value for the sort and filter. * * @return the sort…
0
votes
1 answer

Configure log4j when using Weld CDI

I'd like to programmatically adjust my logging file locations. Thus I want to overwrite the default values in my log4j.properties file. This is not opposing any problems I am using LogManager.resetConfiguration() and…
Velth
  • 1,068
  • 3
  • 14
  • 28
0
votes
1 answer

Jboss as7 to WildFly migration weld unsatisfied dependencies for type

I'm trying to migrate a jboss as 7 application to WildFly. For some reason I am getting the weld unsatisfied dependencies for type Set. For just about every class that uses the @Inject (Using guice). I can not think of any way for solving this and…
David Limkys
  • 4,157
  • 4
  • 21
  • 36
0
votes
2 answers

JBoss AS 7 throwing 'java.lang.reflect.MalformedParameterizedTypeException' during start

I'm using JBoss 7.1.3 (built from sources) with Ubuntu 13.10 64 bits and open-jdk 7. And all the application works fine. Works fine with other developers using Windows and other Linux too (with java 7 from Oracle and OpenJDK). Now I'm trying to…
ethanxyz_0
  • 573
  • 7
  • 31
0
votes
2 answers

jbpm6 example application rewards-jsf deployment error

I am getting below error when deploying rewards-jsf application. Please advise. 07:18:41,768 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service…
user2848031
  • 193
  • 9
  • 31
  • 63
0
votes
1 answer

The part interface is not working with JBoss Weld in Tomcat 7?

I wrote code to get part data from a Servlet request for file upload, but the part list returns zero size. I use JBoss Weld in the JEE project. But if I remove the Weld configuration from the web.xml file, then it's working fine. The web.xml…
samik
  • 1
  • 1
0
votes
1 answer

Combining Arquillian, JUnit, Servlet 3.0 and Weld

I'm trying to get all these disparate things working together for some unit testing. So the basic program structure is simple Servlet 3.0 running on TomCat as a WebApp maven archetype. Using Weld as an implementation of CDI to inject service objects…
Iain
  • 29
  • 1
  • 9
0
votes
1 answer

Error in private access of CDI injected outer class from static inner class

I have (in a minimalistic version) the following CDI managed beans in JBoss EAP 6.0.1 @ApplicationScoped public class Outer { private final List values = new ArrayList(); public void printValues() { …
Gandalf
  • 2,321
  • 17
  • 28
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
  • 413
  • 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: