Pritam Banerjee Pritam Banerjee - 4 months ago 62
Java Question

Why do we need the following jboss jar for EJB 3.2 in Wildfly?

This might be a silly question. But I have a doubt, why do we need the following dependency to run EJB in Wildfly?


Do we have something similar which is customizes for Wildfly?


Actually, you just need this maven dependency so your code can compile successfully during maven compile phase. For example, EJB annotations such as @Stateless are provided by it.

I use to declare this maven dependency instead for my Java EE 7 projects, so the whole bunch of JEE specs are available :


Finally this maven dependency has to be declared with "provided" scope as you don't need it within your package. Indeed it is already provided by Wildfly, as described in this documentation: Implicit module dependencies for deployments