if (parentId != null) {
if (defaultParentId != null) {
    public ConfigurationData buildConfiguration(Object plan, JarFile module, File outfile) throws IOException, DeploymentException {        if (plan == null) {            log.warn("Expected a Descriptor but received null");            return null;        }        if (plan instanceof Descriptor == false) {            log.warn("Expected a Descriptor but received a " + plan.getClass().getName());            return null;        }                DeploymentContext context = null;        try {            URI configId = getConfigurationID(plan, module);            List parentId = new ArrayList();            if (parentId != null) {                for (Iterator iter = defaultParentId.iterator(); iter.hasNext();) {                    String element = (String) iter.next();                    parentId.add(new URI(element));                }            }            context = new DeploymentContext(outfile, configId, ConfigurationModuleType.SERVICE, parentId, null, null, kernel);                        // Create the JBI deployment managed object            Properties props = new Properties();            props.put("jbiType", "JBIModule");            props.put("name", configId.toString());            ObjectName name = ObjectName.getInstance(context.getDomain(), props);            GBeanData gbeanData = new GBeanData(name, ServiceMixDeployment.GBEAN_INFO);            gbeanData.setAttribute("name", module.getName());            context.addGBean(gbeanData);            try {                servicemix.getContainer().getAdminCommandsService().installArchive(module.getName());            } catch (javax.jbi.management.DeploymentException e) {                throw new DeploymentException("Could not deploy jbi package", e);            }        } catch (Exception e) {            throw new DeploymentException("Unable to deploy", e);        } finally {            if (context != null) {                context.close();            }        }                return context.getConfigurationData();    }