Doubt about Javaee with Wildfly 18

Asked

Viewed 30 times

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();
    }

}

Folder structure used: inserir a descrição da imagem aqui

  • 2

    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.

  • 1

    Thanks for the feedback, the log is there ;)

  • 2

    how is the Contaservice ? class published? How did you inject this class?

  • In addition to correcting the question posted the details requested, thank you for the feedback also ;)

  • For testing, modify the annotation @Inject for @EJB in class ContaRest, if it works I put the solution as answer, you created the interface of the ContaService ?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.