Deployment Best Practices


As explained earlier in the section on the auto-deployment WebLogic Server feature, WebLogic Server can be run in two distinct modes: development and production. The server should be started in development mode when you're developing applications and need to test them frequently. This mode should be used only in a single-server environment. The production mode should be used when you've completed the development phase and tested the application, and now need to launch it.

In this section, we describe some best practices that can be followed for deploying applications. While in the development phase of your project, start the server in development mode. However, depending on your infrastructure needs, you may either have a single- or multiple-server environment.

If you're using a single-server environment in development mode, here are some tips that can improve your efficiency while developing applications:

  • Keep applications in an exploded format.

  • Deploy your application directly from the source directory.

  • Consider using auto-deployment by maintaining the application in an exploded format in the < domainName >/applications directory of the Administration Server.

  • To change any JSP, HTML, or image files, change them directly in the < domainName >\applications\< yourWebApp > directory. You'll see the changes to these files immediately when you access them.

  • To update existing servlets (which have an entry in web.xml ), directly compile them to < domainName >\applications\< yourWebApp >\WEB-INF\classes directory.

  • To add new servlets, update deployment descriptors, or load new tag libraries or other libraries into the WEB-INF\lib directory, make the changes to the Web application under < domainName >\applications directory, and then touch (modify the timestamp of) the WEB-INF\REDEPLOY file to redeploy the complete application.

  • To update changes to the deployment descriptors of EJBs or resource adapters, touch (modify the timestamp of) the META-INF\REDEPLOY file.

  • To update changes to an enterprise archive in an exploded format, touch (modify the timestamp of) the META-INF\REDEPLOY file.

If you're developing in a multiple-server environment or running your server in production mode:

  • To update any changes to the application source files or deployment descriptors, use the weblogic.Deployer tool or the Administration Console to redeploy the application.

  • When only a part of the application has changed, consider doing incremental updates; that is, updating only a particular component instead of redeploying the whole application. The weblogic.Deployer tool allows this and is described earlier in this chapter.



BEA WebLogic Platform 7
BEA WebLogic Platform 7
ISBN: 0789727129
EAN: 2147483647
Year: 2003
Pages: 360

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