<a name="78"></a><a name="wbp03Chapter2P1"></a><span>Chapter 2: </span> J2EE Deployment Concepts - Professional Java Tools for Extreme Programming [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Professional Java Tools for Extreme Programming [Electronic resources] - نسخه متنی

Richard Hightower, Warner Onstineet al.

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید











Chapter 2: J2EE Deployment Concepts


Overview


Chapter 6, "Building J2EE Applications with Ant," we use Ant to create Java ARchive (JAR) files, Web ARchive (WAR) files, and Enterprise JavaBean (EJB) JARs, so you will need to have a background in the various deployment descriptors for these modules. If you already have considerable experience with J2EE applications, you may want to skip to Chapter 3, “Storing and Managing Code with CVS.”

The J2EE platform provides component models for assembling applications. J2EE lets you “divide and conquer” an application by buying and building components and wiring them together into an application. Java and J2EE support the following components:



Client Components



JavaBeans



Applets





Web Application Components



Servlets



JSPs



TagLibs





Enterprise JavaBeans



Session beans



Stateless session beans



Entity beans





Each component executes in a container. To interoperate with various containers, these components require deployment descriptor files, configuration files, property files, and/or metadata files, and other configuration files. All these files describe the components and how they will interact with other components and their container environment.

Deployment can be a complex matter. A typical deployment might involve creating an Enterprise ARchive (EAR) file that can contain JAR and WAR files. The JAR files can in turn contain enterprise beans. The WAR file can in turn contain Web components (servlets, TagLibs, JavaBeans, and JSP), HTML pages, images, Java class files, and other JAR files that contain application components (JavaBeans, client-side remote references to enterprise beans and applets). The deployment descriptor for a Web application (which we will cover later) may contain env-entry elements that are mapped to the Java Naming and Directory Interface (JNDI) names java:comp/env (the context), ejb-ref (describes enterprise beans), and resources-ref (maps Java Messaging Service, Java Database Connectivity, and mail resources so that the Web application can use them).

The next two figures show the block diagrams of the two J2EE applications that we build, test, and deploy throughout this book (see Appendix A, “Example Applications Used in This Book” for details on these applications). The first figure shows our HelloWorld application, and the second shows the pet store application. As you can see, several different types of components need to be deployed to multiple servers and containers.


chapters 5 and 6 we will use Ant to help facilitate this process. Otherwise, continuous integration would be pretty tough with the complexities of the J2EE deployment environment.

The remainder of this chapter describes the basic J2EE components and how they are deployed. We also explain the JAR file format, because many components and sets of components are packaged in either a JAR file or some variation of a JAR file.

/ 228