Chapter 16. Deployment

 

This chapter covers:

  • 16.1 How to survive deployment
  • 16.2 Deploying with Ant
  • 16.3 Database setup in Ant
  • 16.4 Deploying with SmartFrog
  • 16.5 Using SmartFrog with Ant
  • 16.6 Embracing deployment
  • 16.7 Summary

We’ve been deploying web applications since chapter 12. It’s now time to look at deployment in detail—all the way to production. Before we start, we need to revisit the question: What is deployment?

According to application server vendors, deployment is just “deploy-by-copy,” such as copying a WAR or EAR file into a directory. Since all application servers now support this, isn’t deployment done? Hardly. The real problem is not getting the application to the remote machine, or even getting the application loaded by the application server. It is getting the whole system working.

A web site cannot be described as successfully deployed until the database is up and running, the web site can talk to that database, and its pages are externally visible. This is what deploy-by-copy forgets about: copying a file to the application server is a tiny piece of the problem.

Just as we’ve automated the building and testing of our applications, so can we automate deployment. It’s going to be hard, because deployment itself is complex. But it is possible, and it can transform your development if you can manage it.

16.1. How to survive deployment

16.2. Deploying with Ant

16.3. Database setup in Ant

16.4. Deploying with SmartFrog

16.5. Using SmartFrog with Ant

16.6. Embracing deployment

16.7. Summary