Login Form

Lost Password?
No account yet? Register


Powered by ASM
Client/Server concurrent "Transaction Resolver" Print E-mail
Written by JODB Master   
Saturday, 29 September 2007

 The idea behind "Transaction Resolver" is similar to "Conflict Resolve" paradigm of CVS except that JODB doesn't try to resolve the conflicts automatically (which is obviously impossible) but simply notify registered ITransactionResolver implementation of the conflicting changes. The specific resolver implementation can be provided as parameter when you open the new client connection:
// assuming
private static class ResolverImpl implements ITransactionResolver{
    public boolean resolve(...) throws IOException {
      ... //do resolve if necessary

JODBSessionContainer sessionContainer = (JODBSessionContainer) JODB.openClient(hostName, serverName, mode, new ResolverImpl())


or later using

JODBSessionContainer.setTransactionResolver(new ResolverImpl())


 If no resolver provided before "commit" operation than current JODB implementation will assume current version of object that is being committed as "resolved".
< Prev   Next >
Copyright © 2017 Mobixess Inc.