Examples of JPAConfig


Examples of play.db.jpa.JPAConfig

     * Flush and clear the JPA session
     */
    @Deprecated
    public void clearJPASession() {
        for (DBConfig dbConfig : DB.getDBConfigs()) {
            JPAConfig jpaConfig = JPA.getJPAConfig(dbConfig.getDBConfigName(), true);
            if (jpaConfig != null) {
                EntityManager em = jpaConfig.getJPAContext().em();
                em.flush();
                em.clear();
            }
        }

View Full Code Here

Examples of play.db.jpa.JPAConfig

     */
    @SuppressWarnings("deprecation")
    public Connection getConnection() {
        try {
            // do we have a present JPAContext for this db-config in current thread?
            JPAConfig jpaConfig = JPA.getJPAConfig(dbConfigName, true);
            if (jpaConfig!=null) {
                JPAContext jpaContext = jpaConfig.getJPAContext();
                return ((SessionImpl)((org.hibernate.ejb.EntityManagerImpl) jpaContext.em()).getSession()).connection();
            }

            // do we have a current raw connection bound to thread?
            if (localConnection.get() != null) {
View Full Code Here

Examples of play.db.jpa.JPAConfig

     */
    @SuppressWarnings("deprecation")
    public Connection getConnection() {
        try {
            // do we have a present JPAContext for this db-config in current thread?
            JPAConfig jpaConfig = JPA.getJPAConfig(dbConfigName, true);
            if (jpaConfig!=null) {
                JPAContext jpaContext = jpaConfig.getJPAContext();
                return ((SessionImpl)((org.hibernate.ejb.EntityManagerImpl) jpaContext.em()).getSession()).connection();
            }

            // do we have a current raw connection bound to thread?
            if (localConnection.get() != null) {
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.