Even though the topic sounds very boring, every CQ and Sling developer was at least once faced with the Question: "Is your solution supporting transactions?"
Most engineers are familiar with the theory and usage of transaction working in a old fashion J2EE environment. When transitioning to a modern REST application framework like Sling, we are facing many challenges. In most casesthe solution is to use hibernate or similar tools and to leave the RESTful world.
In this Session we will talk about transactions in general, explain the different kind of transactions and especially how to deal with services layers in conjunctions with Apache Sling. Various approaches, to help J2EE developers to transition fully to a RESTful world, will be explained.
4. Because websites are…
adaptTo() 2013 4
§ No longer simple advertisement
platforms
§ Not only “online Business cards”
§ Not a “nice to have” medium
§ Not a “Playground”
§ …..
10. adaptTo() 2012 10
“An input message to a computer system
that must be dealt with
as a single unit of work”
11. What are Transactions?
adaptTo() 2013 11
§ begin transaction
§ debit checking account
§ credit savings account
§ update history log
§ commit transaction
12. What are Transactions?
adaptTo() 2013 12
§ Late 70s: Jim Gray defined the
semantic of reliable transactions
§ Early 80s: Andreas Reuter and Theo
Härder defined the acronym “ACID” in
their paper “Principles of Transaction-
Oriented Database Recovery”
20. What are the challenges?
adaptTo() 2013 20
§ HTTP REQUEST – RESPONSE
PATTERN
§ STATELESS
§ …..?
21. Change your mindset…
adaptTo() 2013 21
§ Not everything has to be done in one
request
§ If you are using POST.jsp or similar in
Sling, most likely something is wrong
§ Events and Observations are your
friends
§ Use the full power of the Sling Default
Post and GET Servlet
27. Things of interest
adaptTo() 2012 27
§ Communicating with services layer
§ Distributed transactions
§ Nested transactions
§ Locking…
§ Using Adobe CQ?
§ Have a look at the Workflow Launcher!