Quantcast
Channel: Java EE Dependency Injection in Websphere Liberty profile - Stack Overflow
Browsing all 4 articles
Browse latest View live

Answer by Emily Jiang for Java EE Dependency Injection in Websphere Liberty...

Although what Scott suggests fixes your problem, here is the full picture about how it works.In CDI 1.2, all applications are CDI enabled by default. If there is an empty beans.xml or a beans.xml with...

View Article



Answer by Scott Kurz for Java EE Dependency Injection in Websphere Liberty...

You can force CDI to treat the servlet as a bean and perform injection by changing the bean discovery mode to all. This article provides some useful background and an example of this:<?xml...

View Article

Answer by Anton Kolyaev for Java EE Dependency Injection in Websphere Liberty...

I'm not familiar enough with EJB, but you could try to add @Stateless or @Service annotation to your Service classpackage my.simple.app;@Stateless//@Servicepublic class HelloService { String...

View Article

Java EE Dependency Injection in Websphere Liberty profile

I am trying to use CDI in my very simple web app that runs in Websphere Liberty profile installed via Docker.However the injection fails unless I specify a scope annotation (e.g. @ApplicationScoped) on...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images