@Override
protected void pause() throws PauseFailedFault {
if (session == null) {
PauseFailedFaultType fault = new PauseFailedFaultType();
throw new PauseFailedFault("Subscription is already paused", fault);
} else {
try {
session.close();
} catch (JMSException e) {
PauseFailedFaultType fault = new PauseFailedFaultType();
throw new PauseFailedFault("Error pausing subscription", fault, e);
} finally {
session = null;
}
}
}