Summary

In this chapter we've looked at packagingJ2EE applications and the issues involved in deploying applications to an application server.

We've seen that the most complex issues in application packaging relate to class loading when we use EJB. J2EE servers use multiple class loaders. Many application servers use a separate class loader for EJBs and web application classes, meaning that we may face problems with classes used in both EJB JARs and WARs. Differences in class loading behavior between application servers mean that deployment units are not always portable.

We've examined class loading behavior as defined by J2SE and the J2EE specifications. We've also considered class loading behavior in several application servers.

We've seen several practical options for application packaging, and concluded that the best approach is usually to use the J2SE 1.3 manifest classpath mechanism to enable JAR-format files such as EJB JAR files to declare dependencies on other, library, JAR files. We've illustrated this by looking at the packaging of the sample application, and how the infrastructure classes discussed in previous chapters can be packaged into four JAR files referenced by application deployment units.

We've also looked at the server configuration required to underpin any J2EE deployment, such as the definition of RDBMS data sources and JMS destinations.

We've seen how we typically need proprietary, server-specific deployment descriptors to map resources referenced in the standard deployment descriptors onto resources defined in server configuration.

Finally, we've taken a practical look at deployment through the process of deploying the sample application on JBoss 3.0. We've seen how the Ant build tool can be used to automate and simplify all aspects of application packaging and deployment.

Note 

The J2EE Deployment API Specification (http://java.sun.com/j2ee/tools/deployment/) may make application deployment more consistent between application servers, but does not address packaging issues or standardize the definition of resources such as DataSources.



Expert One-on-One J2EE Design and Development
Microsoft Office PowerPoint 2007 On Demand
ISBN: B0085SG5O4
EAN: 2147483647
Year: 2005
Pages: 183

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net