public static boolean isType(final DeploymentType deploymentType, final ResourceRoot resourceRoot) { return deploymentType == resourceRoot.getAttachment(Attachments.DEPLOYMENT_TYPE); }
ModuleRootMarker.mark(resourceRoot); } else { final Manifest manifest = resourceRoot.getAttachment(Attachments.MANIFEST); if (manifest != null) { Attributes main = manifest.getMainAttributes(); final ModuleMetaData md = root.getAttachment(org.jboss.as.ee.structure.Attachments.MODULE_META_DATA); if (md != null) { if (md.getType() == ModuleMetaData.ModuleType.Client) { DeploymentTypeMarker.setType(DeploymentType.APPLICATION_CLIENT, deploymentUnit); } else { final Manifest manifest = root.getAttachment(Attachments.MANIFEST); if (manifest != null) { Attributes main = manifest.getMainAttributes();
@Override public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); if (!DeploymentTypeMarker.isType(DeploymentType.EAR, deploymentUnit)) { return; } List<ResourceRoot> potentialSubDeployments = deploymentUnit.getAttachmentList(Attachments.RESOURCE_ROOTS); for (ResourceRoot resourceRoot : potentialSubDeployments) { if (ModuleRootMarker.isModuleRoot(resourceRoot)) { // module roots cannot be managed bean jars continue; } final Index index = resourceRoot.getAttachment(Attachments.ANNOTATION_INDEX); if (index != null) { if (!index.getAnnotations(MANAGED_BEAN).isEmpty()) { //this is a managed bean deployment SubDeploymentMarker.mark(resourceRoot); ModuleRootMarker.mark(resourceRoot); } } } }
Map<ResourceRoot, Index> annotationIndexes = new HashMap<ResourceRoot, Index>(); ResourceRootIndexer.indexResourceRoot(resourceRoot); Index index = resourceRoot.getAttachment(Attachments.ANNOTATION_INDEX); if (index != null) { annotationIndexes.put(resourceRoot, index);
final ModuleMetaData moduleMetaData = deploymentRoot.getAttachment(Attachments.MODULE_META_DATA); if (moduleMetaData != null) { deploymentUnitMap.put(moduleMetaData.getFileName(), subDeployment); final ModuleMetaData thisModulesMetadata = deploymentRoot.getAttachment(Attachments.MODULE_META_DATA); if (thisModulesMetadata != null && thisModulesMetadata.getType() != ModuleMetaData.ModuleType.Client) { ModuleMetaData previous = null;
/** * Process a deployment for standard ra deployment files. Will parse the xml * file and attach a configuration discovered during processing. * * @param phaseContext the deployment unit context * @throws DeploymentUnitProcessingException * */ @Override public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ResourceRoot deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT); final boolean resolveProperties = Util.shouldResolveSpec(deploymentUnit); final VirtualFile file = deploymentRoot.getRoot(); if (file == null || !file.exists()) return; final String deploymentRootName = file.getName().toLowerCase(Locale.ENGLISH); if (!deploymentRootName.endsWith(".rar")) { return; } final VirtualFile alternateDescriptor = deploymentRoot.getAttachment(org.jboss.as.ee.structure.Attachments.ALTERNATE_CONNECTOR_DEPLOYMENT_DESCRIPTOR); String prefix = ""; if (deploymentUnit.getParent() != null) { prefix = deploymentUnit.getParent().getName() + "#"; } String deploymentName = prefix + file.getName(); ConnectorXmlDescriptor xmlDescriptor = process(resolveProperties, file, alternateDescriptor, deploymentName); phaseContext.getDeploymentUnit().putAttachment(ConnectorXmlDescriptor.ATTACHMENT_KEY, xmlDescriptor); }
private static EjbJarMetaData parseEjbJarXml(final DeploymentUnit deploymentUnit) throws DeploymentUnitProcessingException { final ResourceRoot deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT); final VirtualFile alternateDescriptor = deploymentRoot.getAttachment(org.jboss.as.ee.structure.Attachments.ALTERNATE_EJB_DEPLOYMENT_DESCRIPTOR);
ModuleRootMarker.mark(resourceRoot); } else { final Index index = resourceRoot.getAttachment(Attachments.ANNOTATION_INDEX); if (index != null) { if (!index.getAnnotations(STATEFUL).isEmpty() ||
final VirtualFile alternateDescriptor = deploymentRoot.getAttachment(org.jboss.as.ee.structure.Attachments.ALTERNATE_WEB_DEPLOYMENT_DESCRIPTOR);
public static boolean isModuleRoot(ResourceRoot resourceRoot) { Boolean res = resourceRoot.getAttachment(MODULE_ROOT_MARKER); return res != null && res; }
public static boolean isSubDeployment(ResourceRoot resourceRoot) { Boolean res = resourceRoot.getAttachment(SUB_DEPLOYMENT_ROOT_MARKER); return res != null && res; }
public static boolean isIgnoreMetaInf(ResourceRoot resourceRoot) { final Boolean res = resourceRoot.getAttachment(IGNORE_META_INF); return res != null && res; }
public static boolean isIgnoreMetaInf(ResourceRoot resourceRoot) { final Boolean res = resourceRoot.getAttachment(IGNORE_META_INF); return res != null && res; }
public static boolean isSubExplodedResourceRoot(ResourceRoot resourceRoot) { Boolean res = resourceRoot.getAttachment(SUB_DEPLOYMENT_EXPLODED_MARKER); return res != null && res; }
public static boolean isModuleRoot(ResourceRoot resourceRoot) { Boolean res = resourceRoot.getAttachment(MODULE_ROOT_MARKER); return res != null && res; }
public static boolean isSubDeployment(ResourceRoot resourceRoot) { Boolean res = resourceRoot.getAttachment(SUB_DEPLOYMENT_ROOT_MARKER); return res != null && res; }
public static Manifest getManifest(ResourceRoot resourceRoot) throws DeploymentUnitProcessingException { Manifest manifest = resourceRoot.getAttachment(Attachments.MANIFEST); if (manifest == null) { final VirtualFile deploymentRoot = resourceRoot.getRoot(); try { manifest = VFSUtils.getManifest(deploymentRoot); } catch (IOException e) { throw ServerLogger.ROOT_LOGGER.failedToGetManifest(deploymentRoot, e); } } return manifest; }
public static Manifest getManifest(ResourceRoot resourceRoot) throws DeploymentUnitProcessingException { Manifest manifest = resourceRoot.getAttachment(Attachments.MANIFEST); if (manifest == null) { final VirtualFile deploymentRoot = resourceRoot.getRoot(); try { manifest = VFSUtils.getManifest(deploymentRoot); } catch (IOException e) { throw ServerLogger.ROOT_LOGGER.failedToGetManifest(deploymentRoot, e); } } return manifest; }
public static Manifest getManifest(ResourceRoot resourceRoot) throws DeploymentUnitProcessingException { Manifest manifest = resourceRoot.getAttachment(Attachments.MANIFEST); if (manifest == null) { final VirtualFile deploymentRoot = resourceRoot.getRoot(); try { manifest = VFSUtils.getManifest(deploymentRoot); } catch (IOException e) { throw ServerMessages.MESSAGES.failedToGetManifest(deploymentRoot, e); } } return manifest; }
public static Manifest getManifest(ResourceRoot resourceRoot) throws DeploymentUnitProcessingException { Manifest manifest = resourceRoot.getAttachment(Attachments.MANIFEST); if (manifest == null) { final VirtualFile deploymentRoot = resourceRoot.getRoot(); try { manifest = VFSUtils.getManifest(deploymentRoot); } catch (IOException e) { throw ServerMessages.MESSAGES.failedToGetManifest(deploymentRoot, e); } } return manifest; }