Bug 607305 - Deleting an exploded .ear file from JON doesn't remove the exploded contents
Summary: Deleting an exploded .ear file from JON doesn't remove the exploded contents
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 3.0.0
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-23 18:26 UTC by dsteigne
Modified: 2022-03-31 04:28 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description dsteigne 2010-06-23 18:26:36 UTC
Description of problem:

If you deploy an .ear file to an EAP 5.0 instance with the JON GUI, you will see the .ear file and it's contents (.war, .jar files) in that Resources inventory.  If you then click on the .ear file to Delete it the exploded files remain and have to be removed with &debug=true

Expected results:


Additional info:

Comment 1 Pilar Bravo 2011-01-19 09:29:37 UTC
I'm trying to undeploy an EAR remotely via CLI.

I can easily delete the EAR with

ResourceFactoryManager.deleteResource(child.id);

However, the corresponding EJBs (in my case Stateless Session Beans) are not deleted. They are not EAR's child resources, so the only way I've found to delete them is this (or use debug=true in the GUI):

var SLSB = "Stateless Session Bean"
if (childType.match(new RegExp(SLSB))){
println(" SLSB found with name " + child.name + " and ID " + child.id + " and type " + childType);
println(" deleting....");
try{
ResourceFactoryManager.deleteResource(child.id);
}
catch( ex ) {
println(" --> Caught " + ex );
error();
}
}

The problem I find at this point is this exception:

Caused by: org.rhq.core.clientapi.agent.PluginContainerException: Component does not support the [org.rhq.core.pluginapi.inventory.DeleteResourceFacet] interface: ResourceContainer[resource=Resource[id=12421, type=Stateless Session EJB, key=jboss.management.local:EJBModule=BitacoraEJB-3.4.jar,J2EEApplication=BitacoraEar.ear,J2EEServer=Local,j2eeType=StatelessSessionBean,name=MaterialBean, name=MaterialBean, parent=nostromo:1099 node1]]


Apparently the EJBs don't support the delete operation.

This is a big problem when using JON to deploy/undeploy applications remotely.


Note You need to log in before you can comment on or make changes to this bug.