Skip to main content

Posts

Showing posts from 2012

ATG Order update - InvalidVersionException and ConcurrentUpdateException

ATG repository item descriptor can have the version property. The atg.adapter.gsa.ItemTransactionState holds this version information. For example consider the Order item-descriptor. It has the version property defined against the table dcspp_order. Means, the dcspp_order table has the column version which defines which version of order is currently in the DB. Each order update flow will update this column.  <property name="version" display-name-resource="version" data-type="int" queryable="true" readable="true" column-name="version" hidden="false" category-resource="categoryInfo" expert="true" required="false" cache-mode="inherit" writable="true">     <attribute name="uiwritable" value="false"/>     <attribute name="propertySortPriority" value="30"/>   </property> ------------------------------- Du

How the ATG Order flow manages a transaction

See more about ATG  Tx management @ http://tips4ufromsony.blogspot.com/2012/05/atg-how-to-use-transaction-manager.html Most of the ATG Commerce form handlers extend atg.commerce.order.purchase.PurchaseProcessFormHandler. The transaction management pattern in order flow is implemented through this form handler’s beforeSet, afterSet, and handler methods. The transaction will be started @ beforeSet method and is ended @ afterSet method. In general, the design pattern for updating an order is as follows: Acquire lock-manager write lock on profile id from the /atg/commerce/order/LocalLockManager Begin Transaction Synchronize on the Order object. Modify Order Call ((OrderImpl) pOrder).updateVersion(); --> atg.commerce.order.InvalidVersionException is thrown based on this Call OrderManager.updateOrder() Release Order synchronization End Transaction Release lock-manager write lock on profile id from the /atg/commerce/order/LocalLockManager        If you extend atg.commerce

ATG - more about Forms and Form Handlers

An ATG form is defined by the dsp:form tag, which typically encloses DSP tags that specify form elements, such as dsp:input that provide direct access to Nucleus component properties. Find below a sample dsp:form tag.    <dsp:form action="/testPages/showPersonProperties.jsp" method="post" target="_top">      <p>Name: <dsp:input bean="/samples/Person.name" type="text"/>      <p>Age: <dsp:input bean="/samples/Person.age" type="text" value="30"/>      <p><dsp:input type="submit" bean="/samples/Person.submit"/> value="Click to submit"/>    </dsp:form>   When the user submits the form, the /samples/Person.name property is set to the value entered in the input field.Unlike standard HTML, which requires the name attribute for most input tags; the name attribute is optional for DSP form element tags. If an input tag omits the n

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.

ATG - quick reference to commonly used DSP Tags

In this blog, I would like to give a quick reference to the most commonly used DSP Tags.Note that in this DSP tag details : bean refers to a Nucleus path, component name, and property name param refers to a Page parameter value refers to a Static-value var refers to a EL variable id refers to a scripting variable ============================================================== 1.dsp:importbean     example: <dsp:importbean bean="/atg/dynamo/droplet/Switch"/> ============================================================== 2.dsp:page     usage: It encloses a JSP. The dsp:page invokes the JSP handler, which calls the servlet pipeline and generates HTTPServletRequest.    example:    <dsp:page> ..... </dsp:page> ============================================================== 3.dsp:include     usage: Embeds a page fragment in a JSP.     example:   <dsp:include src="/myPage/ResultPage.jsp" flush="true">            

ATG - how to use the Transaction Manager

Basic concepts of Java transaction In its simplest definition, a transaction is a set of actions that is treated as an atomic unit; either all actions take place (the transaction commits), or none of them take place (the transaction rolls back). Managing transactions is one of the primary tasks of an application server. The application server keeps track of transactions, remembering which transaction is associated with which request, and what transactional resources (such as JDBC or JMS connection) are involved. Each active transaction is represented by a transaction object, which implements the interface javax.transaction.Transaction. A transaction is usually associated with a thread and only one transaction can be associated with a thread at any one time. A central service, called the Transaction Manager, is responsible for keeping track of all these transactions. The Transaction Manager is implemented through the Java Transaction API (JTA). Transaction and Dynamo application

ATG features and ATG OOB modules

Features supported by ATG: Product Catalogue --> Custom Catalogue Creation, Localized Catalogs Order Management --> Customize Order Management Process, Integrate with 3rd Party Order Management Tool (Yantra), Partial Order Fulfillment Promotions --> Custom Promotion Creation, Integration with Ad Server (NetGravity) Campaigns --> Custom Campaign Development, Marketing Campaigns, Targeted Campaigns Personalization --> Profile Extensions, Explicit Rule Based Personalization, Implicit Dynamic  Personalization Commerce --> Shopping Cart Customization, Shopping List Creation, Customize Checkout process  Payments --> Integration with Payment Gateway (Cybercash,ClearCommerce), Bulk Payment Collaboration --> Chat, Discussion Forum, Message Board, Net Meetings  Reporting --> Click Stream Analysis, Site Analytics, Integration with 3rd Party Tools (HitBox, Netstat)  Search --> Integration with Search Engine (Verity, Autonomy), Database/Document Search, Cata