weld

Stateless EJB implements interface injection failed

本秂侑毒 提交于 2019-12-09 03:26:26
问题 Wildfly 8.2.0 I have a Stateless EJB and an interface. @Local @Stateless public class Bean implements IBean{ ... } @Local public interface IBean { ... } But I get a WELD Error. If Bean doesn't implement the interface there is no errors. According to https://stackoverflow.com/a/13988450/2023524 and https://blogs.oracle.com/arungupta/entry/what_s_new_in_ejb there should be no error. Error: WELD-001408: Unsatisfied dependencies for type Bean with qualifiers @Default at injection point

Weld not initializing properly

旧时模样 提交于 2019-12-09 03:06:43
问题 I am setting up basic environment for learning CDI in JavaEE7. I have the following code for starting Weld . Just a startup and shutdown. package com.anshbansal; import org.jboss.weld.environment.se.Weld; import org.jboss.weld.environment.se.WeldContainer; public class Main { public static void main(String[] args) { Weld weld = new Weld(); WeldContainer container = weld.initialize(); weld.shutdown(); } } I am getting following on my console. SLF4J: Class path contains multiple SLF4J bindings.

JSF 2.2 and Spring 4 and CDI on different layers without losing Spring features

孤人 提交于 2019-12-08 20:10:40
I’m a little confused after all articles that I read. I don’t want to use additional services as I’ll need if I use Weld Framework instead of simple Spring qualifier in service layer. And I have one service which uses JavaMailSender. I just want to have ability use AOP in controller layer with JSF. I got absolutely confused after reading about support JSR-229 and JSR-330 by Spring (even Spring 3) Spring 3 And JSR-330 @Inject And @Named Example Does it mean that I can do smth like that and don't lose posibility use Spring features like AOP ? (Yes, I think.) import javax.inject.Inject; import

How to write main() using CDI in Java EE?

强颜欢笑 提交于 2019-12-08 18:21:25
I have a no-client application that I wish to run. It will have no clients but it will make HTTP calls and act as client for other services. It would run for perhaps a few hours or days (but it will not require periodic runs -- just one-shot). I want to run it in a Java EE 7 container, because of the benefits of standard Context Dependency Injection (CD), and a standard JAX-RS client (new since Java EE 7). It is also nice to have services such as JMS, JPA. The question is how do I write / annotate the main method in a standard way? @Inject on a method is no good because such methods must

Jetty Maven plugin (jetty:run goal) + Weld CDI + JSF 2.2 = NPE on ViewScoped beans

核能气质少年 提交于 2019-12-08 12:17:56
问题 Using the following (pretty up to date) components in the web application: Jetty maven plugin 9.2.6.v20141205 Weld CDI 2.2.9.Final Mojarra JSF 2.2.10 The app's web.xml contains the following listeners: org.jboss.weld.environment.servlet.BeanManagerResourceBindingListener com.sun.faces.config.ConfigureListener The first listener registers BeanManager with JNDI. The second listener initializes JSF and looks up for BeanManager in the JNDI. This setup works perfectly ok when jetty maven plugin

CDI and JANDEX and deployment enhancement approach - no speed difference detected

瘦欲@ 提交于 2019-12-08 10:44:56
问题 I am opening this thread as I was requested to do so, in a reply to comment/question i added here: Disable scanning of CDI beans in WAR The question is the following. Is there any specific additional step that one needs to take besides adding jandex to his build pom to get the feature enabled? I notice no deployment speed difference when using jandex on Wildfly 10.1.0.Final and Weblogic 12.2.1.2 deployments. If anything, the deployment tends to be about 1 second slower. Steps taken: 1. Visit

JSF 2.2 and Spring 4 and CDI on different layers without losing Spring features

元气小坏坏 提交于 2019-12-08 03:30:50
问题 I’m a little confused after all articles that I read. I don’t want to use additional services as I’ll need if I use Weld Framework instead of simple Spring qualifier in service layer. And I have one service which uses JavaMailSender. I just want to have ability use AOP in controller layer with JSF. I got absolutely confused after reading about support JSR-229 and JSR-330 by Spring (even Spring 3) Spring 3 And JSR-330 @Inject And @Named Example Does it mean that I can do smth like that and don

Deployment Error Weld-001408 with WLS12c and OEPE

六眼飞鱼酱① 提交于 2019-12-08 02:22:00
问题 I created the following projects in OEPE: weld001408 (Java EE - Enterprise Application Project) weld001408utility (Java EE - Uitility Project), belongs to the ear weld001408 weld001408web (Web - Dynamic Web Project), belongs to the ear weld001408 When I created the project, I didn't change the defaults (onley ear-membership) and the target-runtime is Oracle WebLogic Server 12.1.1. And the clean domain, created with the wizard, is added to the workspace. The Code is the following: utility

Tomcat 7, Weld, RESTEasy not Scanning JARs

∥☆過路亽.° 提交于 2019-12-07 14:16:33
问题 I have Tomcat 7.0.47 and I'm hosting a REST Easy JAXRS service. The service uses two external JARs, one that has a base repository interface and default implementation and one that creates a concrete repository derived from the base (i.e. these two JARs have a dependency). The service works, i.e. I can send a request and get back data from the database. Now what I'm trying to do is get the repository injected into the REST service, to do this I've changed the REST code to look like @Path("

How to bootstrap weld-se in a JUnit test

女生的网名这么多〃 提交于 2019-12-07 08:30:52
问题 I have a maven project for unit tests and would like to use CDI. I've put the weld-se dependency in pom.xml like this : <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> </dependency> <dependency> <groupId>org.jboss.weld.se</groupId> <artifactId>weld-se</artifactId> <version>1.1.8.Final</version> </dependency> <dependency> <groupId>javax.enterprise</groupId> <artifactId>cdi-api</artifactId> <version>1.0-SP3</version> </dependency> I'm bootstrapping