Examples for creating a portable CDI Extension (like this) all use the javax.enterprise.inject.spi.Extension extension point to allow the ServiceLoader to load the Extension. Is there a Weld/CDI API/SPI to register the Extension dynamically, programm
Where does the NullPointerException reported in the Glassfish log originate? The ConverterServlet seems to have dollar as a BigInteger number, non-null. If ConverterBean would simply log the dollar amount that would be at least a step in the right di
I have a web application with JAX-RS, CDI and EJB. In each resource I inject a Stateless SessionBean, and my question is whether it is possible to inject the same instances into a provider of JAX-RS and the Stateless SesionBean. I am trying to pass s
I am trying to build a simple REST service, using JAX-RS, that will perform the standard CRUD operations on a database table. I am able to successfully query for records, but I cannot insert new ones. I do not get any errors and when I step through t
I am running an integration test using Arquillian in an EAR file that uses CDI and JMS where I am dependent on the results of JMS eventing for the integration tests. I found that I cannot control when the JMS eventing occurs. Sometimes, JMS eventing
Saying in a nutshell I would like to put in custom scope particular instance of Configuration class from rest request. Main problem is that custom scope (JobScoped from JBeret https://jberet.gitbooks.io/jberet-user-guide/content/custom_cdi_scopes/ind
I have a Class with fields annotated with @Inject. I instantiate the Class using reflection, but I want the CDI to inject instances to do the Class instance fields. Is there a way of doing it? Object myInstanceWithDependecies = Class.forName("com.pac
I am using tomee server to run my javaEE app. I have written a filter which injects an object. However the object does not seem to get instantiated : Following is my code : Filter.java @Priority(value = 2) @Provider @Singleton public class Filter imp
I'm using Wildfly 10.0.0 Final, Java EE7, Maven and JPA 2.1. When I am querying my database for records it works fine and lists out the employees, but when I am trying to persist a new employee it gives me the following exception: javax.servlet.Servl
On WildFly 8/10, I have a simple SLSB firing a CDI event: @Stateless @Remote(CDITestRemote.class) @Local(CDITestLocal.class) public class CDITestBean implements CDITestRemote, CDITestLocal { @Inject private Event<IVolumeEvent> events; @Override publ
I have the following scenario in my code base: //this bean, which will be injected, //is not annotated public class HelperUtil { //only default constructor with no args public void doThis(String _in) { //... } public void doThat() { //... } } In the
I'm trying to dynamically load dataSet accordingly to an user session attribute, which I inject and set it as a parameter in a namedQuery. The namedQuery works fine, but I'm not getting the dataSet as desired. I mean, when the session attribute is 98
I do a small test project with CDI. My application is composed of an EJB EAR and WAR, all deployed on Glassfish 4. I'm using Hibernate 4.3.4 to access the database. My goal is to verify that a class in an EJB (DAO) can receive an injection of an Enti
I am having trouble implementing a Login interface like the example Simple CRUD Web Application with JSF 2.1, PrimeFaces 3.5, EJB 3.1, JPA (ORM) / EclipseLink, JAAS , MySQL On TomEE's mailing list, I have been told that the LoginController.java I am
I have an application, which has multiple modules and various dependencies. When I deploy the application on Glassfish 4, I am getting error: org.jboss.weld.exceptions.DeploymentException: WELD-001414 Bean name is ambiguous. Name JerseyClassAnalyzer
I have the impression that CDI is not working with classes that have a @javax.faces.component.FacesComponent. Is this true? Here's my example, that doesn't work. The MyInjectableClass is used at other points in the code where injection is not a probl
I am trying to learn the new technologies CDI + JPA + EJB + JTA + JSF so, i have downloaded the sample project from JBoss-Community--> jboss-as-kitchensink(from JBoss in my Eclipse juno). I am Trying to connect the kitchen with my PostgreSQL database
i have a question about how to deploy multiple jars which contains CDi implementations together with a webapp. This is my Jar Structure -------- ---------- ------------ | WAR | <-- | API Jar | <-- | Data Jar | -------- ---------- ------------ ^ | --
Can
[email protected] be used when no http-session is available (for example when a RESTful-WS is used?). And if not, is there an alternative to @SessionScoped? I'm asking because I need to have an application-state but I'm also forced to use JAX-RS
I would like to develop an application with CDI (I use Spring usually) to discover this technology. I have read many articles about CDI to learn how it works. I have a simple question about transaction management (for persistence in database for exam
I have a JSF project targeted on WebSphere Application Server 8 and I tried to use the CDI concept. I have a /WEB-INF/beans.xml like: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://java.sun.com/xml/ns/javaee&
I have a DTO which has a list. I want to add new rows to datatable when user clicks add button. But when I click add the dto i.e constructor is called and value is initialized and list size is 0. The bean is conversation scoped. Should I start and en
I build a short page with JSF-Compnents which displays and increments a value from a @ConversationScoped Bean. This page is able to end the Conversation and is getting a new Bean after ending the old Conversation. Here is what it looks like: <!DOCTYP
I wrote a simple program in java web forms but i am receiving the following error: WELD-000072 Managed bean declaring a passivating scope must be passivation capable. Bean: Managed Bean [class BeanPakage.DemoBeans] with qualifiers [@Any @Default @Nam
I have a Resource Handler that needs to access lower level beans that work in conversation scope. Our application allows multiple login sessions on different browser tabs working within the same browser session by keeping the login details at this sc
QuestionCommonBusiness public interface QuestionCommonBusiness { void create(Question question); void update (Question question); void delete(Question question); Question read(Integer id); List<Question> all(); } QuestionLocalBusiness public interfa
My main problem is that I want to use myfaces jsf implementation and because of that, I have to use delegate=false in glassfish-web.xml. This ends up in loading classes from my application first and then look at the server libraries. When I use hiber
currently i am trying to remove a ConversationScoped Stateful Session Bean (SFSB). The ConversationScope is managed by the CDI Container and the lifecycle of the SFSB is managed by the EJB Container. Is this correct? In my Controller i'm trying to en
In order to get RequestFactory to persist attached entities, I need to ensure that I use the same EntityManager for each request. I cobbled together my own Factory class for this based on a ThreadLocal implementation, but I'm unsure how to properly r
I'd like to use multiple instances of the same CDI Named bean in a JSF2 page. (Imagine I have a backing bean to access a contentmanager category, but I want to show multiple categories in the same JSF page) I wonder how can I "override" the defa