Examples of SpringTransactionManager


Examples of org.axonframework.unitofwork.SpringTransactionManager

            if (candidates.size() == 1) {
                this.transactionManager = candidates.values().iterator().next();
            }
        }
        if (transactionManager != null) {
            setTxManager(new SpringTransactionManager(transactionManager, transactionDefinition));
        }
    }
View Full Code Here

Examples of org.axonframework.unitofwork.SpringTransactionManager

        eventScheduler.setEventBus(eventBus);
        if (groupIdentifier != null) {
            eventScheduler.setGroupIdentifier(groupIdentifier);
        }
        if (transactionManager != null) {
            eventScheduler.setTransactionManager(new SpringTransactionManager(transactionManager,
                                                                              transactionDefinition));
        }
        eventScheduler.initialize();
    }
View Full Code Here

Examples of org.axonframework.unitofwork.SpringTransactionManager

        }
        if (transactionManager == null) {
            this.eventScheduler = new SimpleEventScheduler(executorService, eventBus);
        } else {
            this.eventScheduler = new SimpleEventScheduler(executorService, eventBus, new DefaultUnitOfWorkFactory(
                    new SpringTransactionManager(transactionManager, transactionDefinition)));
        }
    }
View Full Code Here

Examples of org.axonframework.unitofwork.SpringTransactionManager

     */
    public void setTransactionManager(Object transactionManager) {
        if (transactionManager instanceof TransactionManager) {
            this.transactionManager = (TransactionManager) transactionManager;
        } else if (transactionManager instanceof PlatformTransactionManager) {
            this.transactionManager = new SpringTransactionManager((PlatformTransactionManager) transactionManager);
        } else {
            throw new IllegalArgumentException("Given transaction manager is of unknown type: "
                                                       + transactionManager.getClass().getName());
        }
    }
View Full Code Here

Examples of org.axonframework.unitofwork.SpringTransactionManager

                fail("Should be using an already existing connection.");
                return null;
            }
        });

        UnitOfWork uow = DefaultUnitOfWork.startAndGet(new SpringTransactionManager(transactionManager));
        Connection connection = connectionProvider.getConnection();

        connection.commit();

        uow.commit();
View Full Code Here

Examples of org.axonframework.unitofwork.SpringTransactionManager

                final Object spy = spy(invocation.callRealMethod());
                mockConnection = (Connection) spy;
                return spy;
            }
        }).when(dataSource).getConnection();
        UnitOfWork uow = DefaultUnitOfWork.startAndGet(new SpringTransactionManager(transactionManager));
        Connection connection = connectionProvider.getConnection();
        assertNotSame(connection, mockConnection);

        connection.commit();
        verify(mockConnection, never()).commit();
View Full Code Here

Examples of org.neo4j.kernel.impl.transaction.SpringTransactionManager

    }

    private JtaTransactionManager createJtaTransactionManager(GraphDatabaseService gds) {
        JtaTransactionManager jtaTm = new JtaTransactionManager();
        if (gds instanceof AbstractGraphDatabase) {
            jtaTm.setTransactionManager(new SpringTransactionManager(gds));
            jtaTm.setUserTransaction(new UserTransactionImpl(gds));
        } else {
            final NullTransactionManager tm = new NullTransactionManager();
            jtaTm.setTransactionManager(tm);
            jtaTm.setUserTransaction(new UserTransactionAdapter(tm));
View Full Code Here

Examples of org.neo4j.kernel.impl.transaction.SpringTransactionManager

    private JtaTransactionManager createJtaTransactionManager() {
        JtaTransactionManager jtaTm = new JtaTransactionManager();
        final GraphDatabaseService gds = getGraphDatabaseService();
        if (gds instanceof AbstractGraphDatabase) {
            jtaTm.setTransactionManager(new SpringTransactionManager(gds));
            jtaTm.setUserTransaction(new UserTransactionImpl(gds));
        } else {
            final NullTransactionManager tm = new NullTransactionManager();
            jtaTm.setTransactionManager(tm);
            jtaTm.setUserTransaction(new UserTransactionAdapter(tm));
View Full Code Here

Examples of org.neo4j.kernel.impl.transaction.SpringTransactionManager

    protected GraphDatabase createGraphDatabase() throws Exception {
        return new DelegatingGraphDatabase(graphDatabaseService);
    }

    protected PlatformTransactionManager createTransactionManager() {
        return new JtaTransactionManager(new SpringTransactionManager(graphDatabaseService));
    }
View Full Code Here

Examples of org.neo4j.kernel.impl.transaction.SpringTransactionManager

        return new Neo4jConversionServiceFactoryBean().getObject();
    }

    protected PlatformTransactionManager createTransactionManager()
    {
        return new JtaTransactionManager(new SpringTransactionManager(graphDatabaseService));
    }
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.