Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Where are the transaction boundaries?
Where are the transaction boundaries? [message #1075650] Mon, 29 July 2013 20:27 Go to next message
Chris Snow is currently offline Chris SnowFriend
Messages: 50
Registered: December 2011
Member
How does scout demarcate transactions? Say I have two SQL statements as below, where does scout start and end the transactions?

 @Override
  public CompanyFormData create(CompanyFormData formData) throws ProcessingException {
    if (!ACCESS.check(new CreateCompanyPermission())) {
      throw new VetoException(TEXTS.get("AuthorizationFailed"));
    }

    SQL.selectInto("" +
        "SELECT MAX(COMPANY_NR)+1 " +
        "FROM   COMPANY " +
        "INTO   :companyNr"
        , formData);
    SQL.insert("" +
        "INSERT INTO COMPANY (COMPANY_NR, SHORT_NAME, NAME) " +
        "VALUES (:companyNr, :shortName, :name)"
        , formData);

    return formData;
  }


Many thanks,

Chris
Re: Where are the transaction boundaries? [message #1075657 is a reply to message #1075650] Mon, 29 July 2013 20:39 Go to previous messageGo to next message
Arthur vD is currently offline Arthur vDFriend
Messages: 52
Registered: March 2010
Member
Hi

A very short explanation can be found here: http://wiki.eclipse.org/Scout/Concepts/Server_Plug-In#Transaction_Handling
The corresponding sequence diagram: http://wiki.eclipse.org/images/8/84/ScoutRemoteServiceCall.png
And there is this older forum post: http://www.eclipse.org/forums/index.php/t/245472/

Normally all your SQL statements which are called within one scout client to scout server call are handled within one transaction (and rolled back if something goes wrong during that client to server call). If you don't have special needs you usually don't care much about the transaction handling which is done in the background.
Re: Where are the transaction boundaries? [message #1075661 is a reply to message #1075657] Mon, 29 July 2013 20:43 Go to previous messageGo to next message
Chris Snow is currently offline Chris SnowFriend
Messages: 50
Registered: December 2011
Member
That's a great explanation - thank you.
Re: Where are the transaction boundaries? [message #1075929 is a reply to message #1075661] Tue, 30 July 2013 10:46 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
More links:
* (wiki) Concepts > Client-Server Communication
* (forum) Multiple SQL operations and commit
Previous Topic:Using IOUtility from behind an authenticating proxy
Next Topic:Scout windows traslater?
Goto Forum:
  


Current Time: Wed Apr 24 14:18:19 GMT 2024

Powered by FUDForum. Page generated in 0.02901 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top