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
This commit is contained in:
James Strachan 2006-06-20 07:39:42 +00:00
parent 65e40d03da
commit 3850704161
1 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/** /**
* *
* Copyright 2005-2006 The Apache Software Foundation * Copyright 2005-2006 The Apache Software Foundation
* *
@ -85,6 +85,9 @@ public class ActiveMQConnectionFactory implements ConnectionFactory, QueueConnec
if( info.isUseInboundSessionEnabled() ) { if( info.isUseInboundSessionEnabled() ) {
return new InboundConnectionProxy(); 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); return (Connection) manager.allocateConnection(factory, info);
} }
catch (ResourceException e) { catch (ResourceException e) {