The reason is its only method accepts a org.hibernate.resource.beans.spi.ExtendedBeanManager.LifecycleListener, whereas it used to accept a org.hibernate.jpa.event.spi.jpa.ExtendedBeanManager.LifecycleListener. Therefore implementations of the older version of ExtendedBeanManager do not implement the method with the right signature, and we get exceptions at runtime.
Example with the Wildfly implementation:
{ code noformat } Caused by: java.lang.AbstractMethodError: org.jboss.as.jpa.hibernate5.HibernateExtendedBeanManager.registerLifecycleListener(Lorg/hibernate/resource/beans/spi/ExtendedBeanManager$LifecycleListener;)V at org.hibernate.resource.beans.internal.ManagedBeanRegistryCdiExtendedImpl.<init>(ManagedBeanRegistryCdiExtendedImpl.java:41) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.hibernate.resource.beans.internal.ManagedBeanRegistryCdiBuilder.fromBeanManagerReference(ManagedBeanRegistryCdiBuilder.java:67) ... 20 more { code noformat }
We need to restore the {{org.hibernate.jpa.event.spi.jpa.ExtendedBeanManager.LifecycleListener}} interface and add a default method to handle backward compatibility. I'll submit a PR soon. |
|