[hibernate-dev] org.hibernate.jpa.AvailableSettings.EVENT_LISTENER_PREFIX

Gail Badner gbadner at redhat.com
Mon Jul 20 17:06:28 EDT 2015


AvailableSettings.EVENT_LISTENER_PREFIX is set to "hibernate.ejb.event". JpaIntegrator looks for ConfigurationService settings (which include properties) with that prefix, then strips off that prefix to determine the org.hibernate.event.spi.EventType. 

I see that org.hibernate.event.spi.EventType has non-JPA event types. I can see that it could be useful for an application to specify non-JPA listeners to access Hibernate extensions. Is this what is intended?

Since JPA already defines annotations and <entity-listener> XML descriptors to specify JPA entity listeners/callbacks, should Hibernate continue to allow JPA entity listeners/callbacks to be specified using a property with this prefix? 

In master, the only test I see that uses a property prefixed with "hibernate.ejb.event" is org.hibernate.jpa.test.packaging.PackagedEntityManagerTest. Also, I don't see any documentation for prefixing properties this way.

Should AvailableSettings.EVENT_LISTENER_PREFIX be deprecated?

Thanks,
Gail



More information about the hibernate-dev mailing list