|
41 | 41 | import org.hibernate.event.monitor.spi.EventMonitor;
|
42 | 42 | import org.hibernate.event.monitor.spi.DiagnosticEvent;
|
43 | 43 | import org.hibernate.event.service.spi.EventListenerGroups;
|
44 |
| -import org.hibernate.event.spi.PostCollectionRecreateEvent; |
45 |
| -import org.hibernate.event.spi.PostCollectionRecreateEventListener; |
46 |
| -import org.hibernate.event.spi.PostCollectionRemoveEvent; |
47 |
| -import org.hibernate.event.spi.PostCollectionRemoveEventListener; |
48 |
| -import org.hibernate.event.spi.PostCollectionUpdateEvent; |
49 |
| -import org.hibernate.event.spi.PostCollectionUpdateEventListener; |
50 | 44 | import org.hibernate.event.spi.PostDeleteEvent;
|
51 | 45 | import org.hibernate.event.spi.PostDeleteEventListener;
|
52 | 46 | import org.hibernate.event.spi.PostInsertEvent;
|
|
55 | 49 | import org.hibernate.event.spi.PostUpdateEventListener;
|
56 | 50 | import org.hibernate.event.spi.PostUpsertEvent;
|
57 | 51 | import org.hibernate.event.spi.PostUpsertEventListener;
|
58 |
| -import org.hibernate.event.spi.PreCollectionRecreateEvent; |
59 |
| -import org.hibernate.event.spi.PreCollectionRecreateEventListener; |
60 |
| -import org.hibernate.event.spi.PreCollectionRemoveEvent; |
61 |
| -import org.hibernate.event.spi.PreCollectionRemoveEventListener; |
62 |
| -import org.hibernate.event.spi.PreCollectionUpdateEvent; |
63 |
| -import org.hibernate.event.spi.PreCollectionUpdateEventListener; |
64 | 52 | import org.hibernate.event.spi.PreDeleteEvent;
|
65 | 53 | import org.hibernate.event.spi.PreDeleteEventListener;
|
66 | 54 | import org.hibernate.event.spi.PreInsertEvent;
|
@@ -634,46 +622,49 @@ protected void firePostDelete(Object entity, Object id, EntityPersister persiste
|
634 | 622 | PostDeleteEventListener::onPostDelete );
|
635 | 623 | }
|
636 | 624 |
|
| 625 | + // Note: the pre/post collection events have been disabled for stateless sessions |
| 626 | + // as they were not actually useful (see https://hibernate.atlassian.net/browse/HHH-19523) |
| 627 | + |
637 | 628 | // Hibernate Reactive may need to call this
|
638 | 629 | protected void firePreRecreate(PersistentCollection<?> collection, CollectionPersister persister) {
|
639 |
| - eventListenerGroups.eventListenerGroup_PRE_COLLECTION_RECREATE.fireLazyEventOnEachListener( |
640 |
| - () -> new PreCollectionRecreateEvent( persister, collection, null ), |
641 |
| - PreCollectionRecreateEventListener::onPreRecreateCollection ); |
| 630 | +// eventListenerGroups.eventListenerGroup_PRE_COLLECTION_RECREATE.fireLazyEventOnEachListener( |
| 631 | +// () -> new PreCollectionRecreateEvent( persister, collection, null ), |
| 632 | +// PreCollectionRecreateEventListener::onPreRecreateCollection ); |
642 | 633 | }
|
643 | 634 |
|
644 | 635 | // Hibernate Reactive may need to call this
|
645 | 636 | protected void firePreUpdate(PersistentCollection<?> collection, CollectionPersister persister) {
|
646 |
| - eventListenerGroups.eventListenerGroup_PRE_COLLECTION_UPDATE.fireLazyEventOnEachListener( |
647 |
| - () -> new PreCollectionUpdateEvent( persister, collection, null ), |
648 |
| - PreCollectionUpdateEventListener::onPreUpdateCollection ); |
| 637 | +// eventListenerGroups.eventListenerGroup_PRE_COLLECTION_UPDATE.fireLazyEventOnEachListener( |
| 638 | +// () -> new PreCollectionUpdateEvent( persister, collection, null ), |
| 639 | +// PreCollectionUpdateEventListener::onPreUpdateCollection ); |
649 | 640 | }
|
650 | 641 |
|
651 | 642 | // Hibernate Reactive may need to call this
|
652 | 643 | protected void firePreRemove(PersistentCollection<?> collection, Object owner, CollectionPersister persister) {
|
653 |
| - eventListenerGroups.eventListenerGroup_PRE_COLLECTION_REMOVE.fireLazyEventOnEachListener( |
654 |
| - () -> new PreCollectionRemoveEvent( persister, collection, null, owner ), |
655 |
| - PreCollectionRemoveEventListener::onPreRemoveCollection ); |
| 644 | +// eventListenerGroups.eventListenerGroup_PRE_COLLECTION_REMOVE.fireLazyEventOnEachListener( |
| 645 | +// () -> new PreCollectionRemoveEvent( persister, collection, null, owner ), |
| 646 | +// PreCollectionRemoveEventListener::onPreRemoveCollection ); |
656 | 647 | }
|
657 | 648 |
|
658 | 649 | // Hibernate Reactive may need to call this
|
659 | 650 | protected void firePostRecreate(PersistentCollection<?> collection, CollectionPersister persister) {
|
660 |
| - eventListenerGroups.eventListenerGroup_POST_COLLECTION_RECREATE.fireLazyEventOnEachListener( |
661 |
| - () -> new PostCollectionRecreateEvent( persister, collection, null ), |
662 |
| - PostCollectionRecreateEventListener::onPostRecreateCollection ); |
| 651 | +// eventListenerGroups.eventListenerGroup_POST_COLLECTION_RECREATE.fireLazyEventOnEachListener( |
| 652 | +// () -> new PostCollectionRecreateEvent( persister, collection, null ), |
| 653 | +// PostCollectionRecreateEventListener::onPostRecreateCollection ); |
663 | 654 | }
|
664 | 655 |
|
665 | 656 | // Hibernate Reactive may need to call this
|
666 | 657 | protected void firePostUpdate(PersistentCollection<?> collection, CollectionPersister persister) {
|
667 |
| - eventListenerGroups.eventListenerGroup_POST_COLLECTION_UPDATE.fireLazyEventOnEachListener( |
668 |
| - () -> new PostCollectionUpdateEvent( persister, collection, null ), |
669 |
| - PostCollectionUpdateEventListener::onPostUpdateCollection ); |
| 658 | +// eventListenerGroups.eventListenerGroup_POST_COLLECTION_UPDATE.fireLazyEventOnEachListener( |
| 659 | +// () -> new PostCollectionUpdateEvent( persister, collection, null ), |
| 660 | +// PostCollectionUpdateEventListener::onPostUpdateCollection ); |
670 | 661 | }
|
671 | 662 |
|
672 | 663 | // Hibernate Reactive may need to call this
|
673 | 664 | protected void firePostRemove(PersistentCollection<?> collection, Object owner, CollectionPersister persister) {
|
674 |
| - eventListenerGroups.eventListenerGroup_POST_COLLECTION_REMOVE.fireLazyEventOnEachListener( |
675 |
| - () -> new PostCollectionRemoveEvent( persister, collection, null, owner ), |
676 |
| - PostCollectionRemoveEventListener::onPostRemoveCollection ); |
| 665 | +// eventListenerGroups.eventListenerGroup_POST_COLLECTION_REMOVE.fireLazyEventOnEachListener( |
| 666 | +// () -> new PostCollectionRemoveEvent( persister, collection, null, owner ), |
| 667 | +// PostCollectionRemoveEventListener::onPostRemoveCollection ); |
677 | 668 | }
|
678 | 669 |
|
679 | 670 | // collections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
0 commit comments