public void close() throws JMSException {
		while(true){
            if(freeSession.isEmpty() && activeSession.isEmpty()){
                break;
            }
            PooledSession session = freeSession.poll();
            if(session != null){
            	session.close();
            }
        }
		connection.close();
	}