From 3850704161bdaf7a47fe1e131c637668e182c084 Mon Sep 17 00:00:00 2001 From: James Strachan Date: Tue, 20 Jun 2006 07:39:42 +0000 Subject: [PATCH] added a better error message if deployed on GlassFish and no connection manager is configured git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@415543 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/ra/ActiveMQConnectionFactory.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionFactory.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionFactory.java index 10ea24c2c1..eb018a2259 100755 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionFactory.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionFactory.java @@ -1,4 +1,4 @@ -/** + /** * * Copyright 2005-2006 The Apache Software Foundation * @@ -85,6 +85,9 @@ public class ActiveMQConnectionFactory implements ConnectionFactory, QueueConnec if( info.isUseInboundSessionEnabled() ) { return new InboundConnectionProxy(); } + if (manager == null) { + throw new JMSException("No JCA ConnectionManager configured! Either enable UseInboundSessionEnabled or get your JCA container to configure one."); + } return (Connection) manager.allocateConnection(factory, info); } catch (ResourceException e) {