7.1 Overview of creating J2EE applications
Creating a J2EE application refers to the process of using an Enterprise Bean (EJB-JAR) and servlet created in an application development environment and a JSP (WAR) to create a J2EE application (EAR). In a J2EE application, you can also include resource adapters that you want to use in that J2EE application.
The following table describes the operations required for creating a J2EE application.
To create J2EE applications with cosminexus.xml, you include cosminexus.xml, created in advance, along with EJB-JAR and WAR files in J2EE applications, and then use.
The library JAR and reference library are common libraries and you can reference these libraries from each module of the J2EE application.
The library JAR and reference library have the following features:
-
-
The J2EE application includes a JAR (file extension is the lower case .jar).
-
When used in multiple J2EE applications, a library JAR needs to be added in each J2EE application.
-
The library JAR cannot include a class file. To use a class file, the class file needs to be compiled in a JAR file format.
-
-
-
The reference library specifies the absolute path of the library file to be referenced.
-
When used in multiple J2EE applications, you can use the same reference library by simply specifying the same reference.
-
The reference library can handle JAR files as well as class files.
-
When including the following classes in a common library that can be referenced from each module in a J2EE application, you must use a library JAR to include the classes: classes coded in an ejb-jar.xml or web.xml file, methods (arguments, return values, and exceptions), classes# that are loaded for reading annotation information, and classes required for the reference solution of the included classes. When these classes are used as a reference library, java.lang.NoClassDefFoundError or java.lang.ClassNotFoundException occurs when importing applications, and an attempt to acquire the annotation information fails (KDJE42380-W is output) or an attempt to import fails.
- #
-
For details on the classes loaded for reading the annotation information, see 14.3 Classes to be loaded and the class path required for loading in the uCosminexus Application Server Common Container Functionality Guide.