Best practice: Do not make changes to J2EE staging projects

If you edit a generated file or try to store original content in generated modules, you will lose your changes when you regenerate the projects during the build process.

J2EE staging projects (EJB projects and Web projects) are generated artifacts from the deployment process. When you issue a Project > Clean command, the system will discard the former J2EE staging project and regenerate it. Any changes you made to the former project will be lost. For that reason, do not modify a generated project or make changes to a web.xml file or an ejb-jar.xml file.

As a best practice, do not store any user logic in generated EJB or Web projects. Rather, create a separate Web project of your own and add it to the application as a dependent of the generated module by following these steps:

  1. Create your own Web project and create JavaServer Pages scripting for your HTML files in the Web project.
  2. In the Business Integration view, expand the business integration module's folder and double-click Dependencies. The module dependencies editor will open.
  3. In the J2EE section of that editor view, click Add to add your module as the dependent project. This action will pull your dependent project into the EAR.
Related concepts
Components and mediation modules
Approaches to assembling a mediation module
Quality of service: Qualifiers for mediation services
Using Java in a mediation module
Modules and libraries dependencies
Deployment
Related tasks
Creating a mediation module
Opening a mediation module assembly
Setting assembly editor preferences
Adding and wiring components
Editing the properties of elements in the mediation module assembly
Adding Qualities of Service (QoS) qualifiers
Processing events in a sequence
Working with implementations
Generating bindings for imports and exports
Invoking a module from another module
Interoperability with services from other vendors
Fixing errors in the assembly diagram
Adding dependencies
Related reference
Assembly editor for mediation modules

Related information

Tutorial: Wire components using the assembly editor
Tutorial: Create a mediation flow
Samples: Mediation Flow editor

Feedback
(C) Copyright IBM Corporation 2005, 2006. All Rights Reserved.