Examples of PersistenceContextReference


Examples of org.apache.geronimo.naming.reference.PersistenceContextReference

                localConfiguration.findGBeanData(persistenceUnitNameQuery);
            } catch (GBeanNotFoundException e) {
                throw new DeploymentException("Could not resolve reference at deploy time for query " + persistenceUnitNameQuery, e);
            }

            PersistenceContextReference reference = new PersistenceContextReference(localConfiguration.getId(), persistenceUnitNameQuery, transactionScoped, properties);

            ((Map) componentContext.get(JNDI_KEY)).put(ENV + persistenceContextRefName, reference);

        }

        for (GerPersistenceContextRefType gerPersistenceContextRef : gerPersistenceContextRefsUntyped.values()) {
            String persistenceContextRefName = gerPersistenceContextRef.getPersistenceContextRefName();
            boolean transactionScoped = !gerPersistenceContextRef.getPersistenceContextType().equals(GerPersistenceContextTypeType.EXTENDED);
            Map properties = new HashMap();
            addProperties(gerPersistenceContextRef, properties);


            AbstractNameQuery persistenceUnitNameQuery = findPersistenceUnit(gerPersistenceContextRef);

            try {
                localConfiguration.findGBeanData(persistenceUnitNameQuery);
            } catch (GBeanNotFoundException e) {
                throw new DeploymentException("Could not resolve reference at deploy time for query " + persistenceUnitNameQuery, e);
            }

            PersistenceContextReference reference = new PersistenceContextReference(localConfiguration.getId(), persistenceUnitNameQuery, transactionScoped, properties);

            getJndiContextMap(componentContext).put(ENV + persistenceContextRefName, reference);

        }
    }
View Full Code Here

Examples of org.apache.geronimo.naming.reference.PersistenceContextReference

                        }
                    }
                    checkForGBean(localConfiguration, persistenceUnitNameQuery, true);
                }

                PersistenceContextReference reference = new PersistenceContextReference(module.getConfigId(), persistenceUnitNameQuery, transactionScoped, properties);

                NamingBuilder.JNDI_KEY.get(componentContext).put(ENV + persistenceContextRefName, reference);
            } catch (DeploymentException e) {
                problems.add(e);
            }
        }

        // Support persistence context refs that are mentioned only in the geronimo plan
        for (GerPersistenceContextRefType gerPersistenceContextRef : gerPersistenceContextRefsUntyped.values()) {
            try {
                String persistenceContextRefName = gerPersistenceContextRef.getPersistenceContextRefName();
                GerPersistenceContextTypeType.Enum persistenceContextType = gerPersistenceContextRef.getPersistenceContextType();
                boolean transactionScoped = persistenceContextType == null || !persistenceContextType.equals(GerPersistenceContextTypeType.EXTENDED);
                Map properties = new HashMap();
                addProperties(gerPersistenceContextRef, properties);


                AbstractNameQuery persistenceUnitNameQuery = findPersistenceUnit(gerPersistenceContextRef);

                checkForGBean(localConfiguration, persistenceUnitNameQuery, true);

                PersistenceContextReference reference = new PersistenceContextReference(module.getConfigId(), persistenceUnitNameQuery, transactionScoped, properties);

                getJndiContextMap(componentContext).put(ENV + persistenceContextRefName, reference);
            } catch (DeploymentException e) {
                problems.add(e);
            }
View Full Code Here

Examples of org.apache.geronimo.naming.reference.PersistenceContextReference

                } else {
                    persistenceUnitNameQuery = defaultPersistenceUnitAbstractNameQuery;
                    checkForGBean(localConfiguration, persistenceUnitNameQuery, true);
                }

                PersistenceContextReference reference = new PersistenceContextReference(localConfiguration.getId(), persistenceUnitNameQuery, transactionScoped, properties);

                NamingBuilder.JNDI_KEY.get(componentContext).put(ENV + persistenceContextRefName, reference);
            } catch (DeploymentException e) {
                problems.add(e);
            }
        }

        // Support persistence context refs that are mentioned only in the geronimo plan
        for (GerPersistenceContextRefType gerPersistenceContextRef : gerPersistenceContextRefsUntyped.values()) {
            try {
                String persistenceContextRefName = gerPersistenceContextRef.getPersistenceContextRefName();
                GerPersistenceContextTypeType.Enum persistenceContextType = gerPersistenceContextRef.getPersistenceContextType();
                boolean transactionScoped = persistenceContextType == null || !persistenceContextType.equals(GerPersistenceContextTypeType.EXTENDED);
                Map properties = new HashMap();
                addProperties(gerPersistenceContextRef, properties);


                AbstractNameQuery persistenceUnitNameQuery = findPersistenceUnit(gerPersistenceContextRef);

                checkForGBean(localConfiguration, persistenceUnitNameQuery, true);

                PersistenceContextReference reference = new PersistenceContextReference(localConfiguration.getId(), persistenceUnitNameQuery, transactionScoped, properties);

                getJndiContextMap(componentContext).put(ENV + persistenceContextRefName, reference);
            } catch (DeploymentException e) {
                problems.add(e);
            }
View Full Code Here

Examples of org.apache.geronimo.naming.reference.PersistenceContextReference

                    persistenceUnitNameQuery = findPersistenceUnit(gerPersistenceContextRef, localConfiguration);
                    addProperties(gerPersistenceContextRef, properties);
                } else {
                    persistenceUnitNameQuery = findPersistenceUnitQuery(module, localConfiguration, persistenceContextRef);
                }
                PersistenceContextReference reference = new PersistenceContextReference(module.getConfigId(), persistenceUnitNameQuery, transactionScoped, properties);
                put(persistenceContextRefName, reference, ReferenceType.PERSISTENCE_CONTEXT, module.getJndiContext(), persistenceContextRef.getInjectionTarget(), sharedContext);
            } catch (DeploymentException e) {
                problems.add(e);
            }
        }

        // Support persistence context refs that are mentioned only in the geronimo plan
        for (GerPersistenceContextRefType gerPersistenceContextRef : gerPersistenceContextRefsUntyped.values()) {
            try {
                String persistenceContextRefName = gerPersistenceContextRef.getPersistenceContextRefName();
                GerPersistenceContextTypeType.Enum persistenceContextType = gerPersistenceContextRef.getPersistenceContextType();
                boolean transactionScoped = persistenceContextType == null || !persistenceContextType.equals(GerPersistenceContextTypeType.EXTENDED);
                Map<String, String> properties = new HashMap<String, String>();
                addProperties(gerPersistenceContextRef, properties);
                AbstractNameQuery persistenceUnitNameQuery = findPersistenceUnit(gerPersistenceContextRef, localConfiguration);
                PersistenceContextReference reference = new PersistenceContextReference(module.getConfigId(), persistenceUnitNameQuery, transactionScoped, properties);
                put(persistenceContextRefName, reference, ReferenceType.PERSISTENCE_CONTEXT, module.getJndiContext(), Collections.<InjectionTarget> emptySet(), sharedContext);
            } catch (DeploymentException e) {
                problems.add(e);
            }
View Full Code Here

Examples of org.apache.geronimo.naming.reference.PersistenceContextReference

                    persistenceUnitNameQuery = findPersistenceUnit(gerPersistenceContextRef, localConfiguration);
                    addProperties(gerPersistenceContextRef, properties);
                } else {
                    persistenceUnitNameQuery = findPersistenceUnitQuery(module, localConfiguration, persistenceContextRef);
                }
                PersistenceContextReference reference = new PersistenceContextReference(module.getConfigId(), persistenceUnitNameQuery, transactionScoped, properties);
                put(persistenceContextRefName, reference, ReferenceType.PERSISTENCE_CONTEXT, module.getJndiContext(), persistenceContextRef.getInjectionTarget(), sharedContext);
            } catch (DeploymentException e) {
                problems.add(e);
            }
        }

        // Support persistence context refs that are mentioned only in the geronimo plan
        for (GerPersistenceContextRefType gerPersistenceContextRef : gerPersistenceContextRefsUntyped.values()) {
            try {
                String persistenceContextRefName = gerPersistenceContextRef.getPersistenceContextRefName();
                GerPersistenceContextTypeType.Enum persistenceContextType = gerPersistenceContextRef.getPersistenceContextType();
                boolean transactionScoped = persistenceContextType == null || !persistenceContextType.equals(GerPersistenceContextTypeType.EXTENDED);
                Map<String, String> properties = new HashMap<String, String>();
                addProperties(gerPersistenceContextRef, properties);
                AbstractNameQuery persistenceUnitNameQuery = findPersistenceUnit(gerPersistenceContextRef, localConfiguration);
                PersistenceContextReference reference = new PersistenceContextReference(module.getConfigId(), persistenceUnitNameQuery, transactionScoped, properties);
                put(persistenceContextRefName, reference, ReferenceType.PERSISTENCE_CONTEXT, module.getJndiContext(), Collections.<InjectionTarget> emptySet(), sharedContext);
            } catch (DeploymentException e) {
                problems.add(e);
            }
View Full Code Here

Examples of org.apache.geronimo.naming.reference.PersistenceContextReference

                        }
                    }
                    checkForGBean(localConfiguration, persistenceUnitNameQuery, true);
                }

                PersistenceContextReference reference = new PersistenceContextReference(module.getConfigId(), persistenceUnitNameQuery, transactionScoped, properties);

                NamingBuilder.JNDI_KEY.get(componentContext).put(ENV + persistenceContextRefName, reference);
            } catch (DeploymentException e) {
                problems.add(e);
            }
        }

        // Support persistence context refs that are mentioned only in the geronimo plan
        for (GerPersistenceContextRefType gerPersistenceContextRef : gerPersistenceContextRefsUntyped.values()) {
            try {
                String persistenceContextRefName = gerPersistenceContextRef.getPersistenceContextRefName();
                GerPersistenceContextTypeType.Enum persistenceContextType = gerPersistenceContextRef.getPersistenceContextType();
                boolean transactionScoped = persistenceContextType == null || !persistenceContextType.equals(GerPersistenceContextTypeType.EXTENDED);
                Map properties = new HashMap();
                addProperties(gerPersistenceContextRef, properties);


                AbstractNameQuery persistenceUnitNameQuery = findPersistenceUnit(gerPersistenceContextRef);

                checkForGBean(localConfiguration, persistenceUnitNameQuery, true);

                PersistenceContextReference reference = new PersistenceContextReference(module.getConfigId(), persistenceUnitNameQuery, transactionScoped, properties);

                getJndiContextMap(componentContext).put(ENV + persistenceContextRefName, reference);
            } catch (DeploymentException e) {
                problems.add(e);
            }
View Full Code Here

Examples of org.apache.geronimo.naming.reference.PersistenceContextReference

                localConfiguration.findGBeanData(persistenceUnitNameQuery);
            } catch (GBeanNotFoundException e) {
                throw new DeploymentException("Could not resolve reference at deploy time for query " + persistenceUnitNameQuery, e);
            }

            PersistenceContextReference reference = new PersistenceContextReference(localConfiguration.getId(), persistenceUnitNameQuery, transactionScoped, properties);

            getJndiContextMap(componentContext).put(ENV + persistenceContextRefName, reference);

        }
    }
View Full Code Here

Examples of org.apache.geronimo.naming.reference.PersistenceContextReference

                        }
                    }
                    checkForGBean(localConfiguration, persistenceUnitNameQuery, true);
                }

                PersistenceContextReference reference = new PersistenceContextReference(module.getConfigId(), persistenceUnitNameQuery, transactionScoped, properties);

                put(persistenceContextRefName, reference, NamingBuilder.JNDI_KEY.get(componentContext));
            } catch (DeploymentException e) {
                problems.add(e);
            }
        }

        // Support persistence context refs that are mentioned only in the geronimo plan
        for (GerPersistenceContextRefType gerPersistenceContextRef : gerPersistenceContextRefsUntyped.values()) {
            try {
                String persistenceContextRefName = gerPersistenceContextRef.getPersistenceContextRefName();
                GerPersistenceContextTypeType.Enum persistenceContextType = gerPersistenceContextRef.getPersistenceContextType();
                boolean transactionScoped = persistenceContextType == null || !persistenceContextType.equals(GerPersistenceContextTypeType.EXTENDED);
                Map<String, String> properties = new HashMap<String, String>();
                addProperties(gerPersistenceContextRef, properties);


                AbstractNameQuery persistenceUnitNameQuery = findPersistenceUnit(gerPersistenceContextRef);

                checkForGBean(localConfiguration, persistenceUnitNameQuery, true);

                PersistenceContextReference reference = new PersistenceContextReference(module.getConfigId(), persistenceUnitNameQuery, transactionScoped, properties);

                put(persistenceContextRefName, reference, NamingBuilder.JNDI_KEY.get(componentContext));
            } catch (DeploymentException e) {
                problems.add(e);
            }
View Full Code Here

Examples of org.apache.geronimo.naming.reference.PersistenceContextReference

                localConfiguration.findGBeanData(persistenceUnitNameQuery);
            } catch (GBeanNotFoundException e) {
                throw new DeploymentException("Could not resolve reference at deploy time for query " + persistenceUnitNameQuery, e);
            }

            PersistenceContextReference reference = new PersistenceContextReference(localConfiguration.getId(), persistenceUnitNameQuery, transactionScoped, properties);

            ((Map)componentContext.get(JNDI_KEY)).put(ENV + persistenceContextRefName, reference);

        }
    }
View Full Code Here

Examples of org.apache.geronimo.naming.reference.PersistenceContextReference

                localConfiguration.findGBeanData(persistenceUnitNameQuery);
            } catch (GBeanNotFoundException e) {
                throw new DeploymentException("Could not resolve reference at deploy time for query " + persistenceUnitNameQuery, e);
            }

            PersistenceContextReference reference = new PersistenceContextReference(localConfiguration.getId(), persistenceUnitNameQuery, transactionScoped, properties);

            ((Map) componentContext.get(JNDI_KEY)).put(ENV + persistenceContextRefName, reference);

        }

        for (GerPersistenceContextRefType gerPersistenceContextRef : gerPersistenceContextRefsUntyped.values()) {
            String persistenceContextRefName = gerPersistenceContextRef.getPersistenceContextRefName();
            GerPersistenceContextTypeType.Enum persistenceContextType = gerPersistenceContextRef.getPersistenceContextType();
            boolean transactionScoped = persistenceContextType == null || !persistenceContextType.equals(GerPersistenceContextTypeType.EXTENDED);
            Map properties = new HashMap();
            addProperties(gerPersistenceContextRef, properties);


            AbstractNameQuery persistenceUnitNameQuery = findPersistenceUnit(gerPersistenceContextRef);

            try {
                localConfiguration.findGBeanData(persistenceUnitNameQuery);
            } catch (GBeanNotFoundException e) {
                throw new DeploymentException("Could not resolve reference at deploy time for query " + persistenceUnitNameQuery, e);
            }

            PersistenceContextReference reference = new PersistenceContextReference(localConfiguration.getId(), persistenceUnitNameQuery, transactionScoped, properties);

            getJndiContextMap(componentContext).put(ENV + persistenceContextRefName, reference);

        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.