Examples of BeanMetaData


Examples of org.jboss.beans.metadata.spi.BeanMetaData

         // add the injector the injection manager
         injectionManager.addInjector(eeInjector);
         // Deploy the Injector as a MC bean (so that the fully populated naming context (obtained via the SwitchBoard
         // Barrier) gets injected.
         String injectorMCBeanName = this.getInjectorMCBeanNamePrefix() + ",bean=" + ejbContainer.getEjbName();
         BeanMetaData injectorBMD = this.createInjectorBMD(injectorMCBeanName, eeInjector, switchBoard);
         this.jbossUnit.addAttachment(BeanMetaData.class + ":" + injectorMCBeanName, injectorBMD);
        
         // Add the Injector dependency on the deployment (so that the DU doesn't
         // get started till the Injector is available)
         DependencyPolicy dependsPolicy = ejbContainer.getDependencyPolicy();
         dependsPolicy.addDependency(injectorMCBeanName);
         log.debug("Added Injector dependency: " + injectorMCBeanName + " for EJB: " + ejbContainer.getEjbName() + " in unit " + this.jbossUnit);
      }
     
      // Now setup injectors for the interceptors of the bean
      InterceptorsMetaData interceptors = JBossMetaData.getInterceptors(beanMetaData.getEjbName(), beanMetaData.getJBossMetaData());
      if (interceptors == null || interceptors.isEmpty())
      {
         return;
      }
      for (InterceptorMetaData interceptor : interceptors)
      {
         if (interceptor == null)
         {
            continue;
         }
         JndiEnvironmentRefsGroup jndiEnvironmentForInterceptor = new JndiEnvironmentImpl(interceptor, ejbContainer.getClassloader());
         // For optimization, we'll create an Injector only if there's atleast one InjectionTarget
         if (this.hasInjectionTargets(jndiEnvironmentForInterceptor))
         {
            // create the injector
            EEInjector lazyEEInjector = new EEInjector(jndiEnvironmentForInterceptor);
            // add the injector the injection manager
            injectionManager.addInjector(lazyEEInjector);
            // Deploy the Injector as a MC bean (so that the fully populated naming context (obtained via the SwitchBoard
            // Barrier) gets injected.
            String interceptorInjectorMCBeanName = this.getInjectorMCBeanNamePrefix() + ",bean=" + ejbContainer.getEjbName() + ",interceptor=" + interceptor.getName();
            BeanMetaData injectorBMD = this.createInjectorBMD(interceptorInjectorMCBeanName, lazyEEInjector, switchBoard);
            this.jbossUnit.addAttachment(BeanMetaData.class + ":" + interceptorInjectorMCBeanName, injectorBMD);
           
            // Add the Injector dependency on the deployment (so that the DU doesn't
            // get started till the Injector is available)
            DependencyPolicy dependsPolicy = ejbContainer.getDependencyPolicy();
View Full Code Here

Examples of org.jboss.beans.metadata.spi.BeanMetaData

               {
                  String supplyName = "jndi:" + jndiName;
                  builder.addSupply(supplyName);
               }

               BeanMetaData mcbmd = builder.getBeanMetaData();
               log.info("installing bean: " + mcname);
               log.info("  with dependencies:");
               log.info("  and supplies:");
               for(SupplyMetaData smd : mcbmd.getSupplies())
               {
                  log.info("\t" + smd.getSupply());
               }
               mcBeanMD.add(mcbmd);
            }
View Full Code Here

Examples of org.jboss.beans.metadata.spi.BeanMetaData

   }

   @Override
   protected void setComponentName(PersistedComponent component, ManagedObject mo)
   {
      BeanMetaData bmd = (BeanMetaData) mo.getAttachment();
      // Set the current name
      component.setName(bmd.getName());
   }
View Full Code Here

Examples of org.jboss.beans.metadata.spi.BeanMetaData

      Map<String, BeanMetaData> beans = new HashMap<String, BeanMetaData>();
      for(BeanMetaData bmd : deployment.getBeans())
      {
         beans.put(bmd.getName(), bmd);
      }
      BeanMetaData bmd = beans.get(component.getOriginalName());
      // Create a new Bean
      if(bmd == null && create)
      {
         AbstractBeanMetaData bean = createEmptyBeanMetaData(component);
         if(deployment.getBeanFactories() == null)
View Full Code Here

Examples of org.jboss.beans.metadata.spi.BeanMetaData

        builder.addPropertyMetaData("server", builder.createInject("HornetQServer"));
       
        builder.addPropertyMetaData("config", config);

        BeanMetaData bean = builder.getBeanMetaData();

        unit.addAttachment(name, bean);
    }
View Full Code Here

Examples of org.jboss.beans.metadata.spi.BeanMetaData

      VirtualFile root = vfsUnit.getRoot();
      for (int i = 0; i < sessionFactoryMetaDatas.size(); i++)
      {
         // build the hibernate bean
         BeanMetaData beanMetaData = sessionFactoryMetaDatas.get(i).getBeanMetaData(root);
         vfsUnit.addAttachment(BeanMetaData.class + "$Hibernate#" + (i + 1), beanMetaData);
         log.debug("Created Hibernate bean: " + beanMetaData);
      }
   }
View Full Code Here

Examples of org.jboss.beans.metadata.spi.BeanMetaData

  
   private List<Password> readPasswordAnnotation(ControllerContext context) throws Exception
   {
      List<Password> passwordAnnotations = new ArrayList<Password>();
      AbstractKernelControllerContext akcc = (AbstractKernelControllerContext) context;
      BeanMetaData bmd = akcc.getBeanMetaData();
      Set<AnnotationMetaData> annotations = bmd.getAnnotations();
      for (AnnotationMetaData annotationMetaData : annotations)
      {
         Annotation annotation = annotationMetaData.getAnnotationInstance();
         if (annotation.annotationType() == Password.class)
         {
View Full Code Here

Examples of org.jboss.beans.metadata.spi.BeanMetaData

                  // add the injector the injection manager
                  injectionManager.addInjector(eeInjector);
                  // Deploy the Injector as a MC bean (so that the fully populated naming context (obtained via the SwitchBoard
                  // Barrier) gets injected.
                  String injectorMCBeanName = this.getInjectorMCBeanName(unit);
                  BeanMetaData injectorBMD = this.createInjectorBMD(injectorMCBeanName, eeInjector, switchBoard);
                  unit.addAttachment(BeanMetaData.class + ":" + injectorMCBeanName, injectorBMD);
                 
                  // Add the Injector dependency on the deployment (so that the DU doesn't
                  // get started till the Injector is available)
                  ServiceDependencyMetaData injectorDepdendency = new ServiceDependencyMetaData();
View Full Code Here

Examples of org.jboss.beans.metadata.spi.BeanMetaData

      // Recreate the kernel deployment
      deployment = createKernelDeployment(BEAN_NAMES);
      getPersistenceFactory().restorePersistenceRoot(root, deployment, null);
     
      // check bean meta data
      BeanMetaData bmd = getBeanMetaData(deployment, "SimpleAnnotatedBean");
      boolean sawProperty = false;
      for(PropertyMetaData prop : bmd.getProperties())
      {
         if(prop.getName().equals("stringProperty"))
         {
            assertEquals("changedTestValue", prop.getValue().getUnderlyingValue());
            sawProperty = true;
View Full Code Here

Examples of org.jboss.beans.metadata.spi.BeanMetaData

  
   protected ManagedObject getBeanMO(String name)
   {
      KernelControllerContext ctx = (KernelControllerContext) controller.getInstalledContext(name);
      assertNotNull(ctx);
      BeanMetaData bmd = ctx.getBeanMetaData();
      assertNotNull("null BeanMetaData", bmd);
      MetaData metaData = kernel.getMetaDataRepository().getMetaData(ctx);
      assertNotNull("null MetaData", metaData);
      return getMOF().initManagedObject(bmd, null, metaData, name, null);
   }
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.