Package org.apache.openejb.jee

Examples of org.apache.openejb.jee.ContainerConcurrency


            public Map<String, List<MethodAttribute>> getExistingDeclarations(){
                return assemblyDescriptor.getMethodConcurrencyMap(ejbName);
            }

            public void addClassLevelDeclaration(javax.ejb.Lock attribute, Class type) {
                ContainerConcurrency ctx = new ContainerConcurrency(cast(attribute.value()), type.getName(), ejbName, "*");
                assemblyDescriptor.getContainerConcurrency().add(ctx);
            }
View Full Code Here


                ContainerConcurrency ctx = new ContainerConcurrency(cast(attribute.value()), type.getName(), ejbName, "*");
                assemblyDescriptor.getContainerConcurrency().add(ctx);
            }

            public void addMethodLevelDeclaration(javax.ejb.Lock attribute, Method method) {
                ContainerConcurrency ctx = new ContainerConcurrency(cast(attribute.value()), ejbName, method);
                assemblyDescriptor.getContainerConcurrency().add(ctx);
            }
View Full Code Here

        ejbJar.addEnterpriseBean(new SingletonBean(Red.class));
        ejbJar.addEnterpriseBean(new SingletonBean(Crimson.class));
        ejbJar.addEnterpriseBean(new SingletonBean(Scarlet.class));
        List<ContainerConcurrency> declared = ejbJar.getAssemblyDescriptor().getContainerConcurrency();

        declared.add(new ContainerConcurrency(ConcurrencyAttribute.WRITE, "*", "*", "*"));
        declared.add(new ContainerConcurrency(ConcurrencyAttribute.READ, "*", "Crimson", "*"));
        declared.add(new ContainerConcurrency(ConcurrencyAttribute.READ, Color.class.getName(), "Scarlet", "*"));
        declared.add(new ContainerConcurrency(ConcurrencyAttribute.READ, Red.class.getName(), "Scarlet", "red"));
        declared.add(new ContainerConcurrency(ConcurrencyAttribute.WRITE, "Scarlet", Scarlet.class.getMethod("scarlet")));

        EjbJarInfo ejbJarInfo = config.configureApplication(ejbJar);
        assembler.createApplication(ejbJarInfo);

        loadAttributes(ejbJarInfo, "Color");
View Full Code Here

                }
                return declarations;
            }

            public ContainerConcurrency getContainerConcurrency(Method method) {
                ContainerConcurrency concurrency = methods.get(method);
                if (concurrency == null) {
                    concurrency = new ContainerConcurrency(null, bean.getEjbName(), method);
                    methods.put(method, concurrency);
                    assemblyDescriptor.getContainerConcurrency().add(concurrency);
                }
                return concurrency;
            }
View Full Code Here

                }
                return concurrency;
            }

            public ContainerConcurrency getContainerConcurrency(Class clazz) {
                ContainerConcurrency concurrency = methods.get(clazz);
                if (concurrency == null) {
                    concurrency = new ContainerConcurrency(null, clazz.getName(), bean.getEjbName(), "*");
                    methods.put(clazz, concurrency);
                    assemblyDescriptor.getContainerConcurrency().add(concurrency);
                }
                return concurrency;
            }
View Full Code Here

                               Map<Object, ContainerConcurrency> methods) {
                super(assemblyDescriptor, bean, methods);
            }

            public void addClassLevelDeclaration(Lock attribute, Class type) {
                ContainerConcurrency concurrency = getContainerConcurrency(type);
                concurrency.setLock(toLock(attribute));
            }
View Full Code Here

                ContainerConcurrency concurrency = getContainerConcurrency(type);
                concurrency.setLock(toLock(attribute));
            }

            public void addMethodLevelDeclaration(Lock attribute, Method method) {
                ContainerConcurrency concurrency = getContainerConcurrency(method);
                concurrency.setLock(toLock(attribute));
            }
View Full Code Here

                                        Map<Object, ContainerConcurrency> methods) {
                super(assemblyDescriptor, bean, methods);
            }

            public void addClassLevelDeclaration(AccessTimeout attribute, Class type) {
                ContainerConcurrency concurrency = getContainerConcurrency(type);
                concurrency.setAccessTimeout(toTimeout(attribute));
            }
View Full Code Here

                ContainerConcurrency concurrency = getContainerConcurrency(type);
                concurrency.setAccessTimeout(toTimeout(attribute));
            }

            public void addMethodLevelDeclaration(AccessTimeout attribute, Method method) {
                ContainerConcurrency concurrency = getContainerConcurrency(method);
                concurrency.setAccessTimeout(toTimeout(attribute));
            }
View Full Code Here

            public Map<String, List<MethodAttribute>> getExistingDeclarations() {
                return assemblyDescriptor.getMethodConcurrencyMap(ejbName);
            }

            public void addClassLevelDeclaration(javax.ejb.Lock attribute, Class type) {
                ContainerConcurrency ctx = new ContainerConcurrency(cast(attribute.value()), type.getName(), ejbName, "*");
                assemblyDescriptor.getContainerConcurrency().add(ctx);
            }
View Full Code Here

TOP

Related Classes of org.apache.openejb.jee.ContainerConcurrency

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.