What is an EJB module in Java EE 6?

When I go to create a new Java EE 6 project in eclipse, I see a bunch of project types ....

  • Enterprise application
  • EJB module
  • Enterprise Application Client
  • Packaged Archive

What are these different types and what do they mean?

+8
java-ee java-ee-6 netbeans
source share
2 answers

EJB module creates. JAR containing your entire java beans enterprise.

An EAR file must contain at least one JavaEE module; an EJB is a JavaEE module.

+6
source share

Java Enterprise Edition considers the following types of applications:

  • Web application. It consists of servlet, JSP, HTML, CSS, images, etc. The main goal is the user interface level. These applications run through WebContariners such as Tomcat, the full Java EE Application Server must provide a web container for deploying such applications. Finally, the deployment artifact is the WAR archive.
  • EJB app. This is compiled by Enterprise Java Beans (Stateeless, Statefull, Message Driven) that provide you with the tools you need to build the Bussines logic level. These applications run through EJB containers (EJB applications that do not require Tomcat), a full Java EE application server must provide an EJB container for deploying such applications. Finally, the deployment artifact is a JAR archive.
  • Corporate application. It is a kind of shell for web and EJB applications. You can incorporate them inside many Web or EJB applications. To deploy an Enterprise Application, you need a complete Java EE application server (Glassfish, JBoss, Weblogic, etc.). The artifact for deployment is an EAR file. Eclipse and Netbeans manage web and EJB applications as modules, so you can group them later in Enterprise Applications

Finally, the Java EE 6 specification defines a web profile scheme for application servers. This web profile allows you to include EJBs in web applications (with some restrictions). For example, the TomEE project combines Apache Tomcat with Apache OpenEJB to provide a Web profile compatible server.

+15
source share

All Articles