From d273cf9c8c633340b0dc2dc8e901794984c67aea Mon Sep 17 00:00:00 2001 From: James Strachan Date: Tue, 6 Jun 2006 10:55:22 +0000 Subject: [PATCH] added better exception message if a dataSource is not provided git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@412076 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java | 3 +++ 1 file changed, 3 insertions(+) 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); }