示例#1
0
 public DeploymentResult retire(AssemblyId assemblyId) throws RemoteException {
   OMElement request = element(ACTIVATE_REQUEST);
   setAuthentication(request);
   request.addChild(elementText(ASSEMBLY_NAME, assemblyId.getAssemblyName()));
   request.addChild(
       elementText(ASSEMBLY_VERSION, Integer.toString(assemblyId.getAssemblyVersion())));
   OMParser response = invoke(DEACTIVATE_REQUEST.getLocalPart(), request);
   return OMParser.parseDeploymentResult(response);
 }
示例#2
0
  /** Remove assembly from persistent state */
  void remove(AssemblyId aid) {
    Connection c = null;
    EasyStatement stmt;
    try {
      c = getConnection();

      stmt =
          new EasyStatement(c, "DELETE FROM DEPLOY_RESOURCES WHERE ASSEMBLY = ? AND VERSION = ?");
      stmt.write(aid.getAssemblyName());
      stmt.write(aid.getAssemblyVersion());
      stmt.execute();
      stmt.close();

      stmt =
          new EasyStatement(c, "DELETE FROM DEPLOY_COMPONENTS WHERE ASSEMBLY = ? AND VERSION = ?");
      stmt.write(aid.getAssemblyName());
      stmt.write(aid.getAssemblyVersion());
      stmt.execute();
      stmt.close();

      stmt =
          new EasyStatement(c, "DELETE FROM DEPLOY_ASSEMBLIES WHERE ASSEMBLY = ? AND VERSION = ?");
      stmt.write(aid.getAssemblyName());
      stmt.write(aid.getAssemblyVersion());
      stmt.execute();
      stmt.close();
    } catch (SQLException e) {
      throw new PersistenceException(e);
    } finally {
      close(c);
    }
  }