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
This commit is contained in:
James Strachan 2006-06-06 10:55:22 +00:00
parent 11a2950e16
commit d273cf9c8c
1 changed files with 3 additions and 0 deletions

View File

@ -290,6 +290,9 @@ public class JDBCPersistenceAdapter implements PersistenceAdapter {
} }
public TransactionContext getTransactionContext() { public TransactionContext getTransactionContext() {
if (dataSource == null) {
throw new IllegalArgumentException("No dataSource property has been configured");
}
return new TransactionContext(dataSource); return new TransactionContext(dataSource);
} }