Bug 210313

Summary: Removing JPA facet does not clean up resources
Product: [WebTools] Dali JPA Tools Reporter: Tom Mutdosch <mutdosch>
Component: JPAAssignee: Neil Hauge <neil.hauge>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: neil.hauge, paul.fullbright
Version: 1.0.1Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Tom Mutdosch CLA 2007-11-19 18:13:40 EST
One of our users noted that if you add the JPA facet to a project it adds the persistence.xml and orm.xml files at that time.  But if you later remove the JPA facet, those resources are left around.  

I'm not sure what the general behavior for most facets is in the similar circumstance.  It might make sense that the artifacts should be cleaned up when the facet is removed.  I guess it depends on what the user would intend by removing the facet - if they no longer wanted JPA support in the application and removed the facet, when they ran on the server all of the JPA artifacts would still be loaded/executed which might no longer be intended.
Comment 1 Paul Fullbright CLA 2007-11-19 18:35:54 EST
Yes, this was intended behavior.  We didn't feel comfortable *deleting* resources when the facet was removed, especially because some users prefer to keep editing their JPA resources without our facet present.

Marking this as an enhancement.
Comment 2 Neil Hauge CLA 2008-07-10 13:13:52 EDT
I think in order to implement this there would need to be an additional step on Facet removal that allowed for a decision to be made by the user.  I'm not sure if there is any support for this in the facet framework at this time, but it is something that could be looked into.
Comment 3 Neil Hauge CLA 2011-07-01 16:24:43 EDT
Moving JPA specific bugs to new JPA component in bugzilla.