/** * Specifies the the Deployable Unit this component belongs. This method * also sets the reverse relation, adding the component to the deployable * unit * * @param deployableUnit * @throws AlreadyDeployedException * if a component with same id already exists in the du * @throws IllegalStateException * if this method is invoked and the deployable unit was already * set before */ public void setDeployableUnit(DeployableUnit deployableUnit) throws AlreadyDeployedException { if (this.deployableUnit != null) { throw new IllegalStateException( "deployable unit already set. du = " + this.deployableUnit); } this.deployableUnit = deployableUnit; if (!addToDeployableUnit()) { throw new AlreadyDeployedException( "unable to install du having multiple components with id " + getComponentID()); } }
e); logger.error(ex.getMessage(), ex); throw ex; } catch (Exception ex) {
private void installEventType(MobicentsEventTypeDescriptor descriptorImpl) throws AlreadyDeployedException { ComponentKey ckey = new ComponentKey(descriptorImpl.getName(), descriptorImpl.getVendor(), descriptorImpl.getVersion()); if (this.eventKeyToEventTypeIDMap.get(ckey) == null) { EventTypeIDImpl eventTypeID = new EventTypeIDImpl(ckey); if (logger.isDebugEnabled()) logger.debug("Installing event " + eventTypeID); this.eventTypeIDToDescriptor.put(eventTypeID, descriptorImpl); this.eventKeyToEventTypeIDMap.put(ckey, eventTypeID); this.eventTypeIDToEventKeyMap.put(eventTypeID, ckey); this.eventTypeIDs.put(new Integer(eventTypeID.getEventID()), eventTypeID); descriptorImpl.setID(eventTypeID); logger.info("Installed event " + ckey); } else { throw new AlreadyDeployedException("The event " + ckey + " is already deployed"); } }
if (componentRepository.isInstalled(sleeComponent .getComponentID())) { throw new AlreadyDeployedException("Component " + sleeComponent.getComponentID() + " already deployed"); if (componentRepository.isInstalled(serviceComponent .getComponentID())) { throw new AlreadyDeployedException("Component " + serviceComponent.getComponentID() + " already deployed");
throw new AlreadyDeployedException( "there is already a DU deployed for url " + url);