Skip to content

Commit

Permalink
spring-projectsGH-883: Fix regression in transaction manager
Browse files Browse the repository at this point in the history
  • Loading branch information
garyrussell authored and artembilan committed Jan 18, 2019
1 parent f8d0fae commit b9d5e11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -113,7 +113,7 @@ public ConnectionFactory getConnectionFactory() {
*/
@Override
public void afterPropertiesSet() {
Assert.state(getConnectionFactory() == null, "Property 'connectionFactory' is required");
Assert.state(getConnectionFactory() != null, "Property 'connectionFactory' is required");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2011-2016 the original author or authors.
* Copyright 2011-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -54,6 +54,7 @@ public void init() {
template = new RabbitTemplate(connectionFactory);
template.setChannelTransacted(true);
RabbitTransactionManager transactionManager = new RabbitTransactionManager(connectionFactory);
transactionManager.afterPropertiesSet();
transactionTemplate = new TransactionTemplate(transactionManager);
}

Expand Down

0 comments on commit b9d5e11

Please sign in to comment.