Package play.db.jpa

Examples of play.db.jpa.JPAContext


    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) {
                return localConnection.get();
View Full Code Here


    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) {
                return localConnection.get();
View Full Code Here

TOP

Related Classes of play.db.jpa.JPAContext

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.