Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Server-side transactions

    Hi,

    I am currently using SmartGWT Power Edition 3.1, along with GWT 2.5.0.

    I'm designing an application for which some sql transactions may not be initiated by client request (server-side only), so not through RPCManager queuing mechanism, neither by the call of SQLTransaction.startTransaction (which also takes instance of RPCManager as a parameter).

    Checking in the forum, the documentation and the showcase, I didn't find a way to provide an externally declared and managed transaction to a SQL DataSource or a DSRequest.

    Is there a way to do so?

    Thanks in advance

    #2
    You're correct, there isn't currently a way to manually establish a transaction outside of RPCManager. If you need this feature, consider Feature Sponsorship.

    Comment


      #3
      It's a big deception IMO... SmartGWT encourages the developers to have DataSource centric implementations... but you cannot use any DS operation in a database transaction initiated on the server ? Why should we add business logic to the datasources if it can't be integrated into a database transaction ?

      Comment


        #4
        It's unfortunate that you simply assumed this was a feature of the system, but, this isn't a capability that we claim anywhere in the docs, on the website, etc. What we talk about is automatic transactions related to HTTP requests *only*. There's no deception here, whatsoever.

        And it makes sense to have a DataSource-centric implementation for many, many, many reasons.

        Now, if you have just a couple of operations that need to be called from a non-HTTP context, it's easy enough to execute these in a transaction since SQLDataSource.getSQLClause() can give you all the SQL that our system generates, which you can easily apply to a connection obtained from SQLConnectionManager.getConnection() (or from wherever you like).

        If you've set up a system where essentially all operations need to be callable this way, then consider Feature Sponsorship to have features added so that transactions can be managed outside the scope of an HTTP request / RPCManager.

        Comment

        Working...
        X