Time to Deploy

Once you’ve verified, you’re ready to deploy. There’s not much that can go wrong unless something bad happens in the server. At this point, almost anything that goes wrong can be fixed by shutting down the server and deploytool and starting them back up again. Drastic, yes, but it usually works. Sometimes you do have to take even harsher action, by returning the server back to it’s freshly installed state, but fortunately there’s a command that can do that. When all else fails, bring up a new terminal and type cleanup. This script shuts down the J2EE server, but it also cleans out all the logs, directories, and files that have been made on that machine. After that, you can try starting the server, then the deploytool, and deploying again. And if you ever open the deploytool and you don’t see your application, don’t panic! Just go to the File menu and choose Open, just like you would to open a document in any other application. Think of the J2EE app like a document as far as the deploytool is concerned.

Choose Tools ▸ Deploy...

image with no caption

Get Head First EJB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.