[
https://issues.apache.org/jira/browse/USERGRID-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14244137#comment-14244137
]
ASF GitHub Bot commented on USERGRID-254:
-----------------------------------------
Github user snoopdave commented on a diff in the pull request:
https://github.com/apache/incubator-usergrid/pull/120#discussion_r21743937
--- Diff:
stack/core/src/main/java/org/apache/usergrid/corepersistence/CpSetup.java ---
@@ -82,11 +78,9 @@ public CpSetup( EntityManagerFactory emf,
CassandraService cass ) {
}
-
-
public static Injector getInjector() {
if ( injector == null ) {
- injector = Guice.createInjector( new GuiceModule() );
+ injector = Guice.createInjector( new GuiceModule( emf ) );
--- End diff --
The reason for that is that the EntityDeletedHandler and other handers need
access to the EMF and those handlers are created by Guice, so we need the EMF
to be injectable -- BUT the one and only EMF instance is created by Spring.
> Add Event system to Collections module, use it to clean up old indices
> ----------------------------------------------------------------------
>
> Key: USERGRID-254
> URL: https://issues.apache.org/jira/browse/USERGRID-254
> Project: Usergrid
> Issue Type: Story
> Reporter: Todd Nine
> Assignee: David Johnson
>
> When the Core module EntityManager deletes or updates Entities in the
> Collections module, the Query Index records for the old versions of that
> Entity need to be deleted.
> To enable this, we added an eventing system to the Collections module so that
> callers can hook into entity create, update and delete events.
> And we added event handlers to clean up the Query Index records for those
> events.
> See the new package in Collections module:
> org.apache.usergrid.persistence.collection.event
> And in Core:
> org.apache.usergrid.corepersistence.events
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)