<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>betweenGo &#187; ATG</title>
	<atom:link href="http://betweengo.com/category/atg/feed/" rel="self" type="application/rss+xml" />
	<link>http://betweengo.com</link>
	<description>We make Ruby on Rails easy.  We make ATG easy.</description>
	<lastBuildDate>Thu, 24 Jun 2010 19:42:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Persistent Cart for Anonymous Users</title>
		<link>http://betweengo.com/2010/05/03/persistent-cart-for-anonymous-users/</link>
		<comments>http://betweengo.com/2010/05/03/persistent-cart-for-anonymous-users/#comments</comments>
		<pubDate>Mon, 03 May 2010 14:26:00 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Personalization]]></category>
		<category><![CDATA[auto-login]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[profile]]></category>

		<guid isPermaLink="false">http://betweengo.com/2010/05/03/persistent-cart-for-anonymous-users/</guid>
		<description><![CDATA[ Isn’t it iconic? by Mykl Roventine
Convenience
eCommerce sites want to make their users’ experience as convenient and intuitive as possible.&#160; One convenience found on most major eCommerce sites is remembering what the user put in his shopping cart, even if that person didn’t log in.&#160; Therefore when the user returns to the site he will [...]


Related posts:<ol><li><a href='http://betweengo.com/2009/02/04/removing-cookie/' rel='bookmark' title='Permanent Link: Removing a Cookie'>Removing a Cookie</a></li>
<li><a href='http://betweengo.com/2009/07/17/how-to-import-and-create-users-in-oracle/' rel='bookmark' title='Permanent Link: How to Import and Create Users in Oracle'>How to Import and Create Users in Oracle</a></li>
<li><a href='http://betweengo.com/2009/11/02/how-to-add-multiple-items-to-the-shopping-cart-in-atg/' rel='bookmark' title='Permanent Link: How to Add Multiple Items to the Shopping Cart in ATG'>How to Add Multiple Items to the Shopping Cart in ATG</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="http://www.flickr.com/photos/myklroventine/3520845782/"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="129/365 Isn’t it iconic? on Flickr" alt="129/365 Isn’t it iconic? on Flickr" src="http://farm4.static.flickr.com/3651/3520845782_01cfae6862.jpg" /></a> <a title="129/365 Isn’t it iconic? on Flickr" href="http://www.flickr.com/photos/myklroventine/3520845782/">Isn’t it iconic?</a> by <a title="Flickr: Mykl Roventine&#39;s Photostream" href="http://www.flickr.com/photos/myklroventine/">Mykl Roventine</a></p>
<p><strong>Convenience</strong></p>
<p>eCommerce sites want to make their users’ experience as convenient and intuitive as possible.&#160; One convenience found on most major eCommerce sites is remembering what the user put in his shopping cart, even if that person didn’t log in.&#160; Therefore when the user returns to the site he will see what he left in his shopping cart.</p>
<p><strong>Persistent Cart</strong></p>
<p>ATG makes it relatively simple to do this by:</p>
<ol>
<li>creating a profile in the repository (database) for all users that visit the website </li>
<li>automatically logging in users by cookie </li>
</ol>
<p>Therefore if a user returns, she/he will be automatically logged in and if there were any items in his cart they will be added to the current cart.</p>
<p><strong>Implementation</strong></p>
<ol>
<li>Turn on persisting anonymous profiles in the ProfileRequestServlet.
<pre># /atg/dynamo/servlet/dafpipeline/ProfileRequestServlet
persistAfterLogout=true
persistentAnonymousProfiles=true</pre>
</li>
<li>Turn on auto-login by cookie and turn off auto-login by basic authentication.
<pre># /atg/userprofiling/CookieManager
sendProfileCookies=true

# /atg/userprofiling/ProfileRequestServlet
verifyBasicAuthentication=false</pre>
</li>
<li>Make all profile properties not required except for login and password in userProfile.xml.&#160; Also make autoLogin true.
<pre>&lt;table name=&quot;dps_user&quot;&gt;
  &lt;property name=&quot;login&quot; required=&quot;true&quot; /&gt;
  &lt;property name=&quot;password&quot; required=&quot;true&quot; /&gt;
  &lt;property name=&quot;firstName&quot; required=&quot;false&quot; /&gt;
  &lt;property name=&quot;lastName&quot; required=&quot;false&quot; /&gt;
  &lt;property name=&quot;email&quot; required=&quot;false&quot; /&gt;
  &lt;property name=&quot;autoLogin&quot; default=&quot;true&quot; /&gt;
&lt;/table&gt;</pre>
</li>
</ol>
<p><strong>Notes</strong></p>
<p>When a profile is created for an anonymous user the login and password are set to the user’s ID (i.e. the profile’s repository ID).</p>
<p>If you are adding this functionality to an existing up and running site you may have to modify your user tables so that there no “not null” columns except for the id, login and password columns, you can leave those as how they were.&#160; Also you will need to set auto_login to true for all your existing users.</p>
<pre>update dps_user set auto_login = 1;</pre>
<p>To determine when the anonymous user was created look at the registrationDate profile property.&#160; To determine when was the last time the anonymous user logged in look at the lastActivity profile property.&#160; <a title="Configuring the Profile Tools Component" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG9.1/persprog/wwhelp/wwhimpl/common/html/wwhelp.htm?context=persprog&amp;file=PersProgGuide.1.13.html">Both of these are updated by ATG’s TrackActivity scenario</a> which is in the DSS folder.</p>
<p>For further reading please see <a title="Tracking Guest Users" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG9.1/persprog/wwhelp/wwhimpl/common/html/wwhelp.htm?context=persprog&amp;file=PersProgGuide.1.47.html">Tracking Guest Users</a> and <a title="Tracking Registered Users" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG9.1/persprog/wwhelp/wwhimpl/common/html/wwhelp.htm?context=persprog&amp;file=PersProgGuide.1.47.html">Tracking Registered Users</a> in the <a title="ATG 9.1 Personalization Programming Guide" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG9.1/persprog/wwhelp/wwhimpl/js/html/wwhelp.htm?href=PersProgGuide.1.47.html">ATG 9.1 Personalization Programming Guide</a>.</p>


<p>Related posts:<ol><li><a href='http://betweengo.com/2009/02/04/removing-cookie/' rel='bookmark' title='Permanent Link: Removing a Cookie'>Removing a Cookie</a></li>
<li><a href='http://betweengo.com/2009/07/17/how-to-import-and-create-users-in-oracle/' rel='bookmark' title='Permanent Link: How to Import and Create Users in Oracle'>How to Import and Create Users in Oracle</a></li>
<li><a href='http://betweengo.com/2009/11/02/how-to-add-multiple-items-to-the-shopping-cart-in-atg/' rel='bookmark' title='Permanent Link: How to Add Multiple Items to the Shopping Cart in ATG'>How to Add Multiple Items to the Shopping Cart in ATG</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2010/05/03/persistent-cart-for-anonymous-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set ATG Repository Item Date or Timestamp Properties to the Current Time</title>
		<link>http://betweengo.com/2010/04/19/set-atg-repository-date-timestamp-properties-to-current-time/</link>
		<comments>http://betweengo.com/2010/04/19/set-atg-repository-date-timestamp-properties-to-current-time/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 13:05:00 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Repository]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[timestamp]]></category>
		<category><![CDATA[useNowForDefault]]></category>

		<guid isPermaLink="false">http://betweengo.com/2010/04/19/set-atg-repository-item-date-or-timestamp-properties-to-the-current-time/</guid>
		<description><![CDATA[ *Time* Ticking away&#8230; by Michel Filion
This is a neat trick for automatically setting a date or timestamp property to the current time.  I learned it while perusing the ATG Repository Guide.
Date and Timestamp Properties
A repository item can use properties whose values are dates or timestamps, with the value set to the current date or [...]


Related posts:<ol><li><a href='http://betweengo.com/2007/11/17/date-and-timestamp-repository-data-types/' rel='bookmark' title='Permanent Link: Date and Timestamp Repository Data Types'>Date and Timestamp Repository Data Types</a></li>
<li><a href='http://betweengo.com/2008/05/28/invalid-column-type-sqlexception-with-atg-repository/' rel='bookmark' title='Permanent Link: Invalid column type SQLException with ATG Repository'>Invalid column type SQLException with ATG Repository</a></li>
<li><a href='http://betweengo.com/2007/02/07/user-defined-property-types/' rel='bookmark' title='Permanent Link: ATG Repository User-Defined Property Types'>ATG Repository User-Defined Property Types</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="http://www.flickr.com/photos/mike9alive/1032525361/"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="*Time* Ticking away... on Flickr" src="http://farm2.static.flickr.com/1070/1032525361_ca7c9e404d.jpg" alt="*Time* Ticking away... on Flickr" /></a> <a title="*Time* Ticking away... on Flickr" href="http://www.flickr.com/photos/mike9alive/1032525361/">*Time* Ticking away&#8230;</a> by <a title="Flickr: Michel Filion's Photostream" href="http://www.flickr.com/photos/mike9alive/">Michel Filion</a></p>
<p>This is a neat trick for automatically setting a date or timestamp property to the current time.  I learned it while perusing the <a title="ATG 6 Repository Guide" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG6.4.0/repository/">ATG Repository Guide</a>.</p>
<blockquote><p><strong><a title="Date and Timestamp Properties" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG6.4.0/repository/repository0705.html">Date and Timestamp Properties</a></strong></p>
<p>A repository item can use properties whose values are dates or timestamps, with the value set to the current date or time, using the <a title="Date (Java 2 Platform SE 5.0)" href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html">java.util.Date</a>, <a title="Date (Java 2 Platform SE 5.0)" href="http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Date.html">java.sql.Date</a>, or <a title="Timestamp (Java 2 Platform SE 5.0)" href="http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Timestamp.html">java.sql.Timestamp</a> classes. You can have a property whose value is set to the current time or date at the moment a repository item is created. You can do this by setting the feature descriptor attribute useNowForDefault. For example:</p>
<pre>&lt;property name="creationDate" data-type="timestamp"&gt;
  &lt;attribute name="useNowForDefault" value="true"/&gt;
&lt;/property&gt;</pre>
<p>For more information about this technique, see the <a title="Assigning FeatureDescriptorValues with the &lt;attribute&gt; Tag" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG6.4.0/repository/repository0712.html#assigningfeaturedescriptorvalues01">Assigning FeatureDescriptorValues with the &lt;attribute&gt; Tag</a> section in this chapter.</p></blockquote>


<p>Related posts:<ol><li><a href='http://betweengo.com/2007/11/17/date-and-timestamp-repository-data-types/' rel='bookmark' title='Permanent Link: Date and Timestamp Repository Data Types'>Date and Timestamp Repository Data Types</a></li>
<li><a href='http://betweengo.com/2008/05/28/invalid-column-type-sqlexception-with-atg-repository/' rel='bookmark' title='Permanent Link: Invalid column type SQLException with ATG Repository'>Invalid column type SQLException with ATG Repository</a></li>
<li><a href='http://betweengo.com/2007/02/07/user-defined-property-types/' rel='bookmark' title='Permanent Link: ATG Repository User-Defined Property Types'>ATG Repository User-Defined Property Types</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2010/04/19/set-atg-repository-date-timestamp-properties-to-current-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set ATG Property And Popup Window After Clicking on Link</title>
		<link>http://betweengo.com/2010/03/26/set-atg-property-and-popup-window-after-clicking-on-link/</link>
		<comments>http://betweengo.com/2010/03/26/set-atg-property-and-popup-window-after-clicking-on-link/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 23:55:21 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Page Development]]></category>
		<category><![CDATA[dsp]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://betweengo.com/2010/03/26/set-atg-property-and-popup-window-after-clicking-on-link/</guid>
		<description><![CDATA[la cuarta ventana by bachmont&#160;
Sometimes when you click on a link in an ATG JSP/DSP page you want a property of an ATG component to be set as well.&#160; For example:
&#60;dsp:a href=&#34;foo.jsp&#34;&#62;Foo
  &#60;dsp:property bean=&#34;BarFormHandler.baz&#34; paramvalue=&#34;index&#34;/&#62;
&#60;/dsp:a&#62;
What gets tricky is if you also want a popup window to display the contents of this link.
The Wrong Way
I [...]


Related posts:<ol><li><a href='http://betweengo.com/2007/07/20/submitting-an-atg-form-using-a-text-link/' rel='bookmark' title='Permanent Link: Submitting an ATG Form Using a Text Link'>Submitting an ATG Form Using a Text Link</a></li>
<li><a href='http://betweengo.com/2009/08/31/how-to-set-array-property-in-atg-form/' rel='bookmark' title='Permanent Link: How to Set an Array Property in an ATG Form'>How to Set an Array Property in an ATG Form</a></li>
<li><a href='http://betweengo.com/2009/09/03/the-strangely-behaved-atg-textarea-tag/' rel='bookmark' title='Permanent Link: The Strangely Behaved ATG textarea Tag'>The Strangely Behaved ATG textarea Tag</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="http://www.flickr.com/photos/bachmont/2808616510/"><img title="la cuarta ventana on Flickr" style="display: block; float: none; margin-left: auto; margin-right: auto" alt="la cuarta ventana on Flickr" src="http://farm4.static.flickr.com/3007/2808616510_51933a7e86.jpg" /></a><a title="la cuarta ventana on Flickr" href="http://www.flickr.com/photos/bachmont/2808616510/">la cuarta ventana</a> by <a title="Flickr: bachmont&#39;s Photostream" href="http://www.flickr.com/photos/bachmont/">bachmont</a>&#160;</p>
<p>Sometimes when you click on a link in an ATG JSP/DSP page you want a property of an ATG component to be set as well.&#160; For example:</p>
<pre>&lt;dsp:a href=&quot;foo.jsp&quot;&gt;Foo
  &lt;dsp:property bean=&quot;BarFormHandler.baz&quot; paramvalue=&quot;index&quot;/&gt;
&lt;/dsp:a&gt;</pre>
<p>What gets tricky is if you also want a popup window to display the contents of this link.</p>
<p><strong>The Wrong Way</strong></p>
<p>I tried adapting the instructions from the tutorial <a title="Popup Windows | open new customised windows with JavaScript" href="http://www.yourhtmlsource.com/javascript/popupwindows.html">Popup Windows | open new customised windows with JavaScript</a>.</p>
<pre>&lt;dsp:a href=&quot;javascript:poptastic('foo.jsp');&quot;&gt;Foo
  &lt;dsp:property bean=&quot;BarFormHandler.baz&quot; paramvalue=&quot;index&quot;/&gt;
&lt;/dsp:a&gt;</pre>
<p>This does not work, i.e. the setter for baz in BarFormHandler is never called.</p>
<p><strong>The Brute Force Way</strong></p>
<p>I then reverted to the original DSP and looked at the outputted HTML.&#160; Based on that I updated the DSP like this.</p>
<pre>&lt;% atg.servlet.DynamoHttpServletRequest dreq = atg.servlet.ServletUtil.getCurrentRequest(); %&gt;
&lt;a href=&quot;javascript:poptastic('foo.jsp?_DARGS=/betweengo/test.jsp_AF&amp;_dynSessConf=&lt;%= dreq.getSessionConfirmationNumber() %&gt;&amp;_D%3A/betweengo/BarFormHandler.baz=+&amp;/betweengo/BarFormHandler.baz=&lt;dsp:valueof param=&quot;index&quot; /&gt;');&quot;&gt;Foo&lt;/a&gt;</pre>
<p>This works but is grotesque.</p>
<p><strong>The Good Idea That Did Not Work</strong></p>
<p>Then I realized I could just set a parameter in the URL and have the form handler use the value to set the property.</p>
<pre>&lt;a href=&quot;javascript:poptastic('foo.jsp?index=&lt;dsp:valueof param=&quot;index&quot; /&gt;');&quot;&gt;Foo&lt;/a&gt;</pre>
<p>And in BarFormHandler</p>
<pre>public boolean beforeSet(DynamoHttpServletRequest req,
            DynamoHttpServletResponse res) throws DropletFormException {

  String indexParam = request.getParameter(&quot;index&quot;);
  setIndex(Integer.parseInt(indexParam));

  return super.beforeSet(request, response);
}</pre>
<p>This did not work plus I did not really like it because now I have a beforeSet method that is called for every single request.</p>
<p><strong>The Winner</strong></p>
<p>I then realized I did not read the tutorial <a title="Popup Windows | open new customised windows with JavaScript" href="http://www.yourhtmlsource.com/javascript/popupwindows.html">Popup Windows | open new customised windows with JavaScript</a> carefully.&#160; There is a more elegant way to call the JavaScript which degrades gracefully for browsers that don’t support JavaScript.</p>
<pre>&lt;dsp:a href=&quot;foo.jsp&quot; onclick=&quot;poptastic(this.href);return false;&quot;&gt;Foo
  &lt;dsp:property bean=&quot;BarFormHandler.baz&quot; paramvalue=&quot;index&quot;/&gt;
&lt;/dsp:a&gt;</pre>
<p>This works, is elegant and requires just adding the onclick attribute to the original DSP.</p>


<p>Related posts:<ol><li><a href='http://betweengo.com/2007/07/20/submitting-an-atg-form-using-a-text-link/' rel='bookmark' title='Permanent Link: Submitting an ATG Form Using a Text Link'>Submitting an ATG Form Using a Text Link</a></li>
<li><a href='http://betweengo.com/2009/08/31/how-to-set-array-property-in-atg-form/' rel='bookmark' title='Permanent Link: How to Set an Array Property in an ATG Form'>How to Set an Array Property in an ATG Form</a></li>
<li><a href='http://betweengo.com/2009/09/03/the-strangely-behaved-atg-textarea-tag/' rel='bookmark' title='Permanent Link: The Strangely Behaved ATG textarea Tag'>The Strangely Behaved ATG textarea Tag</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2010/03/26/set-atg-property-and-popup-window-after-clicking-on-link/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling non-XA Resources in JBoss 4.2 with ATG</title>
		<link>http://betweengo.com/2010/01/28/enabling-non-xa-resources-in-jboss-4-2-with-atg/</link>
		<comments>http://betweengo.com/2010/01/28/enabling-non-xa-resources-in-jboss-4-2-with-atg/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 16:31:00 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[ATG]]></category>
		<category><![CDATA[JBoss]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SOLID]]></category>

		<guid isPermaLink="false">http://betweengo.com/2010/01/28/enabling-non-xa-resources-in-jboss-4-2-with-atg/</guid>
		<description><![CDATA[     (Photo: a dog and it&#8217;s boss by Pixel Addict)
ATG documents how to enable non-XA resources in JBoss 4.2 for SOLID.&#160; We ended up following the same instructions to work with Oracle. 
JBoss Note: JBoss 4.2 by default assumes XA drivers, which some ATG applications use; however, there are no XA [...]


Related posts:<ol><li><a href='http://betweengo.com/2008/07/05/enabling-trace-level-debugging-in-jboss/' rel='bookmark' title='Permanent Link: Enabling Trace Level Debugging in JBoss'>Enabling Trace Level Debugging in JBoss</a></li>
<li><a href='http://betweengo.com/2009/07/20/create-additional-jboss-application-server-configurations/' rel='bookmark' title='Permanent Link: Create Additional JBoss Application Server Configurations'>Create Additional JBoss Application Server Configurations</a></li>
<li><a href='http://betweengo.com/2009/07/21/namenotfoundexceptions-during-start-up-of-atg-application-on-jboss/' rel='bookmark' title='Permanent Link: NameNotFoundExceptions during start up of ATG application on JBoss'>NameNotFoundExceptions during start up of ATG application on JBoss</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="http://www.flickr.com/photos/pixel_addict/377682831/"><img title="a dog and it&#39;s boss on Flickr" alt="a dog and it&#39;s boss on Flickr" src="http://farm1.static.flickr.com/156/377682831_fa4ecd522f.jpg" /></a>     <br />(Photo: <a title="a dog and it&#39;s boss on Flickr" href="http://www.flickr.com/photos/pixel_addict/377682831/">a dog and it&#8217;s boss</a> by <a title="Flickr: Pixel Addict&#39;s Photostream" href="http://www.flickr.com/photos/pixel_addict/">Pixel Addict</a>)</p>
<p>ATG documents how to enable non-XA resources in JBoss 4.2 for SOLID.&#160; We ended up following the same instructions to work with Oracle. </p>
<blockquote><p>JBoss Note: JBoss 4.2 by default assumes XA drivers, which some ATG applications use; however, there are no XA drivers for SOLID. To enable multiple non-XA resources in JBoss 4.2, add the property in bold text to the <tt>jbossjta-properties.xml</tt> file, under the <tt>&lt;property depends=&quot;arjuna&quot; name=&quot;jta&quot;&gt;</tt> tag:</p>
<pre>&lt;property depends=&quot;arjuna&quot; name=&quot;jta&quot;&gt;
  <strong>&lt;property name=&quot;com.arjuna.ats.jta.allowMultipleLastResources&quot; value=&quot;true&quot;/&gt;</strong></pre>
<p>You may still see warnings in your log file, but ATG applications will run correctly. To suppress these warnings, add the following to your jboss-log4j.xml file:</p>
<pre>&lt;category name=&quot;com.arjuna.atg.jta.logging&quot;&gt;
  &lt;priority value=&quot;ERROR&quot;/&gt;
&lt;/category&gt;</pre>
</blockquote>
<p>For further reading please see <a title="Starting the SOLID SQL Database" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG9.1/atginstall/wwhelp/wwhimpl/common/html/wwhelp.htm?context=atginstall&amp;file=ATGInstallationGuide.1.24.html">Starting the SOLID SQL Database</a> document in the <a title="Running Nucleus-Based Applications" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG9.1/atginstall/wwhelp/wwhimpl/common/html/wwhelp.htm?context=atginstall&amp;file=ATGInstallationGuide.1.23.html">Running Nucleus-Based Applications</a> section of the ATG Installation and Configuration Guide.</p>


<p>Related posts:<ol><li><a href='http://betweengo.com/2008/07/05/enabling-trace-level-debugging-in-jboss/' rel='bookmark' title='Permanent Link: Enabling Trace Level Debugging in JBoss'>Enabling Trace Level Debugging in JBoss</a></li>
<li><a href='http://betweengo.com/2009/07/20/create-additional-jboss-application-server-configurations/' rel='bookmark' title='Permanent Link: Create Additional JBoss Application Server Configurations'>Create Additional JBoss Application Server Configurations</a></li>
<li><a href='http://betweengo.com/2009/07/21/namenotfoundexceptions-during-start-up-of-atg-application-on-jboss/' rel='bookmark' title='Permanent Link: NameNotFoundExceptions during start up of ATG application on JBoss'>NameNotFoundExceptions during start up of ATG application on JBoss</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2010/01/28/enabling-non-xa-resources-in-jboss-4-2-with-atg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring ATG to Send Email via Comcast SMTP</title>
		<link>http://betweengo.com/2010/01/25/configuring-atg-to-send-email-via-comcast-smtp/</link>
		<comments>http://betweengo.com/2010/01/25/configuring-atg-to-send-email-via-comcast-smtp/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 15:00:00 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[comcast]]></category>
		<category><![CDATA[smtp]]></category>

		<guid isPermaLink="false">http://betweengo.com/2010/01/25/configuring-atg-to-send-email-via-comcast-smtp/</guid>
		<description><![CDATA[     (Photo: Comcast still sucks by dmuth)
When you are developing at home you will probably need to configure your ATG application to send email via your ISP’s SMTP server.&#160; Here is how I configured ATG to send email via Comcast’s SMTP server.
First you need to update ATG’s configuration to point to [...]


Related posts:<ol><li><a href='http://betweengo.com/2007/02/28/updating-atg-after-installing-new-java-sdk/' rel='bookmark' title='Permanent Link: Updating ATG after installing new Java SDK'>Updating ATG after installing new Java SDK</a></li>
<li><a href='http://betweengo.com/2008/07/11/gmail-spf-and-broken-email-forwarding/' rel='bookmark' title='Permanent Link: Gmail, SPF, and Broken Email Forwarding?'>Gmail, SPF, and Broken Email Forwarding?</a></li>
<li><a href='http://betweengo.com/2007/11/29/cannot-create-new-scenario/' rel='bookmark' title='Permanent Link: Cannot Create New ATG Scenario'>Cannot Create New ATG Scenario</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a href="http://www.flickr.com/photos/dmuth/2256186646/"><img title="Comcast still sucks on Flickr" alt="Comcast still sucks on Flickr" src="http://farm3.static.flickr.com/2346/2256186646_9630861957.jpg" /></a>     <br />(Photo: <a title="Comcast still sucks on Flickr" href="http://www.flickr.com/photos/dmuth/2256186646/">Comcast still sucks</a> by <a title="Flickr: dmuth&#39;s Photostream" href="http://www.flickr.com/photos/dmuth/">dmuth</a>)</p>
<p>When you are developing at home you will probably need to configure your ATG application to send email via your ISP’s SMTP server.&#160; Here is how I configured ATG to send email via Comcast’s SMTP server.</p>
<p>First you need to update ATG’s configuration to point to the Comcast SMTP server by modifying <tt><a title="{ATG}/home/localconfig/atg/dynamo/Configuration.properties" href="http://localhost:8080/dyn/admin/nucleus/atg/dynamo/Configuration/">{ATG}/home/localconfig/atg/dynamo/Configuration.properties</a></tt>.</p>
<pre>emailHandlerHost=smtp.comcast.net
emailHandlerPort=587</pre>
<p>Typically you don’t need to set the emailHandlerPort, it is by default set to port 25.&#160; But Comcast has recently been switching over to use port 587 because email viruses use port 25 on infected computers.</p>
<p>Next you need to update ATG’s SMTP Email service configuration by modifying <tt><a title="{ATG}/home/localconfig/atg/dynamo/service/SMTPEmail.properties" href="http://localhost:8080/dyn/admin/nucleus/atg/dynamo/service/SMTPEmail/">{ATG}/home/localconfig/atg/dynamo/service/SMTPEmail.properties</a></tt>.</p>
<pre>defaultFrom=betweengo@comcast.net
username=betweengo
password=betweengo</pre>
<p>These values used to be optional but now are required because Comcast requires authentication as part of its increased security.</p>


<p>Related posts:<ol><li><a href='http://betweengo.com/2007/02/28/updating-atg-after-installing-new-java-sdk/' rel='bookmark' title='Permanent Link: Updating ATG after installing new Java SDK'>Updating ATG after installing new Java SDK</a></li>
<li><a href='http://betweengo.com/2008/07/11/gmail-spf-and-broken-email-forwarding/' rel='bookmark' title='Permanent Link: Gmail, SPF, and Broken Email Forwarding?'>Gmail, SPF, and Broken Email Forwarding?</a></li>
<li><a href='http://betweengo.com/2007/11/29/cannot-create-new-scenario/' rel='bookmark' title='Permanent Link: Cannot Create New ATG Scenario'>Cannot Create New ATG Scenario</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2010/01/25/configuring-atg-to-send-email-via-comcast-smtp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Specifying One-to-Many Relationship in ATG Repositories</title>
		<link>http://betweengo.com/2010/01/21/specifying-one-to-many-relationship-in-atg-repositories/</link>
		<comments>http://betweengo.com/2010/01/21/specifying-one-to-many-relationship-in-atg-repositories/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 18:00:00 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Repository]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://betweengo.com/2010/01/21/specifying-one-to-many-relationship-in-atg-repositories/</guid>
		<description><![CDATA[     (Photo: Monta driving by Yogma)
Specifying one-to-many relationships is ridiculously easy in Ruby on Rails.&#160; Unfortunately it’s not so straight-forward in ATG repositories.
First you specify the “belongs to” relationship.&#160; In this example the player belongs to a team.
&#60;item-descriptor name=&#34;player&#34;&#62;
  &#60;table name=&#34;team_players&#34; type=&#34;auxiliary&#34; id-column-names=&#34;team_id&#34; shared-table-sequence=&#34;1&#34;&#62;
    &#60;property name=&#34;team&#34; column-name=&#34;team_id&#34; [...]


Related posts:<ol><li><a href='http://betweengo.com/2008/08/01/best-practices-creating-tables/' rel='bookmark' title='Permanent Link: Best Practices for Creating Tables'>Best Practices for Creating Tables</a></li>
<li><a href='http://betweengo.com/2009/10/06/how-to-alter-table/' rel='bookmark' title='Permanent Link: How to Alter Table'>How to Alter Table</a></li>
<li><a href='http://betweengo.com/2005/07/28/user-defined-property-type-gotchas/' rel='bookmark' title='Permanent Link: user-defined property type gotcha&#8217;s'>user-defined property type gotcha&#8217;s</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a href="http://www.flickr.com/photos/yogma/2547140259/"><img title="Monta driving on Flickr" alt="Monta driving on Flickr" src="http://farm4.static.flickr.com/3265/2547140259_ae74aa0f7c.jpg" /></a>     <br />(Photo: <a title="Monta driving on Flickr" href="http://www.flickr.com/photos/yogma/2547140259/">Monta driving</a> by <a title="Flickr: Yogma&#39;s Photostream" href="http://www.flickr.com/photos/yogma/">Yogma</a>)</p>
<p>Specifying one-to-many relationships is <a title="A Guide to Active Record Associations" href="http://guides.rubyonrails.org/association_basics.html#the-has-many-association">ridiculously easy in Ruby on Rails</a>.&#160; Unfortunately it’s <a title="One-to-Many Relationships: Mutli-Valued Properties" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/repository/repository0606.html">not so straight-forward in ATG repositories</a>.</p>
<p>First you specify the “belongs to” relationship.&#160; In this example the player belongs to a team.</p>
<pre>&lt;item-descriptor name=&quot;player&quot;&gt;
  &lt;table name=&quot;team_players&quot; type=&quot;auxiliary&quot; id-column-names=&quot;team_id&quot; shared-table-sequence=&quot;1&quot;&gt;
    &lt;property name=&quot;team&quot; column-name=&quot;team_id&quot; item-type=&quot;team&quot; /&gt;
  &lt;/table&gt;
&lt;/item-descriptor&gt;</pre>
<p>Then you specify the “has many” relationship.&#160; In this example the team has many players.</p>
<pre>&lt;item-descriptor name=&quot;team&quot;&gt;
  &lt;table name=&quot;team_players&quot; type=&quot;multi&quot; id-column-names=&quot;player_id&quot; shared-table-sequence=&quot;2&quot;&gt;
    &lt;property name=&quot;players&quot; column-name=&quot;player_id&quot; data-type=&quot;set&quot; component-item-type=&quot;player&quot; /&gt;
  &lt;/table&gt;
&lt;/item-descriptor&gt;</pre>
<p>Note the trick is specifying the “shared-table-sequence.”</p>
<p>Here is the SQL for the table that specifies this relationship in our example.</p>
<pre>CREATE TABLE team_players
(
  team_id     VARCHAR2(40)  NOT NULL,
  player_id   VARCHAR2(40)  NOT NULL,
  CONSTRAINT team_players_pk PRIMARY KEY (team_id, player_id),
  CONSTRAINT team_players_players_fk foreign key (player_id) references players (id),
  CONSTRAINT team_players_team_fk foreign key (team_id) references teams (id)
);</pre>


<p>Related posts:<ol><li><a href='http://betweengo.com/2008/08/01/best-practices-creating-tables/' rel='bookmark' title='Permanent Link: Best Practices for Creating Tables'>Best Practices for Creating Tables</a></li>
<li><a href='http://betweengo.com/2009/10/06/how-to-alter-table/' rel='bookmark' title='Permanent Link: How to Alter Table'>How to Alter Table</a></li>
<li><a href='http://betweengo.com/2005/07/28/user-defined-property-type-gotchas/' rel='bookmark' title='Permanent Link: user-defined property type gotcha&#8217;s'>user-defined property type gotcha&#8217;s</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2010/01/21/specifying-one-to-many-relationship-in-atg-repositories/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Limiting the Quantity Added to a Cart</title>
		<link>http://betweengo.com/2010/01/14/limiting-the-quantity-added-to-a-cart/</link>
		<comments>http://betweengo.com/2010/01/14/limiting-the-quantity-added-to-a-cart/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 18:00:00 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Commerce]]></category>
		<category><![CDATA[CartModifierFormHandler]]></category>
		<category><![CDATA[ecommerce]]></category>

		<guid isPermaLink="false">http://betweengo.com/2010/01/14/limiting-the-quantity-added-to-a-cart/</guid>
		<description><![CDATA[ 
(Photo: Speed Limit 14 MPH by bredgur)
Sometimes the client will ask that the quantity of items you can add to the cart be limited to some number, say 14 like in the photo above.  
Often people will implement this by putting in checks throughout the JSP.&#160; But this is not the best solution [...]


Related posts:<ol><li><a href='http://betweengo.com/2009/11/02/how-to-add-multiple-items-to-the-shopping-cart-in-atg/' rel='bookmark' title='Permanent Link: How to Add Multiple Items to the Shopping Cart in ATG'>How to Add Multiple Items to the Shopping Cart in ATG</a></li>
<li><a href='http://betweengo.com/2007/11/15/sku-and-product-ids-in-commerceitem/' rel='bookmark' title='Permanent Link: CommerceItem, which one is the SKU ID?'>CommerceItem, which one is the SKU ID?</a></li>
<li><a href='http://betweengo.com/2009/08/17/how-to-debug-an-invalidversionexception-from-updating-an-atg-order/' rel='bookmark' title='Permanent Link: How to Debug an InvalidVersionException from Updating an ATG Order'>How to Debug an InvalidVersionException from Updating an ATG Order</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="http://www.flickr.com/photos/bredgur/2402977168/"><img style="display: inline; margin-left: 0px; margin-right: 0px" title="Speed Limit 14 MPH on Flickr" alt="Speed Limit 14 MPH on Flickr" src="http://farm4.static.flickr.com/3074/2402977168_32e08bbc26.jpg" /></a> </p>
<p align="center">(Photo: <a title="Speed Limit 14 MPH on Flickr" href="http://www.flickr.com/photos/bredgur/2402977168/">Speed Limit 14 MPH</a> by <a title="Flickr: bredgur&#39;s Photostream" href="http://www.flickr.com/photos/bredgur/">bredgur</a>)</p>
<p>Sometimes the client will ask that the quantity of items you can add to the cart be limited to some number, say 14 like in the photo above. <img src='http://betweengo.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Often people will implement this by putting in checks throughout the JSP.&#160; But this is not the best solution because it is more labor intensive and you may miss something.</p>
<p>Another solution is to deal with the issue in the <a title="CartModifierFormHandler (ATG Java API)" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG9.1/apidoc/atg/commerce/order/purchase/CartModifierFormHandler.html">CartModifierFormHandler</a> by extending the <a title="CartModifierFormHandler.doAddItemsToOrder (ATG Java API)" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG9.1/apidoc/atg/commerce/order/purchase/CartModifierFormHandler.html#doAddItemsToOrder(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)">doAddItemsToOrder method</a>.&#160; Simply check the quantity of each AddCommerceItemInfo item and make sure that its quantity plus the quantity of the same item already in the cart does not go over the limit.&#160; If it does modify the quantity in the AddCommerceItemInfo item appropriately.</p>
<p>Here is how I implemented this.</p>
<pre>    @Override
    protected void doAddItemsToOrder(DynamoHttpServletRequest pRequest,
            DynamoHttpServletResponse pResponse) throws ServletException,
            IOException {

        // fetch the order
        Order order = getOrder();
        if (order == null) {
            String msg = formatUserMessage(MSG_NO_ORDER_TO_MODIFY, pRequest,
                    pResponse);
            throw new ServletException(msg);
        }

        // iterate through the add commerce item infos, making sure that adding
        // any of them will not result in a quantity greater than LIMIT
        AddCommerceItemInfo[] addCommerceItemInfos = getItems();
        for (int ii = 0; ii &lt; addCommerceItemInfos.length; ii++) {

            // see if there is a commerce item already in the order for the next
            // add commerce item info
            AddCommerceItemInfo addCommerceItemInfo = addCommerceItemInfos[ii];
            String catalogRefId = addCommerceItemInfo.getCatalogRefId();
            CommerceItem commerceItem = findCommerceItemByCatalogRefId(order,
                    catalogRefId);
            if (commerceItem == null) {
                continue;
            }

            // check that the quantity we add won't result in a total quantity
            // greater than LIMIT
            long addQty = addCommerceItemInfo.getQuantity();
            long qty = commerceItem.getQuantity();
            if (qty &gt;= LIMIT) {
                addCommerceItemInfo.setQuantity(0);
            } else if (qty + addQty &gt; LIMIT) {
                long newAddQty = LIMIT - qty;
                addCommerceItemInfo.setQuantity(newAddQty);
            }
        }

        super.doAddItemsToOrder(pRequest, pResponse);
    }

    protected CommerceItem findCommerceItemByCatalogRefId(Order pOrder,
            String pCatalogRefId) {
        for (int ii = 0; ii &lt; numCommerceItems; ii++) {
            CommerceItem commerceItem = (CommerceItem) commerceItems.get(ii);
            String catalogRefId = commerceItem.getCatalogRefId();
            if (catalogRefId.equals(pCatalogRefId))
                return commerceItem;
        }
        return null;
    }</pre>


<p>Related posts:<ol><li><a href='http://betweengo.com/2009/11/02/how-to-add-multiple-items-to-the-shopping-cart-in-atg/' rel='bookmark' title='Permanent Link: How to Add Multiple Items to the Shopping Cart in ATG'>How to Add Multiple Items to the Shopping Cart in ATG</a></li>
<li><a href='http://betweengo.com/2007/11/15/sku-and-product-ids-in-commerceitem/' rel='bookmark' title='Permanent Link: CommerceItem, which one is the SKU ID?'>CommerceItem, which one is the SKU ID?</a></li>
<li><a href='http://betweengo.com/2009/08/17/how-to-debug-an-invalidversionexception-from-updating-an-atg-order/' rel='bookmark' title='Permanent Link: How to Debug an InvalidVersionException from Updating an ATG Order'>How to Debug an InvalidVersionException from Updating an ATG Order</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2010/01/14/limiting-the-quantity-added-to-a-cart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Combining XML in ATG</title>
		<link>http://betweengo.com/2010/01/12/combining-xml-in-atg/</link>
		<comments>http://betweengo.com/2010/01/12/combining-xml-in-atg/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 19:58:07 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ID generators]]></category>
		<category><![CDATA[product catalog]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://betweengo.com/2010/01/12/combining-xml-in-atg/</guid>
		<description><![CDATA[ 
(Photo: Legospective by Guillermо)

ATG uses XML files sometimes instead of Java properties files for configuration.&#160; Combining them is not as straight-forward as with Java properties files but more flexible.
The XML File Combination section in the Nucleus: Organizing JavaBean Components chapter of the ATG Programming guide gives a good explanation.&#160; You can combine XML files [...]


Related posts:<ol><li><a href='http://betweengo.com/2007/11/29/cannot-create-new-scenario/' rel='bookmark' title='Permanent Link: Cannot Create New ATG Scenario'>Cannot Create New ATG Scenario</a></li>
<li><a href='http://betweengo.com/2010/01/25/configuring-atg-to-send-email-via-comcast-smtp/' rel='bookmark' title='Permanent Link: Configuring ATG to Send Email via Comcast SMTP'>Configuring ATG to Send Email via Comcast SMTP</a></li>
<li><a href='http://betweengo.com/2009/07/22/how-to-get-permission-to-create-scenarios-in-acc/' rel='bookmark' title='Permanent Link: How to Get Permission to Create Scenarios in ACC'>How to Get Permission to Create Scenarios in ACC</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="http://www.flickr.com/photos/grdloizaga/817443503/"><img style="display: inline; margin-left: 0px; margin-right: 0px" title="Legospective on Flickr" alt="Legospective on Flickr" src="http://farm2.static.flickr.com/1197/817443503_e9766c35fd.jpg" /></a> </p>
<p align="center">(Photo: <a title="Legospective on Flickr" href="http://www.flickr.com/photos/grdloizaga/817443503/">Legospective</a> by <a title="Flickr: Guillermо&#39;s Photostream" href="http://www.flickr.com/photos/grdloizaga/">Guillermо</a>)</p>
</p>
<p>ATG uses XML files sometimes instead of Java properties files for configuration.&#160; Combining them is not as straight-forward as with Java properties files but more flexible.</p>
<p>The <a title="XML File Combination" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/dynprog/dynprog0207.html">XML File Combination</a> section in the <a title="Nucleus: Organizing JavaBean Components" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/dynprog/dynprog0201.html">Nucleus: Organizing JavaBean Components</a> chapter of the <a href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/dynprog/index.html">ATG Programming guide</a> gives a good explanation.&#160; You can combine XML files using one of these methods.</p>
<ul>
<li>replace </li>
<li>remove </li>
<li>append </li>
<li>append-without-matching </li>
<li>prepend </li>
<li>prepend-without-matching </li>
</ul>
<p>In most cases you will append.&#160; In one case I wanted to update the <a title="ID Generators" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/dynprog/dynprog0509.html">id-spaces</a> for orders but I had to first remove before appending because replace did not work in this case.&#160; This is how I did it.</p>
<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;

&lt;id-spaces&gt;
  &lt;id-space xml-combine=&quot;remove&quot; name=&quot;order&quot; seed=&quot;1&quot; batch-size=&quot;10000&quot; prefix=&quot;o&quot;/&gt;
  &lt;id-space name=&quot;order&quot; seed=&quot;100&quot; batch-size=&quot;1&quot; prefix=&quot;m&quot;/&gt;
&lt;/id-spaces&gt;</pre>
<p>To see the result of XML combining you can use the Dynamo Administration Server’s Component Browser to go to the component and then click on the property which specifies the XML file(s).</p>
<p>For example to find the result of combining idspaces.xml’s you would go to <a href="http://localhost:8080/dyn/admin/nucleus/atg/dynamo/service/IdGenerator/?propertyName=initialIdSpaces">http://localhost:8080/dyn/admin/nucleus/atg/dynamo/service/IdGenerator/?propertyName=initialIdSpaces</a>.</p>
<p>To find the result of combining productCatalogs.xml’s you would go to <a href="http://localhost:8080/dyn/admin/nucleus/atg/commerce/catalog/ProductCatalog/?propertyName=definitionFiles">http://localhost:8080/dyn/admin/nucleus/atg/commerce/catalog/ProductCatalog/?propertyName=definitionFiles</a>.</p>


<p>Related posts:<ol><li><a href='http://betweengo.com/2007/11/29/cannot-create-new-scenario/' rel='bookmark' title='Permanent Link: Cannot Create New ATG Scenario'>Cannot Create New ATG Scenario</a></li>
<li><a href='http://betweengo.com/2010/01/25/configuring-atg-to-send-email-via-comcast-smtp/' rel='bookmark' title='Permanent Link: Configuring ATG to Send Email via Comcast SMTP'>Configuring ATG to Send Email via Comcast SMTP</a></li>
<li><a href='http://betweengo.com/2009/07/22/how-to-get-permission-to-create-scenarios-in-acc/' rel='bookmark' title='Permanent Link: How to Get Permission to Create Scenarios in ACC'>How to Get Permission to Create Scenarios in ACC</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2010/01/12/combining-xml-in-atg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NullPointerException in ATG OrderDiscountCalculator</title>
		<link>http://betweengo.com/2009/12/15/nullpointerexception-in-atg-orderdiscountcalculator/</link>
		<comments>http://betweengo.com/2009/12/15/nullpointerexception-in-atg-orderdiscountcalculator/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 13:39:40 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Commerce]]></category>
		<category><![CDATA[NullPointerException]]></category>
		<category><![CDATA[OrderDiscountCalculator]]></category>

		<guid isPermaLink="false">http://betweengo.com/2009/12/15/nullpointerexception-in-atg-orderdiscountcalculator/</guid>
		<description><![CDATA[
(Photo: calculator by ansik) 
There is a bug in the ATG OrderDiscountCalculator which causes a NullPointerException (NPE) under certain conditions.&#160; Fortunately ATG provides the source for this class (I wish they did for all their classes or at least a larger subset of them) so it was pretty simple to figure out why this was [...]


Related posts:<ol><li><a href='http://betweengo.com/2009/07/16/could-not-install-atg-2007-1/' rel='bookmark' title='Permanent Link: Could Not Install ATG 2007.1'>Could Not Install ATG 2007.1</a></li>
<li><a href='http://betweengo.com/2009/12/20/twitter-weekly-updates-for-2009-12-20/' rel='bookmark' title='Permanent Link: Twitter Weekly Updates for 2009-12-20'>Twitter Weekly Updates for 2009-12-20</a></li>
<li><a href='http://betweengo.com/2009/08/17/how-to-debug-an-invalidversionexception-from-updating-an-atg-order/' rel='bookmark' title='Permanent Link: How to Debug an InvalidVersionException from Updating an ATG Order'>How to Debug an InvalidVersionException from Updating an ATG Order</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="http://www.flickr.com/photos/ansik/304526237/"><img title="calculator on Flickr" alt="calculator on Flickr" src="http://farm1.static.flickr.com/109/304526237_6d1acf58bb.jpg" /></a></p>
<p align="center">(Photo: <a title="calculator on Flickr" href="http://www.flickr.com/photos/ansik/304526237/">calculator</a> by <a title="Flickr: ansik&#39;s Photostream" href="http://www.flickr.com/photos/ansik/">ansik</a>) </p>
<p>There is a bug in the <a title="OrderDiscountCalculator (ATG Java API)" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG9.1/apidoc/atg/commerce/pricing/OrderDiscountCalculator.html">ATG OrderDiscountCalculator</a> which causes a <a title="NullPointerException (Java 2 Platform SE 5.0)" href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html">NullPointerException</a> (NPE) under certain conditions.&#160; Fortunately ATG provides the source for this class (I wish they did for all their classes or at least a larger subset of them) so it was pretty simple to figure out why this was happening.</p>
<p>The OrderDiscountCalculator assumes that the taxableShippingGroupSubtotalInfo local will not be null.&#160; If it is an NPE will result when this local is referenced and the page that called this calculator will crash.</p>
<p>The simple fix is to check if it is null and if it is to continue to the next shipping group.</p>
<pre>if (taxableShippingGroupSubtotalInfo == null) {
  continue;
}</pre>
<p>At my request ATG Support has filed a problem report, <a title="ATG - Customer Care Site  - PR #166384 NullPointerException in OrderDiscountCalculator" href="https://www.atg.com/esupport/bugs/?FullViewBug=ViewBug&amp;bugId=166384">NullPointerException in OrderDiscountCalculator</a>.</p>
<p>Update 12-17-2009: ATG may have fixed this issue for ATG 9.1 p1, <a title="ATG - Customer Care Site  - PR #162722 NPE in OrderDiscountCalculator w/empty shipping groups in Order" href="https://www.atg.com/esupport/bugs/?FullViewBug=ViewBug&amp;bugId=162722">NPE in OrderDiscountCalculator w/empty shipping groups in Order</a>.</p>


<p>Related posts:<ol><li><a href='http://betweengo.com/2009/07/16/could-not-install-atg-2007-1/' rel='bookmark' title='Permanent Link: Could Not Install ATG 2007.1'>Could Not Install ATG 2007.1</a></li>
<li><a href='http://betweengo.com/2009/12/20/twitter-weekly-updates-for-2009-12-20/' rel='bookmark' title='Permanent Link: Twitter Weekly Updates for 2009-12-20'>Twitter Weekly Updates for 2009-12-20</a></li>
<li><a href='http://betweengo.com/2009/08/17/how-to-debug-an-invalidversionexception-from-updating-an-atg-order/' rel='bookmark' title='Permanent Link: How to Debug an InvalidVersionException from Updating an ATG Order'>How to Debug an InvalidVersionException from Updating an ATG Order</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2009/12/15/nullpointerexception-in-atg-orderdiscountcalculator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ATG Date Tag Converter is Buggy</title>
		<link>http://betweengo.com/2009/11/23/atg-date-tag-converter-is-buggy/</link>
		<comments>http://betweengo.com/2009/11/23/atg-date-tag-converter-is-buggy/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 14:39:17 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[Page Development]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[dsp]]></category>
		<category><![CDATA[tag converters]]></category>

		<guid isPermaLink="false">http://betweengo.com/2009/11/23/atg-date-tag-converter-is-buggy/</guid>
		<description><![CDATA[
(Photo: Leaf on my car by exfordy)
The ATG Date Tag Converter is buggy because Java’s DateFormat is inherently unsafe for multithreaded use.  This is documented in ATG PR #123210 DateTagConverter.convertObjectToString() method is not thread safe.
You run into this problem whenever you do something like this.
&#60;dsp:valueof param=”creationDate” converter=”date” date=”M/dd/yyyy”/&#62;
Unfortunately there is no work around.  If using [...]


Related posts:<ol><li><a href='http://betweengo.com/2008/05/28/playing-with-dates-in-java/' rel='bookmark' title='Permanent Link: Playing with Dates in Java'>Playing with Dates in Java</a></li>
<li><a href='http://betweengo.com/2009/08/12/atg-currency-converter-not-working-with-jstl-c-set/' rel='bookmark' title='Permanent Link: ATG Currency Converter Not Working With JSTL c:set'>ATG Currency Converter Not Working With JSTL c:set</a></li>
<li><a href='http://betweengo.com/2010/04/19/set-atg-repository-date-timestamp-properties-to-current-time/' rel='bookmark' title='Permanent Link: Set ATG Repository Item Date or Timestamp Properties to the Current Time'>Set ATG Repository Item Date or Timestamp Properties to the Current Time</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a href="http://www.flickr.com/photos/exfordy/191036192/"><img title="Leaf on my car on Flickr" src="http://farm1.static.flickr.com/60/191036192_6fae11db6c.jpg" alt="Leaf on my car on Flickr" /></a></p>
<p style="text-align: center">(Photo: <a title="Leaf on my car on Flickr" href="http://www.flickr.com/photos/exfordy/191036192/">Leaf on my car</a> by <a title="Flickr: exfordy's photostream" href="http://www.flickr.com/photos/exfordy/">exfordy</a>)</p>
<p>The <a title="Tag Converters - ATG Page Developer's Guide" href="http://www.atg.com/repositories/ContentCatalogRepository_en/manuals/ATG2006.3/pagedev/pagedev0308.html#tagconverters01">ATG Date Tag Converter</a> is buggy because <a title="Playing with Dates in Java - betweenGo" href="http://betweengo.com/2008/05/28/playing-with-dates-in-java/">Java’s DateFormat is inherently unsafe for multithreaded use</a>.  This is documented in <a title="ATG - Customer Care Site - PR #123210 DateTagConverter.convertObjectToString() method is not thread safe" href="https://www.atg.com/esupport/bugs/?FullViewBug=ViewBug&amp;bugId=123210">ATG PR #123210 DateTagConverter.convertObjectToString() method is not thread safe</a>.</p>
<p>You run into this problem whenever you do something like this.</p>
<pre>&lt;dsp:valueof param=”creationDate” converter=”date” date=”M/dd/yyyy”/&gt;</pre>
<p>Unfortunately there is no work around.  If using the Date Tag Converter is not causing problems for you, i.e you don’t see a stack trace like below, then you can ignore this bug.</p>
<pre>2009-04-17 00:19:08,220 ERROR [nucleusNamespace.atg.dynamo.servlet.dafpipeline.DynamoServlet] java.lang.ArrayIndexOutOfBoundsException: 502
  at sun.util.calendar.BaseCalendar.getCalendarDateFromFixedDate(BaseCalendar.java:436)
  at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2081)
  at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:1996)
  at java.util.Calendar.setTimeInMillis(Calendar.java:1071)
  at java.util.Calendar.setTime(Calendar.java:1037)
  at java.text.SimpleDateFormat.format(SimpleDateFormat.java:785)
  at java.text.SimpleDateFormat.format(SimpleDateFormat.java:778)
  at java.text.DateFormat.format(DateFormat.java:314)
  at atg.droplet.DateTagConverter.convertObjectToString(DateTagConverter.java:176)</pre>
<p><img src="https://www.atg.com/images/main-images/clear.gif" alt="" width="1" height="6" />But if you do see a bug like this then you might need to create a custom droplet to format the date.  The droplet should only use DateFormat instances that are not static.  I usually make my DateFormat instances local.</p>


<p>Related posts:<ol><li><a href='http://betweengo.com/2008/05/28/playing-with-dates-in-java/' rel='bookmark' title='Permanent Link: Playing with Dates in Java'>Playing with Dates in Java</a></li>
<li><a href='http://betweengo.com/2009/08/12/atg-currency-converter-not-working-with-jstl-c-set/' rel='bookmark' title='Permanent Link: ATG Currency Converter Not Working With JSTL c:set'>ATG Currency Converter Not Working With JSTL c:set</a></li>
<li><a href='http://betweengo.com/2010/04/19/set-atg-repository-date-timestamp-properties-to-current-time/' rel='bookmark' title='Permanent Link: Set ATG Repository Item Date or Timestamp Properties to the Current Time'>Set ATG Repository Item Date or Timestamp Properties to the Current Time</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2009/11/23/atg-date-tag-converter-is-buggy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->