code: public void undeploy(Descriptor descriptor) throws Throwable
     {
        if (descriptor == null)
           throw new IllegalArgumentException("Descriptor is null");
  
        if (descriptor.getDescriptorName() == null)
           throw new IllegalArgumentException("Descriptor name is null");
  
        if (!(descriptor instanceof InputStreamDescriptor ||
              descriptor instanceof org.ironjacamar.embedded.dsl.datasources20.api.DatasourcesDescriptor ||
              descriptor instanceof org.ironjacamar.embedded.dsl.resourceadapters20.api.ResourceAdaptersDescriptor))
            throw new IllegalArgumentException("Unsupported descriptor: " + descriptor.getClass().getName());
  
        if (!started)
           throw new IllegalStateException("Container not started");
  
        File parentDirectory = new File(SecurityActions.getSystemProperty("java.io.tmpdir"));
        File descriptorFile = new File(parentDirectory, descriptor.getDescriptorName());
  
        log.debugf("Undeploying: %s", descriptorFile);
  
        kernel.getMainDeployer().undeploy(descriptorFile.toURI().toURL());
  
        recursiveDelete(descriptorFile);
     }
docs: {@inheritDoc}