Package org.springframework.transaction.jta

Examples of org.springframework.transaction.jta.SpringJtaSynchronizationAdapter


              session = sessionHolder.getValidatedSession();
              if (session != null) {
                logger.debug("Registering JTA transaction synchronization for existing Hibernate Session");
                sessionHolder.addSession(jtaTx, session);
                jtaTx.registerSynchronization(
                    new SpringJtaSynchronizationAdapter(
                        new SpringSessionSynchronization(sessionHolder, sessionFactory, jdbcExceptionTranslator, false),
                        jtaTm));
                sessionHolder.setSynchronizedWithTransaction(true);
                // Switch to FlushMode.AUTO, as we have to assume a thread-bound Session
                // with FlushMode.NEVER, which needs to allow flushing within the transaction.
View Full Code Here


            }
            else {
              holderToUse.addSession(jtaTx, session);
            }
            jtaTx.registerSynchronization(
                new SpringJtaSynchronizationAdapter(
                    new SpringSessionSynchronization(holderToUse, sessionFactory, jdbcExceptionTranslator, true),
                    jtaTm));
            holderToUse.setSynchronizedWithTransaction(true);
            if (holderToUse != sessionHolder) {
              TransactionSynchronizationManager.bindResource(sessionFactory, holderToUse);
View Full Code Here

              session = sessionHolder.getValidatedSession();
              if (session != null) {
                logger.debug("Registering JTA transaction synchronization for existing Hibernate Session");
                sessionHolder.addSession(jtaTx, session);
                jtaTx.registerSynchronization(
                    new SpringJtaSynchronizationAdapter(
                        new SpringSessionSynchronization(sessionHolder, sessionFactory, jdbcExceptionTranslator, false),
                        jtaTm));
                sessionHolder.setSynchronizedWithTransaction(true);
                // Switch to FlushMode.AUTO, as we have to assume a thread-bound Session
                // with FlushMode.NEVER, which needs to allow flushing within the transaction.
View Full Code Here

            }
            else {
              holderToUse.addSession(jtaTx, session);
            }
            jtaTx.registerSynchronization(
                new SpringJtaSynchronizationAdapter(
                    new SpringSessionSynchronization(holderToUse, sessionFactory, jdbcExceptionTranslator, true),
                    jtaTm));
            holderToUse.setSynchronizedWithTransaction(true);
            if (holderToUse != sessionHolder) {
              TransactionSynchronizationManager.bindResource(sessionFactory, holderToUse);
View Full Code Here

              session = sessionHolder.getValidatedSession();
              if (session != null) {
                logger.debug("Registering JTA transaction synchronization for existing Hibernate Session");
                sessionHolder.addSession(jtaTx, session);
                jtaTx.registerSynchronization(
                    new SpringJtaSynchronizationAdapter(
                        new SpringSessionSynchronization(sessionHolder, sessionFactory, jdbcExceptionTranslator, false),
                        jtaTm));
                sessionHolder.setSynchronizedWithTransaction(true);
                // Switch to FlushMode.AUTO, as we have to assume a thread-bound Session
                // with FlushMode.NEVER, which needs to allow flushing within the transaction.
View Full Code Here

            }
            else {
              holderToUse.addSession(jtaTx, session);
            }
            jtaTx.registerSynchronization(
                new SpringJtaSynchronizationAdapter(
                    new SpringSessionSynchronization(holderToUse, sessionFactory, jdbcExceptionTranslator, true),
                    jtaTm));
            holderToUse.setSynchronizedWithTransaction(true);
            if (holderToUse != sessionHolder) {
              TransactionSynchronizationManager.bindResource(sessionFactory, holderToUse);
View Full Code Here

              session = sessionHolder.getValidatedSession();
              if (session != null) {
                logger.debug("Registering JTA transaction synchronization for existing Hibernate Session");
                sessionHolder.addSession(jtaTx, session);
                jtaTx.registerSynchronization(
                    new SpringJtaSynchronizationAdapter(
                        new SpringSessionSynchronization(sessionHolder, sessionFactory, jdbcExceptionTranslator, false),
                        jtaTm));
                sessionHolder.setSynchronizedWithTransaction(true);
                // Switch to FlushMode.AUTO, as we have to assume a thread-bound Session
                // with FlushMode.NEVER, which needs to allow flushing within the transaction.
View Full Code Here

            }
            else {
              holderToUse.addSession(jtaTx, session);
            }
            jtaTx.registerSynchronization(
                new SpringJtaSynchronizationAdapter(
                    new SpringSessionSynchronization(holderToUse, sessionFactory, jdbcExceptionTranslator, true),
                    jtaTm));
            holderToUse.setSynchronizedWithTransaction(true);
            if (holderToUse != sessionHolder) {
              TransactionSynchronizationManager.bindResource(sessionFactory, holderToUse);
View Full Code Here

              session = sessionHolder.getValidatedSession();
              if (session != null) {
                logger.debug("Registering JTA transaction synchronization for existing Hibernate Session");
                sessionHolder.addSession(jtaTx, session);
                jtaTx.registerSynchronization(
                    new SpringJtaSynchronizationAdapter(
                        new SpringSessionSynchronization(sessionHolder, sessionFactory, jdbcExceptionTranslator, false),
                        jtaTm));
                sessionHolder.setSynchronizedWithTransaction(true);
                // Switch to FlushMode.AUTO, as we have to assume a thread-bound Session
                // with FlushMode.NEVER, which needs to allow flushing within the transaction.
View Full Code Here

            }
            else {
              holderToUse.addSession(jtaTx, session);
            }
            jtaTx.registerSynchronization(
                new SpringJtaSynchronizationAdapter(
                    new SpringSessionSynchronization(holderToUse, sessionFactory, jdbcExceptionTranslator, true),
                    jtaTm));
            holderToUse.setSynchronizedWithTransaction(true);
            if (holderToUse != sessionHolder) {
              TransactionSynchronizationManager.bindResource(sessionFactory, holderToUse);
View Full Code Here

TOP

Related Classes of org.springframework.transaction.jta.SpringJtaSynchronizationAdapter

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.