adapter.commitEntityManager(null, manager);
return rc.intValue();
}
public SubscriptionInfo lookupSubscription(String clientId, String subscriptionName) throws IOException {
SubscriptionInfo rc = null;
EntityManager manager = adapter.beginEntityManager(null);
try {
StoredSubscription ss = findStoredSubscription(manager, clientId, subscriptionName);
if (ss != null) {
rc = new SubscriptionInfo();
rc.setClientId(ss.getClientId());
rc.setDestination(destination);
rc.setSelector(ss.getSelector());
rc.setSubscriptionName(ss.getSubscriptionName());
rc.setSubscribedDestination(toSubscribedDestination(ss));
}
} catch (Throwable e) {
adapter.rollbackEntityManager(null, manager);
throw IOExceptionSupport.create(e);
}