Package org.apache.tuscany.spi

Examples of org.apache.tuscany.spi.ObjectCreationException


        try {
            method.invoke(instance, objectFactory.getInstance());
        } catch (IllegalAccessException e) {
            throw new AssertionError("Method is not accessible [" + method + "]");
        } catch (IllegalArgumentException e) {
            ObjectCreationException oce = new ObjectCreationException("Exception thrown by setter", e);
            oce.setIdentifier(method.getName());
            throw oce;
        } catch (InvocationTargetException e) {
            ObjectCreationException oce = new ObjectCreationException("Exception thrown by setter", e);
            oce.setIdentifier(method.getName());
            throw oce;
        }
    }
View Full Code Here


        } catch (InstantiationException e) {
            throw new AssertionError("Class is not instantiable [" + ctr.getDeclaringClass().getName() + "]");
        } catch (IllegalAccessException e) {
            throw new AssertionError("Constructor is not accessible [" + ctr + "]");
        } catch (InvocationTargetException e) {
            throw new ObjectCreationException("Exception thrown by constructor [" + ctr + "]", e);
        }
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    public T getInstance() throws ObjectCreationException {
        try {
            return (T) context.lookup(name);
        } catch (NamingException e) {
            throw new ObjectCreationException(e);
        }
    }
View Full Code Here

    public Object createInstance() throws ObjectCreationException {
        GroovyObject instance;
        try {
            instance = groovyClass.newInstance();
        } catch (IllegalAccessException e) {
            throw new ObjectCreationException(e);
        } catch (InstantiationException e) {
            throw new ObjectCreationException(e);
        }

        // inject properties
        for (Map.Entry<String, ObjectFactory> property : properties.entrySet()) {
            instance.setProperty(property.getKey(), property.getValue().getInstance());
View Full Code Here

TOP

Related Classes of org.apache.tuscany.spi.ObjectCreationException

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.