The easiest way to create a new gear is to copy an existing gear to extend or customize it. However, if you want to continue using the original gear, you must take some important steps in keeping the new gear from conflicting with the original gear.

  1. Start with a complete copy of the gear from its source tree.

  2. J2EE application names must be unique. You must change the name of the gear in the gear definition manifest file, which is found at the top level of the gear module directory. For example, the gear definition manifest file for the Document Exchange Gear is found at <ATG11dir>/Portal/docexch/docexch-manifest.xml. Change the name in the name attribute of the <gear-definition> tag.

  3. Java classes for the new gear should be packaged separately from those for the original gear. Rename the Java source tree directory structure and edit the source to change the package definition statements at the top of each source file.

    Of course, you will also have to make any Java code changes required by your new gear’s different functionality.

  4. ATG configuration files in the CONFIGPATH should be separated. Rename the directories in the CONFIGPATH that hold properties files for your new gear.

  5. Edit the properties files for the new gear, changing the $class properties to point to the new gear’s Java package names. Change any properties that point to other components to use the new component pathnames.

  6. Edit any pages used by the gear. You will need to make the following changes:

  7. Change the servlet context to reflect the name of the new gear. The servlet context appears in:

  8. Modify the database schema, adding any database tables used by the extended gear. Change the scripts in the gear’s sql directory to create the new tables.

  9. In the repository used by the gear, edit the repository definition file to use the new table names. For example, the repository definition file for the Discussion Gear is located at:

    <ATG11dir>/Portal/discussion/config/atg/portal/gear/discussion/
    discussionRepository.xml


Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices