1-12 Developing Applications for Oracle WebLogic Server
When you package a module or application, you create a directory to hold the deployment descriptors—WEB-INF or META-INF—and then create the XML
deployment descriptors in that directory.
1.11.1 Automatically Generating Deployment Descriptors
WebLogic Server provides a variety of tools for automatically generating deployment descriptors. These are discussed in the sections that follow.
1.11.2 EJBGen
EJBGen is an Enterprise JavaBeans 2.x code generator or command-line tool that uses Javadoc markup to generate EJB deployment descriptor files. You annotate your Bean
class file with Javadoc tags and then use EJBGen to generate the Remote and Home classes and the deployment descriptor files for an EJB application, reducing to a single
file you need to edit and maintain your EJB .java and descriptor files. See EJBGen Reference in Programming WebLogic Enterprise JavaBeans for Oracle WebLogic Server.
1.11.3 Java-based Command-line Utilities
WebLogic Server includes a set of Java-based command-line utilities that automatically generate both standard Java EE and WebLogic-specific deployment descriptors for
Web applications and Enterprise applications. JMS Module
WebLogic FileName
-jms.xml, where FileName can be anything you want. Schema:
http:xmlns.oracle.comweblogicweblogic-jms1.2web logic-jms.xsd
See Configuring JMS Application Modules for Deployment in Configuring and Managing JMS for Oracle WebLogic Server.
JDBC Module WebLogic
FileName -jdbc.xml, where FileName can be anything you want.
Schema: http:xmlns.oracle.comweblogicjdbc-data-source1.0
jdbc-data-source.xsd See Configuring JDBC Application Modules for Deployment in
Configuring and Managing JDBC for Oracle WebLogic Server. Deployment Plan
WebLogic plan.xml
Schema: http:xmlns.oracle.comweblogicdeployment-plan1.0
deployment-plan.xsd See Understanding WebLogic Server Deployment in Deploying
Applications to Oracle WebLogic Server. WLDF Module
WebLogic weblogic-diagnostics.xml
Schema: http:xmlns.oracle.comweblogicweblogic-diagnostics
1.0weblogic-diagnostics.xsd See Deploying WLDF Application Modules in Configuring and Using
the Diagnostics Framework for Oracle WebLogic Server.
Table 1–1 Cont. Java EE and WebLogic Deployment Descriptors
Module or Application Scope
Deployment Descriptors
Overview of WebLogic Server Application Development 1-13
These command-line utilities examine the classes you have assembled in a staging directory and build the appropriate deployment descriptors based on the servlet
classes, and so on. These utilities include:
■
java weblogic.marathon.ddinit.EarInit — automatically generates the deployment descriptors for Enterprise applications.
■
java weblogic.marathon.ddinit.WebInit — automatically generates the deployment descriptors for Web applications.
For an example of DDInit, assume that you have created a directory called c:\stage that contains the JSP files and other objects that make up a Web application but you
have not yet created the web.xml and weblogic.xml deployment descriptors. To automatically generate them, execute the following command:
prompt java weblogic.marathon.ddinit.WebInit c:\stage The utility generates the web.xml and weblogic.xml deployment descriptors and
places them in the WEB-INF directory, which DDInit will create if it does not already exist.
1.11.4 Upgrading Deployment Descriptors From Previous Releases of J2EE and WebLogic Server