jboss-weld

Can CDI be lessened towards Java SE?

China☆狼群 提交于 2019-12-21 11:28:35
问题 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 Java SE as well? Any examples available? Thanks! [Revised] Here's Weld on JSE. 回答1: Except strictly Java EE-oriented features, what CDI features make sense on Java SE as well? Any examples available? Thanks! Well, the one mentioned in the Weld

What is Weld, JSR-299?

醉酒当歌 提交于 2019-12-21 03:24:08
问题 I've found lots of tutorials showing Weld code samples, but not an introductory overview. Could you please suggest an introductory article, or answer the following: What does Weld do/give you? How does it relate to Java EE 6? How would one use it in a Java EE 6 project? If one uses it in a Java EE 6 project, what is it supplanting, if anything? 回答1: What does Weld do/give you? Weld is the reference implementation of the abstract JSR-299 API, which is better known as CDI, Contexts and

What are the best debugging tricks with Weld/CDI?

时间秒杀一切 提交于 2019-12-20 09:21:43
问题 One of the beauties with Java EE 6 is the new dependency injection framework - CDI with the Weld reference implementation - which has prompted us to start migrating internally to JSR-330 in an implementation agnostic manner, with the explicit target of being able to have a core jar which is frozen, and then being able to add extra jars providing new modules replacing functionality in the core jar. I am now in the process of making the above work with Weld, and to be frank there is simply too

How to inject objects of the same class with different scopes?

时光总嘲笑我的痴心妄想 提交于 2019-12-20 06:25:01
问题 In terms of simplicity and correctness, what is the best way to inject objects of the same class with different scopes? In a servlet I want to have injected objects of the same class with different scopes. Still don't know if going to use jsf. Simplicity: Making a Qualifier and a producer method for each scope is too much; making an interface, two classes and adding and alternative in beans.xml is also too much; having an Address#isCurrent() method doesn't make sense. Correctness: JSR299, 3

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

佐手、 提交于 2019-12-19 06:46:20
问题 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, namely is it possible to create different instances of the same class with different initialization parameters? Is it also possible to create a bean without changing the class....I mean without adding annotation? ADDED Let me make an example. <bean id=

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

陌路散爱 提交于 2019-12-19 06:46:08
问题 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, namely is it possible to create different instances of the same class with different initialization parameters? Is it also possible to create a bean without changing the class....I mean without adding annotation? ADDED Let me make an example. <bean id=

Weld on WebSphere 8

余生颓废 提交于 2019-12-14 01:29:10
问题 Is it possible to replace WebSphere 8's CDI provider (OpenWebBeans) with Weld? Failing that, is there any way to simply disable CDI altogether in WebSphere? Why would I need this? We have a project that was developed against Weld, and unfortunately we've found that it relies on a number of Weld idiosyncrasies. We're able to successfully bootstrap Weld via org.jboss.weld.environment.servlet.Listener in Tomcat and Jetty, but WebSphere's built-in CDI implementation seem to be interfering. 回答1:

Weld injection failing when calling a method from an super/abstract class with Wicket

眉间皱痕 提交于 2019-12-13 18:58:42
问题 I am having a problem with weld-wicket. When @Inject-ing an EJB that inherits from an abstract class, if I attempt to call a method from the abstract class I get an ejb-ref error. However if I call a method from the concrete class it works perfectly. I can override methods and call them, and I can delegate an overridden method to the abstract class (having the overridden method call super.method()) and that works. Is there some sort of configuration I have to do to the abstract class? Thanks.

CDI and WELD in java-web-start APP (java se)

最后都变了- 提交于 2019-12-13 04:12:18
问题 Im trying to use CDI in a Java-web-start app but get stuck at classloading. Looks like FileSystemURLHandler treats the URLs in the web-start cache as files. org.jboss.weld.environment.se.discovery.url.FileSystemURLHandler - could not read entries java.io.FileNotFoundException: http:\localhost:8080\myapp.jar Which is the same as: https://issues.jboss.org/browse/WELD-1040 My limited skills in jira and git-hub suggests that someone started working on it, but it didnt make it into a release:

Wildfly 8.2 + JSF + SessionScoped : sometimes wrong data returned

我与影子孤独终老i 提交于 2019-12-13 01:26:10
问题 In one of our systems in production we encounter a very weird problem in jboss 8.2 and latest JDK 7, centos 7 64 bits, latest primefaces on javax.enterprise.context.SessionScoped beans. (No jsf annotations are used in the whole project, only CDI annotation to avoid potential conflicts) At some point in time (we don't know what triggers it) during the processing of one request the @SessionScoped bean give contradictory informations. Yet the processing occurs always in only one session and one