Package de.scoopgmbh.copper

Examples of de.scoopgmbh.copper.DuplicateIdException


      workflowPersistencePlugin.onWorkflowsSaved(con, uncheckedWfs);
    }
    catch(SQLException e) {
      // MySQL and DerbyDB throw a SQLIntegrityConstraintViolationException
      if (e instanceof SQLIntegrityConstraintViolationException || (e.getCause() != null && e.getCause() instanceof SQLIntegrityConstraintViolationException)) {
        throw new DuplicateIdException(e);
      }
      // Postgres handling
      if (e.getMessage().contains("cop_workflow_instance_pkey") || (e.getNextException() != null && e.getNextException().getMessage().contains("cop_workflow_instance_pkey"))) {
        throw new DuplicateIdException(e);
      }
      throw e;
    }
    finally {
      JdbcUtils.closeStatement(stmtQueue);
View Full Code Here


      List<PersistentWorkflow<?>> uncheckedWfs = (List)wfs;
      workflowPersistencePlugin.onWorkflowsSaved(con, uncheckedWfs);
    }
    catch(SQLException e) {
      if (e.getErrorCode() == 1) {
        throw new DuplicateIdException(e);
      }
      throw e;
    }
    finally {
      JdbcUtils.closeStatement(stmt);
View Full Code Here

      if (w.getProcessorPoolId() == null) {
        w.setProcessorPoolId(TransientProcessorPool.DEFAULT_POOL_ID);
      }
      synchronized (workflowMap) {
        if (!newId && workflowMap.containsKey(w.getId()))
          throw new DuplicateIdException("engine already contains a workflow with id '"+w.getId()+"'");
        workflowMap.put(w.getId(), w);
      }
      dependencyInjector.inject(w);
      enqueue(w);
    }
View Full Code Here

TOP

Related Classes of de.scoopgmbh.copper.DuplicateIdException

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.