/** * Look for the TopiaPersistenceContext based on the given Hibernate session * * @param event the Hibernate event that contains the Session to use * @return the TopiaPersistenceContext using this Session, or null if not found */ protected TopiaPersistenceContext getContext(AbstractEvent event) { EventSource session = event.getSession(); TopiaPersistenceContext result = registry.getPersistenceContext(session); return result; }