Package org.apache.openejb.cdi.api

Examples of org.apache.openejb.cdi.api.Hessian


        }

        final Bean<X> bean = processBean.getBean();
        final Class<?> beanClass = bean.getBeanClass();
        for (final Class<?> itf : beanClass.getInterfaces()) {
            final Hessian hessian = itf.getAnnotation(Hessian.class);
            final String key = "openejb.hessian." + beanClass.getName() + "_" + itf.getName() + ".path";
            final String path = appInfo.properties.getProperty(key, SystemInstance.get().getProperty(key));
            if (hessian != null || path != null) {
                toDeploy.add(new Deployment(itf, path, bean));
            }
View Full Code Here


        }

        final HessianRegistry registry = service.getRegistry();

        for (final Deployment deployment : toDeploy) {
            final Hessian hessian = deployment.itf.getAnnotation(Hessian.class);
            final HessianServer server;
            try {
                server = new HessianServer(deployment.bean.getBeanClass().getClassLoader());
            } catch (final HessianServer.HessianIsMissingException e) {
                LOGGER.info("Hessian is not available so openejb-hessian will not deploy any service");
                break;
            }

            try {
                if (hessian != null && hessian.serializerFactory() != Object.class && !hessian.serializerFactory().isInstance(server.getSerializerFactory())) {
                    server.serializerFactory(hessian.serializerFactory().newInstance());
                }
            } catch (final Exception e) {
                throw new OpenEJBRuntimeException(e);
            }
            if (hessian != null) {
                server.sendCollectionType(hessian.sendCollectionType());
            }
            if (Dependent.class.equals(deployment.bean.getScope())) {
                LOGGER.warning("@Dependent can lead to memory leaks ATM");
            }
            server.createSkeleton(bm.getReference(deployment.bean, deployment.itf, null), deployment.itf);
View Full Code Here

    private static String getName(final String path, final Class<?> itf) {
        if (path != null) {
            return path;
        }

        final Hessian hessian = itf.getAnnotation(Hessian.class);
        if (hessian != null) {
            final String name = hessian.path();
            if (name.isEmpty()) {
                return itf.getName();
            }
            return name;
        }
View Full Code Here

        }

        final Bean<X> bean = processBean.getBean();
        final Class<?> beanClass = bean.getBeanClass();
        for (final Class<?> itf : beanClass.getInterfaces()) {
            final Hessian hessian = itf.getAnnotation(Hessian.class);
            final String key = "openejb.hessian." + beanClass.getName() + "_" + itf.getName() + ".path";
            final String path = appInfo.properties.getProperty(key, SystemInstance.get().getProperty(key));
            if (hessian != null || path != null) {
                toDeploy.add(new Deployment(itf, path, bean));
            }
View Full Code Here

        final HessianRegistry registry = service.getRegistry();

        final String appName = findAppName();
        for (final Deployment deployment : toDeploy) {
            final Hessian hessian = deployment.itf.getAnnotation(Hessian.class);
            final HessianServer server;
            try {
                server = new HessianServer(deployment.bean.getBeanClass().getClassLoader());
            } catch (final HessianServer.HessianIsMissingException e) {
                LOGGER.info("Hessian is not available so openejb-hessian will not deploy any service");
                break;
            }

            try {
                if (hessian != null && hessian.serializerFactory() != Object.class && !hessian.serializerFactory().isInstance(server.getSerializerFactory())) {
                    server.serializerFactory(hessian.serializerFactory().newInstance());
                }
            } catch (final Exception e) {
                throw new OpenEJBRuntimeException(e);
            }
            if (hessian != null) {
                server.sendCollectionType(hessian.sendCollectionType());
            }
            if (Dependent.class.equals(deployment.bean.getScope())) {
                LOGGER.warning("@Dependent can lead to memory leaks ATM");
            }
            server.createSkeleton(bm.getReference(deployment.bean, deployment.itf, null), deployment.itf);
View Full Code Here

    private static String getName(final String path, final Class<?> itf) {
        if (path != null) {
            return path;
        }

        final Hessian hessian = itf.getAnnotation(Hessian.class);
        if (hessian != null) {
            final String name = hessian.path();
            if (name.isEmpty()) {
                return itf.getName();
            }
            return name;
        }
View Full Code Here

        }

        final Bean<X> bean = processBean.getBean();
        final Class<?> beanClass = bean.getBeanClass();
        for (final Class<?> itf : beanClass.getInterfaces()) {
            final Hessian hessian = itf.getAnnotation(Hessian.class);
            final String key = "openejb.hessian." + beanClass.getName() + "_" + itf.getName() + ".path";
            final String path = appInfo.properties.getProperty(key, SystemInstance.get().getProperty(key));
            if (hessian != null || path != null) {
                toDeploy.add(new Deployment(itf, path, bean));
            }
View Full Code Here

        }

        final HessianRegistry registry = service.getRegistry();

        for (final Deployment deployment : toDeploy) {
            final Hessian hessian = deployment.itf.getAnnotation(Hessian.class);
            final HessianServer server;
            try {
                server = new HessianServer(deployment.bean.getBeanClass().getClassLoader());
            } catch (final HessianServer.HessianIsMissingException e) {
                LOGGER.info("Hessian is not available so openejb-hessian will not deploy any service");
                break;
            }

            try {
                if (hessian != null && hessian.serializerFactory() != Object.class && !hessian.serializerFactory().isInstance(server.getSerializerFactory())) {
                    server.serializerFactory(hessian.serializerFactory().newInstance());
                }
            } catch (final Exception e) {
                throw new OpenEJBRuntimeException(e);
            }
            if (hessian != null) {
                server.sendCollectionType(hessian.sendCollectionType());
            }
            if (Dependent.class.equals(deployment.bean.getScope())) {
                LOGGER.warning("@Dependent can lead to memory leaks ATM");
            }
            server.createSkeleton(bm.getReference(deployment.bean, deployment.itf, null), deployment.itf);
View Full Code Here

    private static String getName(final String path, final Class<?> itf) {
        if (path != null) {
            return path;
        }

        final Hessian hessian = itf.getAnnotation(Hessian.class);
        if (hessian != null) {
            final String name = hessian.path();
            if (name.isEmpty()) {
                return itf.getName();
            }
            return name;
        }
View Full Code Here

TOP

Related Classes of org.apache.openejb.cdi.api.Hessian

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.