Package org.axonframework.unitofwork

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


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

        }
        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

     */
    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

                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

                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

TOP

Related Classes of org.axonframework.unitofwork.SpringTransactionManager

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.