public void checkSubscription(Session session) throws SubscriptionFailureException {
SessionPreSubscriptionEvent event = new SessionPreSubscriptionEvent(this, getKey(), session);
for (TopicListener listener : listeners) {
if (event.isAppropriateListener(listener)) {
try {
event.invokeListener(listener);
} catch (SubscriptionFailureException e) {
throw e;
} catch (Exception e) {
logError(e);
}