Navigation Menu

Configuration


Necules Configuration in ATG Web Application :

To configure necules in web application, we need to add necessary into web.xml (application deployment descriptor) :
  • NucleusServlet, which is the servlet responsible for running Nucleus as a servlet.
  • PageFilter that starts the request-handling pipeline.
  • <distributable/> tag, in order to enable session failover when running in a cluster. This tag is added automatically when you assemble your EAR using the –distributable flag.

NucleusServlet :

NucleusServlet creates an instance of Nucleus and sets it as an attribute of the web application. Nucleus instance can be retrieved using the Nucleus.getGlobalNucleus() method.

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

Note : must have the load-on-startup flag set to 1 so that it runs before any other Oracle Commerce Platform component.


Request-Handling Pipeline

After invoking NucleusServlet, the web container calls PageFilter filter, which starts execution of the request-handling pipeline for JSP requests

<filter>
        <filter-name>PageFilter</filter-name>
 
        <filter-class>atg.filter.dspjsp.PageFilter</filter-class>
</filter>
<filter-mapping>
 
        <filter-name>PageFilter</filter-name>
         <url-pattern>*.jsp</url-pattern>
</filter-mapping>



atg_bootstrap.war in multi war application : 


When multiple web applications exist in the ATG EAR file, one of them must be designated as the parent application.

ATG makes the <ATG10dir>\DafEar\base\j2ee-components\atg_bootstrap.war file the parent web application (by default). The parent context path is /dyn. Below parameters need to define in web.xml.
  • atg.session.parentContextName
  • atg.dafear.bootstrapContextName

<context-param>
   <param-name>atg.session.parentContextName</param-name>
   <param-value>/dyn</param-value>
</context-param>
<context-param>
   <param-name>atg.dafear.bootstrapContextName</param-name>
   <param-value>/dyn</param-value>
   <description>The name of the DAF bootstrap WAR context.</description>
</context-param>


Note : Being the parent means that application’s session ID is used as the basis for creating the ATG session scope root. Sharing sessions across ATG applications ensures that you can build a J2EE application consisting of multiple WAR files in a single EAR, and each WAR has access to the same session-scoped components. By default, J2EE servers hand out different session objects in each web application visited.

Starting a Nucleus Component


When you start up an application, Nucleus reads the configuration path, Nucleus.properties that contains the name of the first component to create.

Necleus.properties : 

$class=atg.nucleus.Nucleus
initialServiceName=/Initial

InitialService.properties :

$class=atg.nucleus.InitialService
initialServices=\
     /atg/Initial,\
     VMSystem,\
     /atg/dynamo/StartServers





No comments :