DeploymentManager mgr = ManagementHelper.getManagementHelper(request).getDeploymentManager();
try {
File rarFile = PortletManager.getRepositoryEntry(request, data.getRarURI());
Bundle rarBundle = PortletManager.getRepositoryEntryBundle(request, data.getRarURI());
ConnectorDeployable deployable = new ConnectorDeployable(rarBundle);
DeploymentConfiguration config = mgr.createConfiguration(deployable);
final DDBeanRoot ddBeanRoot = deployable.getDDBeanRoot();
Connector15DCBRoot root = (Connector15DCBRoot) config.getDConfigBeanRoot(ddBeanRoot);
ConnectorDCB connector = (ConnectorDCB) root.getDConfigBean(ddBeanRoot.getChildBean(root.getXpaths()[0])[0]);
EnvironmentData environment = new EnvironmentData();