Hi,
I've tracked down the necessary files HibernateServiceMBean, HibernateService which subclasses ExternalSessionFactoryConfig and Configuration.
I've found in ExternalSessionFactoryConfig a method called setCustomListenersAsString, which could be used for this. Only a new setter msut be added to the MBean interface.
But now I get an ArrayStoreException. The problem is, that ExternalSessionFactoryConfig receives the listener class name as String and passes it to the Configuration.setListener(String, Object).
But Configuration build's a Object[] of the real listener class as type and not as type String.
Is it a bug or do I'm something wrong?
If it'S a bug the solution seems to be update MBean-interface and update ExternalSessionFactoryConfig to create an instance of the, as String specified, listener class.
Is anybody interested in a patch against hibernate 3.1 rc 2?
|