Giter VIP home page Giter VIP logo

Comments (1)

briandilley avatar briandilley commented on September 7, 2024

you’d have to implement the transactional support on the server side.  there isn’t any support in jsonrpc for this.  maybe do something like this on the client:

try {
   client.startTransaction(); // rpc method, starts a transaction on the server
   client.stuff(); // roc method
} catch(Exception e) {
   client.rollbackTransaction(); // rpc method, rolls back the transaction
} finally {
   client.commitTransaction(); // rpc method, commits the transaction
}

And then on the server you’ll have to detect a premature disconnection and automatically rollback the transaction.

-- 
Brian C. Dilley

On August 18, 2014 at 9:12:36 AM, Alex Collins ([email protected]) wrote:

Hi there,

I'm writing an application and I'd love to use JSON-RPC 4J. The app has two parts, a JSON-RPC and a client. I'd like the client to connect, make several RPC calls (using the streams version), and then disconnect. If anything goes wrong, then I'd like to have wrapped it in a transaction, and roll the whole thing back.

Could you give me a pointer or suggestion on how I might do this?

Alex


Reply to this email directly or view it on GitHub.

from jsonrpc4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.