BA#003 - How does TransactionalFormHandler ensure transactions in ATG?

The question means that we create a new FormHandler by extending TransactionalFormHandler and we write our own handleX() methods to handle form submission. When these methods are defined by us, how does out of the box TransactionalFormHandler ensure transactions? Where does it keep its code for ensuring transaction?

Ans. Each FormHandler has the following 4 methods:-
beforeSet  - Called Before ANY setX methods are called
afterSet    - Called After ALL setX methods are called
beforeGet - Called Before ANY input tags that reference this component are rendered
afterGet    - Called After page rendering is complete, before the socket is closed

Now, In TransactionalFormHandler, the code for handling transactions is present in beforeGet() and afterGet() methods. This establishes a transaction before any of the properties are set in the FormHandler or any handler method is called.

Asked By: TAISTech, Sapient, HCL

Other ATG Questions (General Topics):-

No comments:

Post a Comment

Subscribe

Get All The Latest Updates Delivered Straight Into Your Inbox For Free!

Flickr