Questions tagged [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)

See http://seamframework.org/Weld

592 questions
0
votes
1 answer

Weld: Inject dependency inside Thread J2EE

I'm currently going into a huge problem and any help would be highly appreciated. First of all, the following is occuring in a J2EE environment and I know I shouldn't be managing a Thread myself, but unfortunately I can't change that nor use EJB.…
luanlucas
  • 29
  • 6
0
votes
1 answer

Bean Validation (ConstraintValidator) + CDI + Tomcat 8: HV000028: Unexpected exception during isValid call

In a JSF application running on Tomcat: Using @Inject in a ConstraintValidator results in a javax.validation.ValidationException: HV000028: Unexpected exception during isValid call. Elsewhere in the application, CDI works without errors. The…
jhead
  • 11
  • 2
0
votes
0 answers

CDI lifecycle callback AFTER the class is put into service

Is there a CDI callback like @PostConstruct but that is instead invoked after the class is put into service? I have a UserDAO that injects a EntityManager and a EJB UserBean that injects the UserDAO, which is invoked remotely. When the…
ethanxyz_0
  • 713
  • 12
  • 37
0
votes
1 answer

Resolving ambiguous dependencies with CDI extension

I am trying to modify our existing CDI extension which creates its own proxy beans. Now there is only a single proxy created for each service. Services have something like application scope so there is always only a single instance of a…
livthomas
  • 1,160
  • 1
  • 14
  • 25
0
votes
1 answer

CDI definition failure:WELD-001476: Interceptor [class] must be @Dependent

I'm trying out the APM MoSKito and been trying to deploy the embedded Web UI that will be mapped to [context]/mui/* where the MoSKito interface will be shown. The problem is that I get the following error when deploying app: CDI definition…
Esteban Rincon
  • 2,040
  • 3
  • 27
  • 44
0
votes
1 answer

CDI (Weld SE) not injecting inner dependencies when using Producer method

I'm using WELD SE on a standalone java project which seemed to work fine till I started using producers. The producer method works - the container uses it, but never injects the inner pdependencies of the produced bean. When I remove the producer,…
Valerio Lopes
  • 79
  • 1
  • 9
0
votes
1 answer

JBoss EAP 6.2 CDI beans.xml

I've got a simple question about getting cdi running in JBoss EAP 6.2 Pojos that are injected with @inject (from javax.annotation) are always null. The only thing I can find is that I need to add a beans.xml. I added that in de META-INF folder of my…
bergvandenp
  • 186
  • 1
  • 1
  • 8
0
votes
1 answer

Spring Elasticsearch data repository in Weld SE CDI - UnsatisfiedResolutionException

I am trying to inject Spring data repository (Elasticsearch in this instance) in SE application, using Weld SE. Repository public interface EmployeeRepository extends ElasticsearchRepository { List findEmployeesByAge(int…
Sarpy
  • 265
  • 1
  • 7
  • 18
0
votes
1 answer

JBOSS Asynchronus transactional method call AFTER_COMPLETION event - WELD-000401

I call asynchronus transactional method and observe transaction commit event. Method ends sucessfuly, but instead of execution onTransactionCommit method i receive: WELD-000401 Failure while notifying an observer of event JBoss EAP 6.4.0.GA (AS…
Atmega
  • 131
  • 4
0
votes
1 answer

How to bind a singleton bean in weld + jersey + javaSE

My app needs to register with another app. The registration status needs to be available on a REST resource. How to bind/register a singleton object in weld? The registration process has to happen irrespective of whether the status endpoint is…
Dhana Krishnasamy
  • 2,126
  • 17
  • 36
0
votes
1 answer

PAX-CDI: how to get reference to BeanManager in bundle without using CDI

There is a bundle A and threre is a class MyClass in bundle A. And we suppose that pax-cdi+weld is on. Can can I get reference to BeanManager of the bundle A inside MyClass without using @Inject and other CDI annotations? Via osgi service? Or how?
Pavel_K
  • 10,748
  • 13
  • 73
  • 186
0
votes
1 answer

Update Weld version in Apache jetty

I am using Apache Jetty 9.2.10 which uses weld weld-servlet-2.2.5.Final.jar. Is it possible to update weld version to the last release? I did not find a procedure to update jetty modules in its documentation.
Marco Stramezzi
  • 2,143
  • 4
  • 17
  • 37
0
votes
1 answer

Can't make weld scanning beans

I must have missed something but I can't make Weld working ! It's a simple webapp, one servlet, one service (that i'd like to inject in the servlet) here are the files : pom.xml org.jboss.weld.servlet
Seb
  • 3,602
  • 8
  • 36
  • 52
0
votes
0 answers

Interceptor and ParametrizedType CDI

I'm trying to inject a interceptor in my BackingBean, see: @SimpleAsync @Interceptor public class SimpleAsyncImpl implements Serializable{ /** * */ private static final long serialVersionUID = 1L; @Inject ScheduleManager…
Ronaldo Lanhellas
  • 2,975
  • 5
  • 46
  • 92
0
votes
0 answers

Dependency injection of generic type: producer not recognized

Situation: I have an Entity interface, some entity implementations, and a Repository interface, of which I want to produce injectable instances with CDI in the following way: @Inject @Generic private Repository repository; During…
Peter Walser
  • 15,208
  • 4
  • 51
  • 78