Examples of DeploymentUnit


Examples of org.jboss.deployers.structure.spi.DeploymentUnit

      if (log.isTraceEnabled())
      {
         log.trace("Resolving relative message-destination-link: " + link);
      }
      DeploymentUnit top = unit.getTopLevel();
      DeploymentUnit targetUnit = findLinkPath(top, path);
      if (targetUnit == null)
      {
         log.warn("Can't locate DeploymentUnit for target: " + path);
         return null;
      }

      if (log.isTraceEnabled())
         log.trace("Found appropriate DeploymentUnit: " + targetUnit);

      MessageDestinationMetaData md = null;
      MessageDestinationsMetaData mds = null;
      if (targetUnit.getAttachment(JBossMetaData.class) != null)
      {
         JBossMetaData appMD = targetUnit.getAttachment(JBossMetaData.class);
         mds = appMD.getAssemblyDescriptor().getMessageDestinations();
         md = mds.get(destinationName);
      }
      if (targetUnit.getAttachment(JBossWebMetaData.class) != null)
      {
         JBossWebMetaData webMD = targetUnit.getAttachment(JBossWebMetaData.class);
         mds = webMD.getMessageDestinations();
         md = mds.get(destinationName);
      }

      if(md == null)
View Full Code Here

Examples of org.jboss.deployers.structure.spi.DeploymentUnit

      // Search each subcontext
      Iterator<DeploymentUnit> it = unit.getChildren().iterator();
      while (it.hasNext())
      {
         DeploymentUnit child = it.next();
         MessageDestinationMetaData mdMD = resolveAbsoluteMessageDestination(child, link, searched);
         if (mdMD != null)
            return mdMD;
      }
View Full Code Here

Examples of org.jboss.deployers.structure.spi.DeploymentUnit

   }

   private static DeploymentUnit findLinkPath(DeploymentUnit top, String path)
   {
      List<DeploymentUnit> children = top.getChildren();
      DeploymentUnit targetUnit = null;
      if(children != null)
      {
         for(DeploymentUnit child : children)
         {
            String childPath = child.getRelativePath();
View Full Code Here

Examples of org.jboss.deployers.structure.spi.DeploymentUnit

      return targetUnit;
   }

   private void dump(DeploymentUnit unit)
   {
      DeploymentUnit top = unit.getTopLevel();
      StringBuffer tmp = new StringBuffer();
      dump(top, tmp, 0);
      log.debug("Processing unit:\n"+tmp);
   }
View Full Code Here

Examples of org.jboss.deployers.structure.spi.DeploymentUnit

         return resolveRelativeLink(server, di, link, isLocal);
      }
      else
      {
         // <ejb-link> contains a Bean Name, scan the DeploymentUnit tree
         DeploymentUnit top = di.getTopLevel();
         return resolveAbsoluteLink(top, link, isLocal);
      }
   }
View Full Code Here

Examples of org.jboss.deployers.structure.spi.DeploymentUnit

      {
         log.warn("Can't construct URL for: " + ourPath);
         return null;
      }

      DeploymentUnit targetUnit = null;
      try
      {
         DeploymentContext ctx = server.getDeploymentContext(target.toString());
         targetUnit = ctx.getDeploymentUnit();
      }
      catch (Exception e)
      {
         log.warn("Got Exception when looking for DeploymentUnit: " + e);
         return null;
      }

      if (targetUnit == null)
      {
         log.warn("Can't locate DeploymentUnit for target: " + target);
         return null;
      }

      if (log.isTraceEnabled())
      {
         log.trace("Found appropriate DeploymentUnit: " + targetUnit);
      }

      String linkTarget = null;
      if (targetUnit.getAttachment(JBossMetaData.class) != null)
      {
         JBossMetaData appMD = targetUnit.getAttachment(JBossMetaData.class);
         JBossEnterpriseBeanMetaData beanMD = appMD.getEnterpriseBean(ejbName);

         if (beanMD != null)
         {
            linkTarget = getJndiName(beanMD, isLocal);
View Full Code Here

Examples of org.jboss.deployers.structure.spi.DeploymentUnit

      // Search each subcontext
      Iterator<DeploymentUnit> it = unit.getChildren().iterator();
      while (it.hasNext() && ejbName == null)
      {
         DeploymentUnit child = it.next();
         ejbName = resolveAbsoluteLink(child, link, isLocal);
      }

      return ejbName;
   }
View Full Code Here

Examples of org.jboss.deployers.structure.spi.DeploymentUnit

         // link is specified in the form path/file.jar#Bean
         return resolveRelativeMessageDestination(server, di, link);
      else
      {
         // link contains a Bean Name, scan the DeploymentUnit tree
         DeploymentUnit top = di.getTopLevel();
         return resolveAbsoluteMessageDestination(top, link);
      }
   }
View Full Code Here

Examples of org.jboss.deployers.structure.spi.DeploymentUnit

      {
         log.warn("Can't construct URL for: " + ourPath);
         return null;
      }

      DeploymentUnit targetUnit = null;
      try
      {
         DeploymentContext ctx = server.getDeploymentContext(target.toString());
         targetUnit = ctx.getDeploymentUnit();
      }
      catch (Exception e)
      {
         log.warn("Got Exception when looking for DeploymentUnit: " + e);
         return null;
      }

      if (targetUnit == null)
      {
         log.warn("Can't locate DeploymentUnit for target: " + target);
         return null;
      }

      if (log.isTraceEnabled())
         log.trace("Found appropriate DeploymentUnit: " + targetUnit);

      if (targetUnit.getAttachment(JBossMetaData.class) != null)
      {
         JBossMetaData appMD = targetUnit.getAttachment(JBossMetaData.class);
         return appMD.getAssemblyDescriptor().getMessageDestination(destinationName);
      }
      if (targetUnit.getAttachment(JBossWebMetaData.class) != null)
      {
         JBossWebMetaData webMD = targetUnit.getAttachment(JBossWebMetaData.class);
         return webMD.getMessageDestination(destinationName);
      }
      else
      {
         log.warn("DeploymentUnit " + targetUnit + " is not an EJB .jar " + "file!");
View Full Code Here

Examples of org.jboss.deployers.structure.spi.DeploymentUnit

         processWebMetaData(sharedJBossWebMetaData);
      }

      ServletContext servletContext = context.getServletContext();
      Kernel kernel = kernelLocal.get();
      DeploymentUnit unit = deploymentUnitLocal.get();
      log.debug("Setting MC attributes, kernel: " + kernel + ", unit: " + unit);
      servletContext.setAttribute(KernelConstants.KERNEL_NAME, kernel);
      servletContext.setAttribute(DeploymentUnit.class.getName(), unit);
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.