Posts by Jefferson Borges • 91 points
8 posts
-
0
votes1
answer191
viewsA: Doubts with Crud java CDI
Your User Bean is not being injected by CDI. UsuarioDao usuarioDao = new UsuarioDao(); Use @Inject to inject it, so CDI injects all its dependencies.
-
0
votes1
answer163
viewsA: cdi does not find daos(spring data +ejb+cdi)
The Comentdao dependency of the Livrobusiness class is not eligible for CDI. To make it eligible you can include the Beans.xml file in your project, WEB-INF(War) or META-INF(jar) folder, but this…
-
0
votes1
answer98
viewsA: Subproject dependency injection . jar
The Minhaclasse class is not eligible for the CDI. Make sure you’re using CDI @Requestscoped (javax.enterprise.context). Use @Inject to perform the injection. How an EJB is managed by the container,…
-
0
votes1
answer279
viewsA: how to create a bean that returns an entityManeger
Try using Qualifier @Named in the Entitymanagerfactory class. This way the CDI will have a Bean named entityManagerFactory for the injection.
-
0
votes1
answer318
viewsA: How to use CDI in Webservice?
The class listUsuariosWS has to be managed by the container for the Bean to be injected. Try to give her a scope using EJB: @Stateless or CDI: @RequestScope Note: I don’t know if @Requestscope works…
-
0
votes1
answer74
viewsA: Composite vs. Bean CDI - How to access bean methods
I believe that because it is not a @Manegedbean the JSF scopes did not work properly. Try using one of the CDI scopes: Applicationscoped - The state of the bean remains during the application…
-
0
votes1
answer80
viewsA: Consume . jar in java web project
You must define a class or import the entire package in import: import jardeteste.metodos.*; or import jardeteste.metodos.Teste; You can also directly import static components from the Test class:…
-
3
votes1
answer650
viewsA: Test date at least one day earlier
By zeroing out the hours attributes, you will have exactly midnight tonight. With this, you can check if the date of the parameter is earlier than today. public static void main(String[] args) {…