public void deleteResource() throws Exception {
   JBossASServerComponent jbossASComponent = getResourceContext().getParentResourceComponent();
   File deploymentFile =
       jbossASComponent.getDeploymentFilePath(getResourceContext().getResourceKey());
   assert deploymentFile.exists()
       : "Deployment file "
           + deploymentFile
           + " doesn't exist for resource "
           + getResourceContext().getResourceKey();
   ConnectionFactoryConfigurationEditor.deleteConnectionFactory(deploymentFile, this.name);
   jbossASComponent.redeployFile(deploymentFile);
 }
  @Override
  public void updateResourceConfiguration(ConfigurationUpdateReport report) {
    JBossASServerComponent parentComponent = getResourceContext().getParentResourceComponent();

    File deploymentFile =
        parentComponent.getDeploymentFilePath(getResourceContext().getResourceKey());

    if (deploymentFile == null) {
      report.setErrorMessage(
          "Parent resource is currently down. Unable to complete update of connection factory "
              + this.name);
      report.setStatus(ConfigurationUpdateStatus.FAILURE);
    } else {
      if (!deploymentFile.exists()) {
        deploymentFile = new File(parentComponent.getConfigurationPath(), this.name + "-ds.xml");
      }

      ConnectionFactoryConfigurationEditor.updateConnectionFactory(
          deploymentFile, this.name, report);
    }
  }