try {
tx.begin();
org.apache.juddi.model.Subscription modelSubscription = em.find(org.apache.juddi.model.Subscription.class, resultList.getSubscription().getSubscriptionKey());
log.debug("Taking out a write lock on this subscription, and bail if we can't get it since that would mean"
+ " another jUDDI instance is in the process of sending out the notification.");
em.lock(modelSubscription, LockModeType.WRITE);
Date startPoint = resultList.getCoveragePeriod().getStartPoint().toGregorianCalendar().getTime();
Date endPoint = resultList.getCoveragePeriod().getEndPoint().toGregorianCalendar().getTime();
if (modelSubscription.getLastNotified()!=null
&& startPoint.before(modelSubscription.getLastNotified())
&& endPoint.after(modelSubscription.getLastNotified())) {