Package org.apache.aries.blueprint.di

Examples of org.apache.aries.blueprint.di.ExecutionContext


        }
        return loaded || orig.loadBeansOfType(type, listener);
    }

    public boolean hasConfiguredPropertyValue(String beanName, String propertyName, String value) {
        ExecutionContext origContext
            = ExecutionContext.Holder.setContext((ExecutionContext)container.getRepository());
        try {
            Recipe r = container.getRepository().getRecipe(beanName);
            if (r instanceof BeanRecipe) {
                BeanRecipe br = (BeanRecipe)r;
View Full Code Here


    private class Inconvertible {}
   
    @BeforeClass
    public static void before()
    {
        ExecutionContext.Holder.setContext(new ExecutionContext() {
            public void addFullObject(String name, Object object) {}
            public void addPartialObject(String name, Object object) {}
            public boolean containsObject(String name) { return false; }

            public Object convert(Object value, ReifiedType type) throws Exception {
View Full Code Here

    private void createService() {
        try {
            LOGGER.debug("Creating service instance");
            //We can't use the BlueprintRepository because we don't know what interfaces
            //to use yet! We have to be a bit smarter.
            ExecutionContext old = ExecutionContext.Holder.setContext(blueprintContainer.getRepository());
          
            try {
              Object o = serviceRecipe.create();
           
              if (o instanceof Convertible) {
View Full Code Here

      untrackServiceReferences();
    }

    public void injectBeanInstance(BeanMetadata bmd, Object o)
        throws IllegalArgumentException, ComponentDefinitionException {
        ExecutionContext origContext
            = ExecutionContext.Holder.setContext((ExecutionContext)getRepository());
        try {
            ComponentMetadata cmd = componentDefinitionRegistry.getComponentDefinition(bmd.getId());
            if (cmd == null || cmd != bmd) {
                throw new IllegalArgumentException(bmd.getId() + " not found in blueprint container");
View Full Code Here

    private class Inconvertible {}
   
    @BeforeClass
    public static void before()
    {
        ExecutionContext.Holder.setContext(new ExecutionContext() {
            public void addPartialObject(String name, Object object) {}
            public boolean containsObject(String name) { return false; }

            public Object convert(Object value, ReifiedType type) throws Exception {
                if (type.getRawClass().equals(Inconvertible.class)) throw new Exception();
View Full Code Here

TOP

Related Classes of org.apache.aries.blueprint.di.ExecutionContext

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.