Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 8. Integrating with the Backend > Setting up the Java EE application st...

Setting up the Java EE application structure

In a typical Java EE application, persistence services reside in their own archive. They are referred to as an EJB JAR (Enterprise JavaBean JAR). In order to let our web application (the View and Controller) and the persistence services (the Model) easily work together, both the EJB JAR and our previously-generated WAR are wrapped within a single Enterprise Archive (EAR). So let’s first create a skeleton EJB JAR and EAR.

Creating a skeleton EJB JAR

An EJB JAR is nothing more than a simple JAR that contains Java classes in a package structure. What distinguishes an EJB JAR from a normal JAR is the fact that there are some extra files in the META-INF directory inside the JAR file. In a normal JAR file, this directory only contains the MANIFEST.MF file. In an EJB JAR, the META-INF directory also contains some extra files. See the following table for an overview:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint