Pritam Banerjee Pritam Banerjee - 1 year ago 97
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?

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download