* @param injector
*/
private void insertValidationEventListeners(Injector injector) {
javax.inject.Provider<EntityManagerFactory> emfProvider =
injector.getProvider(EntityManagerFactory.class);
HibernateEntityManagerFactory hibernateEntityManagerFactory =
(HibernateEntityManagerFactory) emfProvider.get();
SessionFactoryImpl sessionFactoryImpl =
(SessionFactoryImpl) hibernateEntityManagerFactory.getSessionFactory();
EventListenerRegistry registry =
sessionFactoryImpl.getServiceRegistry().getService(EventListenerRegistry.class);
javax.inject.Provider<BeanValidationEventListener> listenerProvider =
injector.getProvider(BeanValidationEventListener.class);