Sun Java System logo     
Packaging Sample Applications



Packaging Sample Applications


This is the top level document for the packaging samples. This document gives an overview about each individual packaging samples i.e pkgingA, pkgingB, pkgingC, pkgingD and pkgingE. The idea of these packaging samples is to demonstrate different ways of assembling and packaging an enterprise application using Sun Java (tm) System Application Server version 7.

This sample application document contains the following sections:

Prior to installing the Packaging samples, review the Getting Started guide, which includes a checklist of pre-requisites for deploying the sample applications to the Sun Java (tm) System Application Server. The Getting Started guide is available at <install_root>/docs/getting-started/index.html



Overview



The packaging samples demonstrate a number of methods in which applications and components can be packaged and deployed to the Sun Java (tm) System Application Server.

Each of the samples in this section calculates the Simple Interest and the Compound Interest. As you work with samples from A to E, the samples become progressively more complex in their packaging structure. All of the samples reuse the same EJB source code and helper classes. Each sample has its own WAR module (static files, JSPs and servlets). This is intended to simulate a real world scenario where business logic (stored in EJBs) and libraries are reused by different client applications.

A summary of the Packaging Samples is described in Table 1.


Table 1    Summary of Packaging Samples

Item

Sample A

Sample B

Sample C

Sample D

Sample E

WAR to EJB JAR Access  

X  

X  

-  

X  

X  

Multiple WARs  

-  

X  

-  

-  

-  

Multiple EJB JARs  

-  

X  

-  

-  

-  

Module-based Registration  

-  

-  

X  

-  

-  

RMI/IIOP Access  

-  

-  

X  

-  

-  

WAR Access to Resource File  

-  

-  

-  

-  

X  

WAR Access to Library  

-  

-  

-  

X  

-  

EJB JAR Access to Library  

-  

-  

-  

X  

-  



Code Structure



The packaging samples are structured to demonstrate several ways in which a single code base can be packaged into an application. All the samples share the same source code for EJBs and helper classes.

The common code is in the directory: <sjsas_install_dir>/samples/packaging/components

The source code for all EJBs is under: <sjsas_install_dir>/samples/packaging/components/ejb/

The source code for the shared library classes is under: <sjsas_install_dir>/samples/packaging/components/lib/

Each sample includes WAR content in its own source directory. For example, the pkgingA sample houses all static files and JSPs in the following directory: <sjsas_install_dir>/samples/packaging/pkgingA/src/docroot

All servlets are housed under: <sjsas_install_dir>/samples/packaging/pkgingA/src/samples/packaging/pkgingA/servlet.



Copyright © 2002 Sun Microsystems, Inc. All rights reserved.

Last Updated August 13, 2002