Package org.jboss.deployers.structure.spi

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


         InputStream is = null;
         try
         {
            if (local)
            {
               DeploymentUnit localUnit = deploymentUnitLocal.get();
               if (localUnit instanceof VFSDeploymentUnit)
               {
                  VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit)localUnit;
                  VirtualFile vf = vfsUnit.getFile(resourceName);
                  if (vf != null)
View Full Code Here


      {
         authenticatorConfig();
      }

      // Find and configure overlays
      DeploymentUnit deploymentUnit = deploymentUnitLocal.get();
      if (ok && (deploymentUnit != null)) {
         Set<VirtualFile> overlays = (Set<VirtualFile>)
            deploymentUnit.getAttachment(MergedJBossWebMetaDataDeployer.WEB_OVERLAYS_ATTACHMENT_NAME);
         if (overlays != null)
         {
            if (context.getResources() instanceof ProxyDirContext) {
               ProxyDirContext resources = (ProxyDirContext) context.getResources();
               for (VirtualFile overlay : overlays)
View Full Code Here

   {
      PolicyConfiguration pc = unit.getAttachment(PolicyConfiguration.class);
      if (pc == null)
         return;

      DeploymentUnit parent = unit.getParent();
      if (parent == null)
         throw new IllegalStateException("Unit has not parent: " + unit);
      PolicyConfiguration parentPc = parent.getAttachment(PolicyConfiguration.class);
      try
      {
         if (parentPc != null && pc != parentPc)
         {
            parentPc.linkConfiguration(pc);
View Full Code Here

  
   protected void testBootstrap(VirtualFile ear, RunSpecificTest test) throws Exception
   {
      enableTrace("org.jboss.dependency.plugins.");
      Deployment deployment = deploy(ear);
      DeploymentUnit earDU = null;
      try
      {
         earDU = getMainDeployerStructure().getDeploymentUnit(deployment.getName());

         //Check that the flat deployment bean has been started
View Full Code Here

      mainDeployer.addDeployment(deployment);
      mainDeployer.process();
      try
      {
         DeploymentUnit earDU = getMainDeployerStructure().getDeploymentUnit(deployment.getName());

         //Check that the flat deployment bean has been started
         FlatDeployment flatDeployment = (FlatDeployment)getBean(DeployersUtils.getDeploymentBeanName(earDU));
         assertNotNull(flatDeployment);
View Full Code Here

      String name = contextMap.get(url);
      if (name == null)
         return null;

      DeploymentContext context = getDeploymentContext(url);
      DeploymentUnit du = context.getDeploymentUnit();
      log.debug("getDeploymentUnit, url="+url+", du="+du);
      return du;
   }
View Full Code Here

            List<BeanMetaData> beans = bmdf.getBeans();
            if(beans != null)
            {
               for(BeanMetaData bmd : beans)
               {
                  DeploymentUnit compUnit = unit.getComponent(bmd.getName());
                  if(compUnit == null)
                  {
                     log.debug("Failed to find component for bean: "+bmd.getName());
                     continue;
                  }
                  MetaData compMetaData = compUnit.getMetaData();
                  GenericValue gv = getManagedObjectValue(bmd, compMetaData, bmdfMO);
                  if(gv != null)
                  {
                     // The component managed objects need to be in the root map
                     ManagedObject compMO = (ManagedObject) gv.getValue();
                     // Use the ManagedObject name if it's not the same as the attachmentName
                     String managedObjectName = compUnit.getName();
                     if(compMO != null && compMO.getAttachmentName() != null)
                     {
                        managedObjectName = compMO.getAttachmentName().equals(compMO.getName()) ?
                              compUnit.getName() : compMO.getName();
                     }
                     // Add the managed object
                     managedObjects.put(managedObjectName, compMO);
                     // Add the bean MO to the beans list
                     tmpBeans.add(gv);
View Full Code Here

    * @param jbossWebMD jboss web meta data
    * @return context root
    */
   private String getContextRoot(final Deployment dep, final JBossWebMetaData jbossWebMD)
   {
      final DeploymentUnit unit = WSHelper.getRequiredAttachment(dep, DeploymentUnit.class);
      final JBossAppMetaData jbossAppMD = unit.getParent() == null ? null : ASHelper.getOptionalAttachment(unit
            .getParent(), JBossAppMetaData.class);

      String contextRoot = null;

      if (jbossAppMD != null)
View Full Code Here

    * @param dep webservice deployment
    */
   @Override
   public void start(final Deployment dep)
   {
      final DeploymentUnit unit = WSHelper.getRequiredAttachment(dep, DeploymentUnit.class);
      final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep, JBossWebMetaData.class);
      final Map<Class<? extends Annotation>, ReferenceResolver> resolvers = this.getResolvers(unit);

      if (WSHelper.isJaxwsJseDeployment(dep))
      {
View Full Code Here

  
   public void testEjbJar_War() throws Exception
   {
      // ejb.jar
      JavaArchive ejbJar = createEjbJar(true);
      DeploymentUnit unit = assertDeploy(ejbJar);
      Class<?> plainJavaBeanClass = getClass(PlainJavaBean.class, unit);
      Deployment deployment1 = initializeDeploymentBean(unit);
      // simple.war
      WebArchive war = createWar(true);
      unit = assertDeploy(war);
View Full Code Here

TOP

Related Classes of org.jboss.deployers.structure.spi.DeploymentUnit

Copyright © 2018 www.massapicom. 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.