Thursday, December 15, 2011

ATG Important interview questions

1.  What is atg Nucleus??
Nucleus is a ATG container for components. It creates and initializes component instances on request. It manages the components scope. It locates the properties file for the component and through that it reaches the class file of the component. Nucleus components are Java Objects each with an associated .properties file which store configuration values.

2 . What is MANIFEST file??
Applications often depend on other modules, these dependencies are declared in this file.The file name is MANIFEST.MF and resides in the META_INF directory. It specifies ATG-Class-Path,ATG-Required, ATG-Config-Path etc

3. How a component is Instantiated ??
One can start or stop components manually using an ACC.We can instruct nucleus to start a component during server startup, this is done by modifying the “Initial.properties” file.Add the component name to the “initialServices” property inside the Initial.properties file.

4. Differentiate Global,Request & session scopes.
Global: components are accessible from all other components.Not available across ATG servers, each server has its own copy of global scoped component.
Session: means every user of the application gets a separate copy of the component, and component exists for duration of the user’s session.
Request : A component is called in for returning the values of a search, so each time a search is triggered an object instantiation happens and its gone when the result page is closed.Which means the scope of the search component is request.Eg:-formhandlers normally have a request scope.

5. What is a context root?
Is a URL mounting point of the web application. It decides what URL site site visitors will enter to get to the site. Eg: http://www.atg.com/”context-root”
“context-root” is specified in the “application.xml” file in the “j2ee-apps” folder.

6.Logging features of ATG
Any component whose base class implements “ApplicationLogging” Interface can use atg logging infrastructure. Logging can be done per-component, per-module/per-application basis. Error, Warning,Info & Debug messages are the various logging mechanisms.First three are logged by default, whereas the Debug messages are just for debugging purpose and should be removed when the code goes into production.Logging is managed using the “GLOBAL.properties” file, which specfies the log levels of various modules.

7.Format of a Properties file :
Entries are generally expected to be a single line of the form
propertyName=propertyValue
or
propertyName:propertyValue
The property value is generally terminated by the end of the line. White space following the property value is not ignored, and is treated as part of the property value. White space at the beginning of the line is ignored.A property value can span several lines if each line is terminated by a backslash (‘\’) character.
The backslash character must also be “escaped” using a double backslash.Eg: C:\\home\\3tt

8.What is Config Layering??
Properties set in later entries in the CONFIGPATH override earlier entries. By adding a entry to the config path you can customize any components in the system without losing the original configuration information.You can have a global configuration common to all machines then have machine specific information in the last layer.

9.How to register a repository with the dynamo??
Create “/config/atg/registry/ContentRepositories.properties” file and append our repository file (XML )name to the “initialRepositories” property
Eg: initialRepositories+= /myModule/mySampleRepository

10.ATG standard product catalog uses which repository??
If we are using the standard product catalog provided by ATG no need to configure anything. We can straight away use the “/atg/commerce/catalog/ProductCatalog”  repository component

No comments:

Popular Posts