Package org.apache.isis.runtimes.dflt.runtime.persistence

Examples of org.apache.isis.runtimes.dflt.runtime.persistence.ConcurrencyException


        } else if (status.equals("concurrency")) {
            final String data = getResponseData();
            // TODO create better exceptions (requires way to restore
            // object/version)
            if (data.startsWith("{")) {
                throw new ConcurrencyException(data, (Throwable) null);

            } else {
                throw new ConcurrencyException(data, (Throwable) null);

            }
        } else if (!status.equals("ok")) {
            throw new RemotingException("Invalid status in response: " + status);
        }
View Full Code Here


            final ObjectAdapter failedObject = getAdapterManager().getAdapterFor(source);
            getPersistenceSession().reload(failedObject);
            if (LOG.isInfoEnabled()) {
                LOG.info("concurrency conflict: " + e.getMessage());
            }
            throw new ConcurrencyException("Object automatically reloaded: " + failedObject.titleString(), e);
        } catch (final IsisException e) {
            LOG.error("remoting exception", e);
            throw e;
        }
View Full Code Here

        if (source == null) {
            return e;
        }
        final ObjectAdapter failedObject = getAdapterManager().getAdapterFor(source);
        getPersistenceSession().reload(failedObject);
        return new ConcurrencyException("Object automatically reloaded: " + failedObject.titleString(), e);
    }
View Full Code Here

    @Override
    public void checkLock(final Version version) {
        if (this.version != null && this.version.different(version)) {
            LOG.info("concurrency conflict on " + this + " (" + version + ")");
            throw new ConcurrencyException(this, version);
        }
    }
View Full Code Here

    private String iconName;

    @Override
    public void checkLock(final Version version) {
        if (this.version.different(version)) {
            throw new ConcurrencyException("", getOid());
        }
    }
View Full Code Here

        sql.append(" AND ");
        sql.append(versionMapping.whereClause(connector, (SerialNumberVersion) object.getVersion()));
        final int updateCount = connector.update(sql.toString());
        if (updateCount == 0) {
            LOG.info("concurrency conflict object " + this + "; no deletion performed");
            throw new ConcurrencyException("", object.getOid());
        }
    }
View Full Code Here

        }

        final int updateCount = connector.update(sql.toString());
        if (updateCount == 0) {
            LOG.info("concurrency conflict object " + this + "; no update performed");
            throw new ConcurrencyException("", object.getOid());
        } else {
            object.setOptimisticLock(createVersion(nextSequence));
        }

        // TODO update collections - change only when needed rather than
View Full Code Here

            final Oid oid = e.getSource();
            if (oid == null) {
                throw e;
            } else {
                final ObjectAdapter failedObject = transactionManagement.reload(oid);
                throw new ConcurrencyException("Object automatically reloaded: " + failedObject.getSpecification().getTitle(failedObject, null), e);
            }
        }

        if (results != null) {
            handleResults(transactionEntries, results);
View Full Code Here

            final Oid oid = e.getSource();
            if (oid == null) {
                throw e;
            } else {
                final ObjectAdapter failedObject = transactionManagement.reload(oid);
                throw new ConcurrencyException("Object automatically reloaded: "
                    + failedObject.getSpecification().getTitle(failedObject, null), e);
            }
        }

        if (results != null) {
View Full Code Here

            final ObjectAdapter failedObject = getAdapterManager().getAdapterFor(source);
            getPersistenceSession().reload(failedObject);
            if (LOG.isInfoEnabled()) {
                LOG.info("concurrency conflict: " + e.getMessage());
            }
            throw new ConcurrencyException("Object automatically reloaded: " + failedObject.titleString(), e);
        } catch (final IsisException e) {
            LOG.error("remoting exception", e);
            throw e;
        }
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.runtime.persistence.ConcurrencyException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.