@Override
protected void resume() throws ResumeFailedFault {
if (session != null) {
ResumeFailedFaultType fault = new ResumeFailedFaultType();
throw new ResumeFailedFault("Subscription is already running", fault);
} else {
try {
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageConsumer consumer = session.createConsumer(jmsTopic);
consumer.setMessageListener(this);
} catch (JMSException e) {
ResumeFailedFaultType fault = new ResumeFailedFaultType();
throw new ResumeFailedFault("Error resuming subscription", fault, e);
}
}
}