Examples of ConcurrencyException


Examples of flex.samples.crm.ConcurrencyException

      ps.setString(10, previousVersion.getCity());
      ps.setString(11, previousVersion.getZip());
      ps.setString(12, previousVersion.getState());
      if (ps.executeUpdate() == 0)
      {
        throw new ConcurrencyException("Item not found");
      }
            ps.close();
            ps = null;
    }
    catch (SQLException e)
View Full Code Here

Examples of flex.samples.crm.ConcurrencyException

      ps.setString(4, company.getCity());
      ps.setString(5, company.getZip());
      ps.setString(6, company.getState());
      if (ps.executeUpdate() == 0)
      {
        throw new ConcurrencyException("Item not found");
      }
    }
    catch (SQLException e)
    {
      e.printStackTrace();
View Full Code Here

Examples of flex.samples.crm.ConcurrencyException

                ps.setInt(13, previousVersion.getCompany().getCompanyId());
            else
              ps.setNull(13, Types.INTEGER);               
      if (ps.executeUpdate() == 0)
      {
        throw new ConcurrencyException("Item not found");
      }
    }
    catch (SQLException e)
    {
      e.printStackTrace();
View Full Code Here

Examples of flex.samples.crm.ConcurrencyException

                ps.setInt(7, employee.getCompany().getCompanyId());
            else
              ps.setNull(7, Types.INTEGER);               
      if (ps.executeUpdate() == 0)
      {
        throw new ConcurrencyException("Item not found");
      }
    }
    catch (SQLException e)
    {
      e.printStackTrace();
View Full Code Here

Examples of helma.objectmodel.ConcurrencyException

        }

        if (state == INVALID) {
            nmgr.logEvent("Got Invalid Node: " + this);
            Thread.dumpStack();
            throw new ConcurrencyException("Node " + this +
                                           " was invalidated by another thread.");
        }

        if ((lock != null) && (lock != tx) && lock.isAlive() && lock.isActive()) {
            // nmgr.logEvent("Concurrency conflict for " + this + ", lock held by " + lock);
            throw new ConcurrencyException("Tried to modify " + this +
                                           " from two threads at the same time.");
        }

        tx.visitDirtyNode(this);
        lock = tx;
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.version.ConcurrencyException

                       thisVersion.different(otherVersion)) {
                       
                        if(isConcurrencyCheckingGloballyEnabled() && ConcurrencyChecking.isCurrentlyEnabled()) {
                            LOG.info("concurrency conflict detected on " + recreatedOid + " (" + otherVersion + ")");
                            final String currentUser = getAuthenticationSession().getUserName();
                            throw new ConcurrencyException(currentUser, recreatedOid, thisVersion, otherVersion);
                        } else {
                            LOG.warn("concurrency conflict detected but suppressed, on " + recreatedOid + " (" + otherVersion + ")");
                        }
                    }
                }
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.version.ConcurrencyException

           thisVersion.different(otherVersion)) {
           
            if(ConcurrencyChecking.isCurrentlyEnabled()) {
                LOG.info("concurrency conflict detected on " + thisOid + " (" + otherVersion + ")");
                final String currentUser = getAuthenticationSession().getUserName();
                throw new ConcurrencyException(currentUser, thisOid, thisVersion, otherVersion);
            } else {
                LOG.warn("concurrency conflict detected but suppressed, on " + thisOid + " (" + otherVersion + ")");
            }
        }
    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.version.ConcurrencyException

        container = new DomainObjectContainerDefault();
    }
   
    @Test
    public void whenConcurrencyException_is_recognized() throws Exception {
        ex = new ConcurrencyException("foo", RootOidDefault.create(ObjectSpecId.of("CUS"), "123"));
        assertThat(container.recognize(ex), is(not(nullValue())));
    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.version.ConcurrencyException

                       thisVersion.different(otherVersion)) {
                       
                        if(isConcurrencyCheckingGloballyEnabled() && ConcurrencyChecking.isCurrentlyEnabled()) {
                            LOG.info("concurrency conflict detected on " + recreatedOid + " (" + otherVersion + ")");
                            final String currentUser = getAuthenticationSession().getUserName();
                            throw new ConcurrencyException(currentUser, recreatedOid, thisVersion, otherVersion);
                        } else {
                            LOG.warn("concurrency conflict detected but suppressed, on " + recreatedOid + " (" + otherVersion + ")");
                        }
                    }
                }
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.version.ConcurrencyException

        sql.append(" AND ");
        sql.append(versionMapping.whereClause(connector, adapter.getVersion()));
        final int updateCount = connector.update(sql.toString());
        if (updateCount == 0) {
            LOG.info("concurrency conflict object " + this + "; no deletion performed");
            throw new ConcurrencyException("", adapter.getOid());
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.