Issue #2191 Fixing Registry Federation

Change-Id: Ibf3dec6af45424bc8678a37f00b070d3032bb7de

Former-commit-id: f759853531 [formerly 1c9f237245] [formerly f76c747a01] [formerly f759853531 [formerly 1c9f237245] [formerly f76c747a01] [formerly ac44137242 [formerly f76c747a01 [formerly 985d2d02c2191eadcba59af4b16ad3d7e15de6d6]]]]
Former-commit-id: ac44137242
Former-commit-id: cf48f462fe [formerly 83cbecc94e] [formerly cdba9178e2b25b4e73d616be88130ca8a588122a [formerly cc1c27ea93]]
Former-commit-id: 6417a029e2cb3e30c82525aecbc613a0e27282b4 [formerly 6e249902d4]
Former-commit-id: bfac3e7977
This commit is contained in:
Benjamin Phillippe 2013-09-30 10:16:03 -05:00
parent bfa5977f36
commit 154b7738a4
4 changed files with 9 additions and 10 deletions

View file

@ -36,6 +36,7 @@ import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Cascade;
import com.raytheon.uf.common.registry.schemas.ebxml.util.annotations.RegistryObjectReference;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
@ -77,7 +78,8 @@ public class NotificationType extends RegistryObjectType {
@XmlElement(name = "Event", required = true)
@DynamicSerializeElement
@ManyToMany(cascade = {})
@ManyToMany
@Cascade({})
@JoinTable(schema = "ebxml")
protected List<AuditableEventType> event;

View file

@ -23,7 +23,6 @@ package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
@ -40,6 +39,8 @@ import javax.xml.bind.annotation.XmlType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@ -87,7 +88,8 @@ public class ObjectRefListType {
@XmlElement(name = "ObjectRef")
@DynamicSerializeElement
@ManyToMany(cascade = CascadeType.ALL)
@ManyToMany
@Cascade({ CascadeType.SAVE_UPDATE })
@JoinTable(schema = "ebxml")
protected List<ObjectRefType> objectRef;

View file

@ -67,6 +67,7 @@ import com.raytheon.uf.edex.registry.ebxml.util.EbxmlObjectUtil;
* Apr 17, 2013 1672 djohnson No longer cares about notification protocol.
* 5/21/2013 2022 bphillip Cleaned up unused method parameters and batching of notifications
* 9/11/2013 2354 bphillip Added logic to ensure delete events get included in notifications
* 9/30/2013 2191 bphillip Fixing federated replication
* </pre>
*
* @author bphillip
@ -120,10 +121,6 @@ public class RegistryNotificationManager {
return notification;
}
protected void saveNotification(NotificationType notification) {
notificationDao.createOrUpdate(notification);
}
protected void sendNotification(NotificationListenerWrapper listener,
NotificationType notification, String address) {
@ -137,8 +134,6 @@ public class RegistryNotificationManager {
// the target
auditableEventDao.persistSendDate(notification.getEvent(),
notification.getSubscription(), address);
// Persist the notification
notificationDao.createOrUpdate(notification);
}
/**

View file

@ -92,6 +92,7 @@ import com.raytheon.uf.edex.registry.ebxml.util.EbxmlObjectUtil;
* 6/4/2013 2022 bphillip Changed slot type of subscription last run time. Longs were being truncated when casting to ints
* 9/5/2013 1538 bphillip Changed processing of each subscription to be in their own transaction. Subscriptions are now loaded on startup
* 9/11/2013 2354 bphillip Added handling of deleted objects
* 9/30/2013 2191 bphillip Fixing federated replication
* </pre>
*
* @author bphillip
@ -482,7 +483,6 @@ public class RegistrySubscriptionManager implements
.getEventsOfInterest(startTime, null, objectsOfInterest);
NotificationType notification = notificationManager.getNotification(
subscription, address, objectsOfInterest, eventsOfInterest);
notificationManager.saveNotification(notification);
return notification;
}