Skip to main content

ATG - how to create and deploy a new atg module

ATG products are packaged as a number of separate application modules. Application modules exist in the ATG installation as a set of directories defined by a manifest file.

To create a new module, follow the below steps :
  1. Create a module directory within your ATG installation. 
  2. Create a META-INF directory within the module directory. Note that this directory must be named META-INF. 
  3. Create a manifest file named MANIFEST.MF and include it in the META-INF directory for the module. The manifest contains the meta-data describing the module.
  4. A module located at <ATG2007.1dir>/MyModule is named MyModule and a module located at <ATG2007.1dir>/CustomModules/MyModule is named CustomModules.MyModule.
  5. Within the subdirectory that holds the module, any number of files may reside in any desired order. These files are the module resources (EAR files for J2EE applications, WAR files for web applications, EJB-JAR files for Enterprise JavaBeans, JAR files of Java classes, platform-dependent libraries, HTML documentation, configuration files,...)
Sample MANIFEST.MF content :

Manifest-Version:  1.0
ATG-Config-Path:  config/
ATG-Required:  mycomp.my-commerce   mycomp.my-search-query
ATG-J2EE:  j2ee-apps/my-estore
ATG-EAR-Module:  j2ee-apps/my-estore
ATG-Class-Path:  lib

  • ATG-Required --> A space-delimited set of module names. Here we will define the other modules that need to be included in this module. When the application is started up, the module’s manifest is processed after the manifests of the modules that the module depends on. Note that in most cases, you should set this attribute to include the out of the box module DSS. DSS has ATG required DPS and DPS module has DAS.
  • ATG-Config-Path --> Check the ATG-Config-Path for the property files for this module.
  • ATG-Class-Path --> The ATG platform adds the ATG-Class-Path value to the beginning of the EAR file’s classpath as each module is processed. Paths are relative to the module’s root directory.
Read  more about different manifest.mf attributes @ http://docs.oracle.com/cd/E26180_01/Platform.94/ATGProgGuide/html/s0403applicationmodulemanifestfile01.html


How to create an ATG ear ?


           To create an ATG ear module, your web.xml should contain some basic elements. To use ATG platform functionality, a web application needs to start Nucleus by invoking NucleusServlet. So it should be included in the web.xml to load on start up.

<servlet>
 <servlet-name>NucleusServlet</servlet-name>
 <servlet-class>atg.nucleus.servlet.NucleusServlet</servlet-class>
  <load-on-startup>1</load-on-startup>
</servlet>

Also the following tag lib alias name should be given to call the dsp tags.

<taglib>
<taglib-uri>/dspTaglib</taglib-uri>
 <taglib-location>/WEB-INF/tld/dspjspTaglib1_0.tld</taglib-location>
</taglib>

             To assemble the ATG application, we can use the "runAssembler.bat" available @ ATG\ATG2007.1\home\bin\runAssembler.bat location. The basic syntax of the command follows this format : runAssembler  earfilename  –m  module-list  .  Each EAR file built by runAssembler includes the following J2EE modules:
  • atg_bootstrap_ejb.jar: This module contains a single session EJB. The EJB’s class loader is used to load the ATG classes needed by the application.
  • atg_bootstrap.war: This module starts up Nucleus and runs the DAF servlet pipeline and the DAS servlet pipeline (for JHTML).
  • The EAR file can optionally include Dynamo Administration, which is packaged as a web application named atg_admin.war and you must specify the DafEar.Admin module when you run the application assembler to include Dynamo Administration.

             You can create two types of EAR files with the ATG application assembler, development and standalone. Both types contain all ATG classes needed for the application. The primary difference is in where the configuration files for Nucleus components are stored. In development mode, the application draws its Nucleus configuration information from the ATG installation folders. In standalone mode, the application stores its configuration in the EAR file itself.

             The main differences between development-mode and standalone-mode EAR files are found in the WEB-INF/ATG-INF directory of the atg_bootstrap.war J2EE module. In this directory, both types of EAR files have a file called dynamo.env, which defines Dynamo environment properties. In a development-mode EAR, the dynamo.env file contains the following entry, which tells the application to get its configuration from the .properties and XML files in the ATG installation :  atg.dynamo.use-install=true. So in development-mode you can make configuration changes without having to rebuild the EAR file.



Comments

  1. very good explanation...Thanks ..Thomas

    ReplyDelete
  2. Great information for starters. I appreciate you work for us. Thanks a lot!

    ReplyDelete
  3. Really Good explanation Mr.Thomas. Thanks

    ReplyDelete

Post a Comment

Popular posts from this blog

How to convert your Blogger Blog to PDF ?

You can use a website called "blogbooker" @  http://www.blogbooker.com/blogger.php   to convert your Blogger Blog to a PDF . Please find the steps below : 1. Save your blog as an xml using Blogger Settings - Other - Export Blog option 2. Go to the website " http://www.blogbooker.com/blogger.php " and select this XML , give your blog address and select the options like date range, page size, font, ... 3. Click the  "Create Your BlogBook" button to view and save your blog as PDF

ATG Search - search engine tuning settings

In this blog, I am going to list the best tuning settings for ATG Search engine. The AESoapConfig.xml, AESoapWaspConfig.xml  and AEConfig.xml are the xmls referred below and you can find it @  <ATG_DIR>\<Searchx.x>\SearchEngine\<operating_system>\bin\ folder. (1)  Make sure that the AESoapConfig.xml's rwTimeout is less than or equal to routing's readTimeoutMs. You could find the routing's readTimeoutMs @ atg\search\routing\SearchEngineService component.               rwTimeout is the  length of time in seconds to wait before a read or write operation times out on an active connection. The number can be decreased to improve performance. However, a value that is too low could cause slow connections to be prematurely closed. (2)  Adjust the number of engine threads to match the number of CPUs available to the engine. Note that the minimal value for maxThreads and maxSpareThreads is 2, which applies to running with 1 CPU.  However, it is recommended to

Eclipse plug-in to create Class and Sequence diagrams

ModelGoon is an Eclipse plug-in avaiable for UML diagram generation from Java code. It can be used to generate Package Dependencies Diagram, Class Diagram, Interaction Diagram and Sequence Diagram. You coud get it from http://marketplace.eclipse.org/content/modelgoon-uml4java Read more about it and see some vedios about how to create the class and sequence diagram @ http://www.modelgoon.org/?tag=eclipse-plugin Find some snapshots below which gives an idea about the diagram generation.

Working Environment

It is always good to think about your working environment. Here I am listing mine,  expecting your comments to add other necessary tools to this list. Anti Virus Avast  –> http://www.avast.com/free-antivirus-download Avira  –> http://www.avira.com/en/avira-free-antivirus AVG  –> http://www.freeavg.com/?lng=in-en&cmpid=free Kaspersky  –> http://www.kaspersky.com/ McAfee  –> http://www.mcafee.com/us/ Symantec  –> http://www.symantec.com/index.jsp Application Server JBoss  –>   http://www.jboss.org/jbossas/ Tomcat –>   http://tomcat.apache.org/ Weblogic –>   http://www.oracle.com/technetwork/middleware/weblogic Browser Firefox –>   http://www.mozilla.com/en-US/firefox Google Chrome  –> http://www.google.com/chrome/ IE  –>   http://windows.microsoft.com/en-US/internet-explorer/downloads/ie Communication_Network IPMessenger –>   http://ipmsg.org/index.html.en Putty –>   http://www.chiark.greenend.org.uk/~sgtatham/putty

How to simulate Browser back button

When someone asks how to simulate a back button, they really mean to ask how to create a link that points to the previously visited page. Most browsers tend to keep a list of which websites the user has visited and in what order they have done so. The DOM window object provides access to the browser's history through the history object. Moving backward and forward through the user's history is done using the   back(), forward(), and go() methods of the  history  object. To move backward through history, just do window.history.back() ; This will act exactly like the user clicked on the Back button in their browser toolbar. Find below a sample html code: <html> <head> <script type="text/javascript"> function goBack(){  window.history.back() } </script> </head> <body>    <input type="button" value="Back" onclick="goBack()" /> </body> </html>