Changing the namespace of an artifact

As you develop an application, you might want to change the namespaces of some artifacts. Use refactoring to avoid breaking dependencies.

Changing the namespace of an existing business object, interface, or other artifact can break your application if you do not also update all the dependencies that refer to the former namespace. If you change the namespace using refactoring, the dependencies are updated automatically after you preview and accept the changes.

To change the namespace of an artifact using refactoring:

  1. In the Business Integration view, right-click the artifact whose namespace you want to change. Hold down the Ctrl key to select additional artifacts if you want to make the same change of namespace for more than one artifact at a time.
  2. From the pop-up menu, select Refactor > Change Namespace.
  3. In the Change Target Namespace wizard, paste in a new namespace that you have saved to the clipboard, or click in the New namespace field to edit the current namespace. As soon as you enter a change, the Preview button becomes available.
  4. Leave the Update references check box selected. To see the refactoring changes that will be performed to complete the change of namespace across the application, click Preview. Click the plus signs to see details. If you try to refactor while you have unsaved changes in an editor, you will be prompted to save the changes in the editor. Save the changes if you are sure you want to do so, or click Cancel to reconsider the changes before saving the editors and refactoring.
  5. Accept all the refactoring actions. Click OK to initiate the refactoring operation or Cancel to close the wizard without making the change. Be aware that you cannot undo a refactoring operation once it is performed except by refactoring again. The status bar shows that the workspace is being updated. It clears when the refactoring operation finishes.

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