AMQ-1618 Fix check for 'endpoint factory won't let us create any endpoints at all'

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@637004 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
David Jencks 2008-03-14 06:36:49 +00:00
parent 5dc188eb32
commit c57bad8711
1 changed files with 3 additions and 2 deletions

View File

@ -114,8 +114,9 @@ public class ServerSessionPoolImpl implements ServerSessionPool {
// We may not be able to create a session due to the container
// restricting us.
if (ss == null) {
if (idleSessions.size() == 0) {
throw new JMSException("Endpoint factory did not allows to any endpoints.");
if (activeSessions.size() == 0) {
//no idle sessions, no active sessions, and we can't create a new session....
throw new JMSException("Endpoint factory did not allow creation of any endpoints.");
}
return getExistingServerSession();