0
I would like to know what this log is about.
[org.jboss.as.ejb3.deployment] (MSC service thread 1-5) WFLYEJB0473: JNDI bindings for session bean named 'ContaService' in deployment unit 'deployment "Backend.war"' are as follows:
java:global/Backend/ContaService!com.hybridnetwork.service.ContaService
java:app/Backend/ContaService!com.hybridnetwork.service.ContaService
java:module/ContaService!com.hybridnetwork.service.ContaService
ejb:/Backend/ContaService!com.hybridnetwork.service.ContaService
java:global/Backend/ContaService
java:app/Backend/ContaService
java:module/ContaService
I noted it as a simple stateless:
@Stateless
public class ContaService {
public List<ContaDTO> list() {
return Collections.emptyList();
}
}
I injected it this way:
@Path("contas")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public class ContaRest {
@Inject
ContaService contaService;
@GET
public Response listarTodos() {
return Response.ok(contaService.list()).build();
}
}
Hi Yan! Instead of using the image, put the text log in your question. Think that if someone has a problem similar to yours they won’t be able to find this question of yours and see the answer if you use an image to explain your problem.
– Dherik
Thanks for the feedback, the log is there ;)
– Yan P. Gabriel
how is the Contaservice ? class published? How did you inject this class?
– Erick Luz
In addition to correcting the question posted the details requested, thank you for the feedback also ;)
– Yan P. Gabriel
For testing, modify the annotation
@Inject
for@EJB
in classContaRest
, if it works I put the solution as answer, you created the interface of theContaService
?– Erick Luz