As we know we can register an EntityLister class with the following annotation
@EntityListeners(MailNotifyListener.class)
or by an xml config entry
Is it possible to register and unregister an EntityListener class by calling a method in the java code at runtime?
like:
Code:
public void testRegister()
{
SomethingLikeAregistry.register(MailNotifyListener.class);
}
and
Code:
public void testUnRegister()
{
SomethingLikeAregistry.unregister(MailNotifyListener.class);
}
Is there a registry for the active listener classes ?
thx for your help
greetz Marco