Bug 973397

Summary: Unable to create configuration file backed "entity" with name it was created earlier but deleted
Product: [JBoss] JBoss Enterprise Application Platform 5 Reporter: Lukas Krejci <lkrejci>
Component: jbossasAssignee: Fernando Nasser <fnasser>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.2.0   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-11 21:41:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 885136    

Description Lukas Krejci 2013-06-11 21:00:51 UTC
Description of problem:

When using the ProfileService API, one can create a queue, topic, datasource (or possibly any other config file backed "entity"), which will create a corresponding XML configuration file in the deployment directory automatically (queue_XXX-service.xml, XXX-ds.xml, etc.).

When such entity is deleted (again through the ProfileService API), the configuration file is NOT deleted but the change is merely recorded in the data/attachments "journal".

An attempt to re-create such previously deleted entity fails with a complaint that "java.io.SyncFailedException:Deployment content already exists: /.../jboss-eap-5.2.0/jboss-as/server/default/deploy/testDS-ds.xml"

Version-Release number of selected component (if applicable):
discovered using EAP 5.2.0

How reproducible:
always

Steps to Reproduce:
See the dependent JBoss ON BZ on how to reproduce this using JBoss ON.

Actual results:
The re-creation of the entity fails complaining about an existing deployment file.

Expected results:
The re-creation of the entity should be successful regardless of a presence of a certain (ineffective) config file in the deploy dir.


Additional info:

Comment 1 Lukas Krejci 2013-06-11 21:41:35 UTC
I spoke too soon, ignore this.

The config files are considered deployments, while the individual entities in them are considered components. Removing a component doesn't remove the deployment. JBoss ON should be more clever about this and remove "empty" deployments.