Chapter 11. Packaging EJB 3 applications

 

This chapter covers

  • Class loading concepts
  • Packaging EJB 3 components
  • Packaging EJB 3 entities
  • O/R mapping with XML
  • Deployment issues and best practices

In the previous chapters you learned how to build a business-logic tier with session and message-driven beans, and you used entities to support the persistence tier. The real success of Java EE applications lies in assembly and deployment, as this is the key to delivering on Java’s promise of write once, run anywhere (WORA). If you fail to fully grasp this step, your application may not realize this level of portability.

A typical application has a handful of Java classes, and maintenance can be a nightmare if you are shipping your applications from one environment to another. To simplify maintenance you can create a Java archive (JAR) file. Typically, a JAR


Java platform roles: it’s all about juggling hats

The Java EE platform defines different roles and responsibilities relating to development, assembly, and deployment of Java EE applications. In this book we are mainly interested in the Developer, Assembler, and Deployer roles, but we introduce you to all the roles so that you can be familiar with them. The roles defined by the specifications are

  • Enterprise Bean Provider
  • Application Assembler
  • Deployer
  • EJB Server Provider
  • EJB Container Provider
  • Persistence Provider
  • System Administrator

11.1. Packaging your applications

11.2. Exploring class loading

11.3. Packaging session and message-driven beans

11.4. Packaging entities

11.5. Best practices and common deployment issues

11.6. Summary

sitemap