Package org.apache.aries.blueprint

Examples of org.apache.aries.blueprint.ComponentDefinitionRegistry


      p.parse(bpxmlList);
      Set<URI> nsuris = p.getNamespaces();
      NamespaceHandlerSet nshandlers = nhri.getNamespaceHandlers(nsuris, b);
      p.validate(nshandlers.getSchema());
     
      ComponentDefinitionRegistry cdr = new ComponentDefinitionRegistryImpl();
      p.populate(nshandlers, cdr);
     
      BeanMetadata comp = (BeanMetadata) cdr.getComponentDefinition("top");
     
      BeanMetadata anon = (BeanMetadata) ((BeanProperty) comp.getProperties().get(0)).getValue();
      BeanMetadata anonToo = (BeanMetadata) ((BeanProperty) comp.getProperties().get(1)).getValue();

      assertEquals("Required", txenhancer.getComponentMethodTxAttribute(anon, "doSomething"));
View Full Code Here


      p.parse(bpxmlList);
      Set<URI> nsuris = p.getNamespaces();
      NamespaceHandlerSet nshandlers = nhri.getNamespaceHandlers(nsuris, b);
      p.validate(nshandlers.getSchema());
     
      ComponentDefinitionRegistry cdr = new ComponentDefinitionRegistryImpl();
      p.populate(nshandlers, cdr);
     
      BeanMetadata comp = (BeanMetadata) cdr.getComponentDefinition("top");
     
      BeanMetadata anon = (BeanMetadata) ((BeanProperty) comp.getProperties().get(0)).getValue();
      BeanMetadata anonToo = (BeanMetadata) ((BeanProperty) comp.getProperties().get(1)).getValue();

      assertEquals("Required", txenhancer.getComponentMethodTxAttribute(anon, "doSomething"));
View Full Code Here

      p.parse(bpxmlList);
      Set<URI> nsuris = p.getNamespaces();
      NamespaceHandlerSet nshandlers = nhri.getNamespaceHandlers(nsuris, b);
      p.validate(nshandlers.getSchema());
     
      ComponentDefinitionRegistry cdr = new ComponentDefinitionRegistryImpl();
      p.populate(nshandlers, cdr);
     
      BeanMetadata compRequiresNew = (BeanMetadata) cdr.getComponentDefinition("requiresNew");
      BeanMetadata compNoTx = (BeanMetadata) cdr.getComponentDefinition("noTx");
      BeanMetadata compSomeTx = (BeanMetadata) cdr.getComponentDefinition("someTx");
      BeanMetadata compAnotherBean = (BeanMetadata) cdr.getComponentDefinition("anotherBean");

      assertEquals("RequiresNew", txenhancer.getComponentMethodTxAttribute(compRequiresNew, "doSomething"));
      assertEquals("Never", txenhancer.getComponentMethodTxAttribute(compNoTx, "doSomething"));
      assertEquals("Required", txenhancer.getComponentMethodTxAttribute(compSomeTx, "doSomething"));
      assertEquals("Mandatory", txenhancer.getComponentMethodTxAttribute(compSomeTx, "getRows"));
View Full Code Here

             * 3. top level tx w/ method
             * 4. top level tx w/ no other attribute
             */
            //result = calculateBundleWideTransaction(component, methodName);
            String compId = component.getId();
            ComponentDefinitionRegistry cdr = getComponentDefinitionRegistry(compId);
            if (cdr == null) {
                // no bundle wide transaction configuration avail
              result = null;
            } else {
                List<BundleWideTxData> bundleData = bundleTransactionMap.get(cdr);
View Full Code Here

    }
   
    private ComponentDefinitionRegistry getComponentDefinitionRegistry(String compId) {
        Enumeration<ComponentDefinitionRegistry> keys = bundleTransactionMap.keys();
        while (keys.hasMoreElements()) {
            ComponentDefinitionRegistry cdr = keys.nextElement();
            Set<String> names = cdr.getComponentDefinitionNames();
            for (String name : names) {
                if (name.equals(compId)) {
                    return cdr;
                }
            }
View Full Code Here

        if ("transaction".equals(elt.getLocalName())) {
            if (LOGGER.isDebugEnabled())
                LOGGER.debug("parser adding interceptor for " + elt);

            ComponentDefinitionRegistry cdr = pc.getComponentDefinitionRegistry();
           
            if (cm == null) {
                // if the enclosing component is null, then we assume this is the top element
               
               
                String bean = elt.getAttribute(Constants.BEAN);
                registerComponentsWithInterceptor(cdr, bean);

                metaDataHelper.populateBundleWideTransactionData(pc.getComponentDefinitionRegistry(),
                        elt.getAttribute(Constants.VALUE), elt.getAttribute(Constants.METHOD), bean);
            } else {
                cdr.registerInterceptorWithComponent(cm, interceptor);
                if (LOGGER.isDebugEnabled())
                    LOGGER.debug("parser setting comp trans data for " + elt.getAttribute(Constants.VALUE) + "  "
                            + elt.getAttribute(Constants.METHOD));
   
                metaDataHelper.setComponentTransactionData(cm, elt.getAttribute(Constants.VALUE), elt
View Full Code Here

      p.parse(bpxmlList);
      Set<URI> nsuris = p.getNamespaces();
      NamespaceHandlerSet nshandlers = nhri.getNamespaceHandlers(nsuris, b);
      p.validate(nshandlers.getSchema());
     
      ComponentDefinitionRegistry cdr = new ComponentDefinitionRegistryImpl();
      p.populate(nshandlers, cdr);
           
      BeanMetadata compTop = (BeanMetadata) cdr.getComponentDefinition("top1");
      BeanMetadata compDown = (BeanMetadata) cdr.getComponentDefinition("down1");
     
      assertNotNull(compTop);
      assertNotNull(compDown);
     
      assertEquals("Required", txenhancer.getComponentMethodTxAttribute(compTop, "doSomething"));
View Full Code Here

      p.parse(bpxmlList);
      Set<URI> nsuris = p.getNamespaces();
      NamespaceHandlerSet nshandlers = nhri.getNamespaceHandlers(nsuris, b);
      p.validate(nshandlers.getSchema());
     
      ComponentDefinitionRegistry cdr = new ComponentDefinitionRegistryImpl();
      p.populate(nshandlers, cdr);
     
      BeanMetadata compTop = (BeanMetadata) cdr.getComponentDefinition("top2");
      BeanMetadata compDown = (BeanMetadata) cdr.getComponentDefinition("down2");
      BeanMetadata compMiddle = (BeanMetadata) cdr.getComponentDefinition("middle2");
     
      assertNotNull(compTop);
      assertNotNull(compDown);
      assertNotNull(compMiddle);
     
View Full Code Here

      p.parse(bpxmlList);
      Set<URI> nsuris = p.getNamespaces();
      NamespaceHandlerSet nshandlers = nhri.getNamespaceHandlers(nsuris, b);
      p.validate(nshandlers.getSchema());
     
      ComponentDefinitionRegistry cdr = new ComponentDefinitionRegistryImpl();
      p.populate(nshandlers, cdr);
     
      BeanMetadata compTop = (BeanMetadata) cdr.getComponentDefinition("top3");
      BeanMetadata compDown = (BeanMetadata) cdr.getComponentDefinition("down3");
      BeanMetadata compMiddle = (BeanMetadata) cdr.getComponentDefinition("middle3");
     
      assertNotNull(compTop);
      assertNotNull(compDown);
      assertNotNull(compMiddle);
     
View Full Code Here

    private Object addInterceptors(Object original)
            throws ComponentDefinitionException {

        Object intercepted = null;
        String beanName = getName();
        ComponentDefinitionRegistry reg = blueprintContainer
                .getComponentDefinitionRegistry();
        ComponentMetadata metaData = reg.getComponentDefinition(beanName);
        List<Interceptor> interceptors = reg.getInterceptors(metaData);
        if (interceptors != null && interceptors.size() > 0) {
            boolean asmAvailable = false;
            try {
                // Try load load an asm class (to make sure it's actually
                // available)
View Full Code Here

TOP

Related Classes of org.apache.aries.blueprint.ComponentDefinitionRegistry

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.