public ComponentID[] getComponents() { return deployableUnitDescriptor.getComponents(); }
public DeployableUnitDescriptorEx(DeployableUnitDescriptor deployableUnitDescriptor, DeployableUnitID deployableUnitID) { super(deployableUnitID, new Date() /* FIXME */, deployableUnitDescriptor.getComponents()); this.deployableUnitDescriptor = deployableUnitDescriptor; this.deployableUnitID = deployableUnitID; }
/** * Returns the ServiceIDs of all services contained in the given deployable unit. */ private ServiceID[] getServices(DeployableUnitID duID) throws TCKTestErrorException { try { DeployableUnitDescriptor duDes = this.deploymentMBeanProxy.getDescriptor(duID); ComponentID[] componentIDs = duDes.getComponents(); ServiceID[] serviceIDs = new ServiceID[componentIDs.length]; int serviceCount = 0; for (int i = 0; i < componentIDs.length; i++) { if(componentIDs[i] instanceof ServiceID) serviceIDs[serviceCount++] = (ServiceID)componentIDs[i]; } if(serviceCount < serviceIDs.length) { ServiceID[] copyTo = new ServiceID[serviceCount]; System.arraycopy(serviceIDs,0,copyTo,0,serviceCount); serviceIDs = copyTo; } return serviceIDs; } catch(Exception e) { throw new TCKTestErrorException("Caught Exception while trying to get ServiceIDs from DeployableUnitID "+duID,e); } }
public void stop(DeploymentInfo di) throws DeploymentException { log.info( "Undeploying: " + di.url ); try { DeployableUnitID did = (DeployableUnitID)di.metaData; // if the start failed did would be null if (did == null) return; DeployableUnitDescriptor dud = sleeDeploymentMBean.getDescriptor(did); deactivateComponents( dud.getComponents() ); sleeDeploymentMBean.uninstall(did); } catch (Exception e) { throw new DeploymentException( "problem stopping SLEE module: " + di.url, e ); } super.stop(di); }
activateComponents( dud.getComponents() );
static public DeployableUnitInfo toDeployableUnitInfo(DeployableUnitDescriptor deployableUnitDescriptor) { String id = toString(deployableUnitDescriptor.getID()); /* * ammendonca ; if (deployableUnitDescriptor instanceof * DeployableUnitDescriptorEx) id = toString(((DeployableUnitDescriptorEx) * deployableUnitDescriptor) .getDeployableUnitID()); else id = null; */ return new DeployableUnitInfo(ComponentInfoUtils.toStringArray(deployableUnitDescriptor.getComponents()), deployableUnitDescriptor.getDeploymentDate(), deployableUnitDescriptor.getURL(), getDeployableUnitName(deployableUnitDescriptor), id); }