Package org.apache.openejb.api

Examples of org.apache.openejb.api.Proxy


                    if (!dynamicBean) {
                        annotationFinder = createFinder(clazz);
                        finder = new AnnotationFinder(new ClassesArchive(clazz));
                    } else {
                        final Class<?>[] classes;
                        final Proxy proxy = metaClass.getAnnotation(Proxy.class);
                        if (proxy == null) {
                            classes = new Class<?>[] { clazz };
                        } else {
                            classes = new Class<?>[] { clazz, proxy.value() };
                        }
                        annotationFinder = createFinder(classes);
                        finder = new AnnotationFinder(new ClassesArchive(classes));
                    }
                }
View Full Code Here


                    }

                    final Class<?> proxyClass;
                    if (ejbClass.isInterface()) { // dynamic proxy implementation
                        bean.setLocal(ejbClass.getName());
                        final Proxy proxyAnnotation = (Proxy) new MetaAnnotatedClass(ejbClass).getAnnotation(Proxy.class);
                        if (proxyAnnotation != null) {
                            proxyClass = proxyAnnotation.value();
                        } else {
                            proxyClass = QueryProxy.class;
                        }
                        bean.setProxy(proxyClass.getName());
                    } else {
View Full Code Here

        Class<?> localhome = null;
        Class<?> local = null;
        Class<?> proxy = null;
        if (ejbClass.isInterface()) { // dynamic proxy implementation
            local = ejbClass;
            Proxy proxyAnnotation = AnnotationUtil.getAnnotation(Proxy.class, ejbClass);
            if (proxyAnnotation != null) {
                proxy = proxyAnnotation.value();
            }
        }
        if (bean.localHome != null) {
            localhome = loadClass(bean.localHome, "classNotFound.localHome");
            local = loadClass(bean.local, "classNotFound.local");
View Full Code Here

        Class<?> localhome = null;
        Class<?> local = null;
        Class<?> proxy = null;
        if (ejbClass.isInterface()) { // dynamic proxy implementation
            local = ejbClass;
            Proxy proxyAnnotation = AnnotationUtil.getAnnotation(Proxy.class, ejbClass);
            if (proxyAnnotation != null) {
                proxy = proxyAnnotation.value();
            }
        }
        if (bean.localHome != null) {
            localhome = loadClass(bean.localHome, "classNotFound.localHome");
            local = loadClass(bean.local, "classNotFound.local");
View Full Code Here

                    final AnnotationFinder af = (AnnotationFinder) ejbModule.getFinder();

                    final List<Class<?>> ancestors = Classes.ancestors(clazz);
                    ancestors.addAll(asList(clazz.getInterfaces()));
                    if (dynamicBean) {
                        final Proxy p = metaClass.getAnnotation(Proxy.class);
                        if (p != null) {
                            ancestors.add(p.value());
                        }
                    }

                    final String[] names = new String[ancestors.size()];
                    int i = 0;
                    for (final Class<?> ancestor : ancestors) {
                        names[i++] = ancestor.getName();
                    }
                    annotationFinder = af.select(names);
                } else { // shouldn't occur
                    if (!dynamicBean) {
                        annotationFinder = createFinder(clazz);
                    } else {
                        final Class<?>[] classes;
                        final Proxy proxy = metaClass.getAnnotation(Proxy.class);
                        if (proxy == null) {
                            classes = new Class<?>[]{clazz};
                        } else {
                            classes = new Class<?>[]{clazz, proxy.value()};
                        }
                        annotationFinder = createFinder(classes);
                    }
                }
View Full Code Here

                    }

                    final Class<?> proxyClass;
                    if (ejbClass.isInterface()) { // dynamic proxy implementation
                        bean.setLocal(ejbClass.getName());
                        final Proxy proxyAnnotation = (Proxy) new MetaAnnotatedClass(ejbClass).getAnnotation(Proxy.class);
                        if (proxyAnnotation != null) {
                            proxyClass = proxyAnnotation.value();
                        } else {
                            proxyClass = QueryProxy.class;
                        }
                        bean.setProxy(proxyClass.getName());
                    } else {
View Full Code Here

                    if (!dynamicBean) {
                        annotationFinder = createFinder(clazz);
                        finder = new AnnotationFinder(new ClassesArchive(clazz));
                    } else {
                        final Class<?>[] classes;
                        final Proxy proxy = metaClass.getAnnotation(Proxy.class);
                        if (proxy == null) {
                            classes = new Class<?>[]{clazz};
                        } else {
                            classes = new Class<?>[]{clazz, proxy.value()};
                        }
                        annotationFinder = createFinder(classes);
                        finder = new AnnotationFinder(new ClassesArchive(classes));
                    }
                }
View Full Code Here

                    }

                    final Class<?> proxyClass;
                    if (ejbClass.isInterface()) { // dynamic proxy implementation
                        bean.setLocal(ejbClass.getName());
                        final Proxy proxyAnnotation = (Proxy) new MetaAnnotatedClass(ejbClass).getAnnotation(Proxy.class);
                        if (proxyAnnotation != null) {
                            proxyClass = proxyAnnotation.value();
                        } else {
                            proxyClass = QueryProxy.class;
                        }
                        bean.setProxy(proxyClass.getName());
                    } else {
View Full Code Here

                    if (!dynamicBean) {
                        annotationFinder = createFinder(clazz);
                        finder = new AnnotationFinder(new ClassesArchive(clazz));
                    } else {
                        final Class<?>[] classes;
                        final Proxy proxy = metaClass.getAnnotation(Proxy.class);
                        if (proxy == null) {
                            classes = new Class<?>[]{clazz};
                        } else {
                            classes = new Class<?>[]{clazz, proxy.value()};
                        }
                        annotationFinder = createFinder(classes);
                        finder = new AnnotationFinder(new ClassesArchive(classes));
                    }
                }
View Full Code Here

                    if (!dynamicBean) {
                        annotationFinder = createFinder(clazz);
                        finder = new AnnotationFinder(new ClassesArchive(clazz));
                    } else {
                        final Class<?>[] classes;
                        final Proxy proxy = metaClass.getAnnotation(Proxy.class);
                        if (proxy == null) {
                            classes = new Class<?>[]{clazz};
                        } else {
                            classes = new Class<?>[]{clazz, proxy.value()};
                        }
                        annotationFinder = createFinder(classes);
                        finder = new AnnotationFinder(new ClassesArchive(classes));
                    }
                }
View Full Code Here

TOP

Related Classes of org.apache.openejb.api.Proxy

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.