Thursday, September 7, 2017

Enable Stateless REST services in ATG Oracle Commerce 11.3

Enable Stateless REST services in ATG Oracle Commerce 11.3 ATG framework is configured to be stateful by default but we can enable the... thumbnail 1 summary
Enable Stateless REST services in ATG Oracle Commerce 11.3

ATG framework is configured to be stateful by default but we can enable the stateless layer.

These are the simple steps to configure the stateless layer in your ATG .

1. Modify assembler.xml to add stateless layer.
....
.....
....
<exec dir="${env.DYNAMO_HOME}/bin" vmlauncher="false" executable="./runAssembler" failonerror="yes">
<arg value="-jboss" />
<arg value="-overwrite" />
<arg line="${deploy.location}/${ear.file.name}" />
<arg line="-layer" />
<arg line="stateless" />
<arg line="-m ${assemble.cmd.modules}" />
</exec>
.....
.....
.....
Once you add the above line, your assembler will take this extra layering while creating EAR file.

2.Create the EAR file with this configuration.

4.Verify the stateless layer added into your dynamo.env file from your EAR file

Check atg.dynamo.layers=stateless added in dynamo.env.

File path:
\jboss-eap-7.0\standalone\deployments\Production\Production.ear\atg_bootstrap.war\WEB-INF\ATG-INF\dynamo.env

 #Dynamo environment properties
#Thu Sep 07 13:10:47 IST 2017
atg.dynamo.home=C\:\\ATG\\ATG11.3\\home
atg.dynamo.root=C\:\\ATG\\ATG11.3
atg.dynamo.server.home=C\:\\ATG\\ATG11.3\\home
atg.dynamo.versioninfo=ATGPlatform/11.3
atg.dynamo.modules=<<All your modules>>
atg.dynamo.platformversion=11.3
atg.dynamo.layers=stateless
atg.dynamo.display=\:0.0
atg.dynamo.use-install=true

5.Start the server to verify your configurations are loaded or not.

Look for the following lines in the server log during start up.

... 
...
 C:\ATG\ATG11.3\DAS\configlayers\stateless\config.jar,
...
 C:\ATG\ATG11.3\DafEar\base\configlayers\stateless\config.jar,
...
 C:\ATG\ATG11.3\DPS\configlayers\stateless\config.jar,
...
 C:\ATG\ATG11.3\DCS\configlayers\stateless\config.jar,
...
... 
If you are able locate these lines then your server is started with the stateless layer.

Thanks.

Happy coding!


1 comment