Package org.apache.openejb

Examples of org.apache.openejb.Injection


        CoreContainerSystem containerSystem = new CoreContainerSystem(new IvmJndiFactory());
        WebContext webContext = new WebContext(application);
        webContext.setId(webApp.getId());
        webContext.setClassLoader(webModule.getClassLoader());
        webContext.getInjections().add(new Injection("SimpleEJBLocalBean", "simple", RestWithInjections.class));
        webContext.setJndiEnc(ctx);
        containerSystem.addWebContext(webContext);
        SystemInstance.get().setComponent(ContainerSystem.class, containerSystem);

        ServiceInfo serviceInfo = new ServiceInfo();
View Full Code Here


        CoreContainerSystem containerSystem = new CoreContainerSystem(new IvmJndiFactory());
        WebContext webContext = new WebContext(application);
        webContext.setId(webApp.getId());
        webContext.setClassLoader(webModule.getClassLoader());
        webContext.getInjections().add(new Injection("SimpleEJBLocalBean", "simple", RestWithInjections.class));
        webContext.setJndiEnc(ctx);
        containerSystem.addWebContext(webContext);
        SystemInstance.get().setComponent(ContainerSystem.class, containerSystem);

        ServiceInfo serviceInfo = new ServiceInfo();
View Full Code Here

    private static void updateInjections(final Collection<Injection> injections, final ClassLoader classLoader, final boolean keepInjection) {
        final Iterator<Injection> it = injections.iterator();
        final List<Injection> newOnes = new ArrayList<Injection>();
        while (it.hasNext()) {
            final Injection injection = it.next();
            if (injection.getTarget() == null) {
                try {
                    final Class<?> target = classLoader.loadClass(injection.getClassname());
                    if (keepInjection) {
                        final Injection added = new Injection(injection.getJndiName(), injection.getName(), target);
                        newOnes.add(added);
                    } else {
                        injection.setTarget(target);
                    }
                } catch (ClassNotFoundException cnfe) {
View Full Code Here

        CoreContainerSystem containerSystem = new CoreContainerSystem(new IvmJndiFactory());
        WebContext webContext = new WebContext(application);
        webContext.setId(webApp.getId());
        webContext.setClassLoader(webModule.getClassLoader());
        webContext.getInjections().add(new Injection("SimpleEJBLocalBean", "simple", RestWithInjections.class));
        webContext.setJndiEnc(ctx);
        containerSystem.addWebContext(webContext);
        SystemInstance.get().setComponent(ContainerSystem.class, containerSystem);

        ServiceInfo serviceInfo = new ServiceInfo();
View Full Code Here

    private static void updateInjections(final Collection<Injection> injections, final ClassLoader classLoader, final boolean keepInjection) {
        final Iterator<Injection> it = injections.iterator();
        final List<Injection> newOnes = new ArrayList<Injection>();
        while (it.hasNext()) {
            final Injection injection = it.next();
            if (injection.getTarget() == null) {
                try {
                    final Class<?> target = classLoader.loadClass(injection.getClassname());
                    if (keepInjection) {
                        final Injection added = new Injection(injection.getJndiName(), injection.getName(), target);
                        newOnes.add(added);
                    } else {
                        injection.setTarget(target);
                    }
                } catch (ClassNotFoundException cnfe) {
View Full Code Here

TOP

Related Classes of org.apache.openejb.Injection

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.