InfoCenter Home > 6.3.v35: Packaging applications and generating code for deploymentSee the Writing Enterprise Beans book for discussions of packaging enterprise beans into applications and generated JAR files for deployment. Packaging enterprise application files into JAR files for deploymentThe person deploying an enterprise application should divide classes belonging to an enterprise application into at least two JAR files. If the application contains both servlets and enterprise beans, these classes should be in separate JAR files. The EJB JAR file should be deployed under an application server container. The Servlet JAR file should be placed in the Web application "servlets" directory. All EJB helper classes can be either put in the EJB JAR file or can be placed in a separate JAR file which should be placed in the Dependent Classpath of the Administrative Server Node. All Servlet helper classes can be either placed in the Servlet JAR file or in a separate JAR file which should be placed in the Web Application servlets directory. The following types of classes are exceptions:
Generating code for deploymentThe administrator deploying enterprise beans should be aware of a couple of special cases. Considerations for deploying entity beans with CMPIf you are using CMP entity beans that do not rely on a particular database configuration (that is, the beans are not storing data in legacy applications or in existing database tables) you can use the WebSphere Administrative Console to automatically create the deployed JAR file and the corresponding database table. If you are using CMP entity beans for a legacy application (or the beans are from a third party vendor), you must use VisualAge for Java to create the deployed JAR file. You can then create (install) the bean by using the WebSphere Administrative Console. It is strongly recommended that you use VisualAge for Java for deploying beans used in legacy applications or beans that require complex mappings to a database table. If you use the automatic deployment process in the console, the order and names of the columns in the generated table are not guaranteed to match the table configuration needed by the legacy application. (The console deployment process makes certain assumptions about the order of container-managed fields.) If you decide to use automatic deployment within the console, but want to manually create the database table, note the following:
An entity bean with CMP must be associated with the name of a data source. A data source specifies a database name, Uniform Resource Locator (URL), network protocol, and location in the Java Naming and Directory Interface (JNDI) namespace. A data source also references a JDBC driver, used to locate the driver's JAR file on the node. When you create the bean, you are prompted to supply the name of this data source. Considerations for deploying JAR files with EJB inheritanceConsider the following when deploying JAR files with EJB inheritance:
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|