Creating an Enterprise Application
BEA WebLogic Server 7.0 Upgrade Guide 2-23
Porting EJBs from Other J2EE Application Servers
Any EJB that complies with the EJB 1.1 or EJB 2.0 specifications may be deployed in
the WebLogic Server 7.0 EJB container. Each EJB JAR file requires an
ejb-jar.xml
file, a
weblogic-ejb-jar.xml deployment descriptor, and a CMP deployment
descriptor if CMP entity beans are used. The WebLogic Server EJB examples located
in
samples\examples\ejb11 and samples\examples\ejb20 of the WebLogic
Server distribution include sample weblogic deployment descriptors.
Creating an Enterprise Application
An Enterprise Application is a JAR file with an EAR extension. An EAR file contains
all of the JAR and WAR component archive files for an application and an XML
descriptor that describes the bundled components. The
META-INF\application.xml
deployment descriptor contains an entry for each Web and EJB module, and additional
entries to describe security roles and application resources such as databases.
EnterpriseApplicationStagingDirectory\
|
+ .jar files
|
+ .war files
|
+META-INF\-+
|
+ application.xml
To create an EAR file:
1. Assemble all of the WAR and JAR files for your application.
2. Copy the WAR and EJB JAR files into the staging directory and then create a
META-INF\application.xml deployment descriptor for the application. Follow
the directory structure depicted above.
The
application.xml file contains a descriptor for each component in the
application, using a DTD supplied by Sun Microsystems. For more information
on the application.xml file, see Application Deployment Descriptor Elements in