diff --git a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java index 893495d13b..804f855f18 100755 --- a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java @@ -290,6 +290,9 @@ public class JDBCPersistenceAdapter implements PersistenceAdapter { } public TransactionContext getTransactionContext() { + if (dataSource == null) { + throw new IllegalArgumentException("No dataSource property has been configured"); + } return new TransactionContext(dataSource); }