An application is a logical collection of one or more modules joined by application annotations or deployment descriptors. You assemble components into JAR, WAR, or RAR files, then combine these files into an Enterprise archive (EAR) file which is deployed.
The following figure shows EJB, web, application client, and connector modules assembled into a Java EE application.