org.jboss.hibernate
Interface ListenerInjector
public interface ListenerInjector
Implementors are responsible for injecting any custom Hibernate3
event listeners into the Configuration
which
will then later be used to build the SessionFactory
.
Implementors should have a no-arg constructor.
- Version:
- $Revision: 1.1.2.4 $
- Author:
- Steve Ebersole
Method Summary |
void |
injectListeners(javax.management.ObjectName objectName,
org.hibernate.cfg.Configuration configuration)
Called by the Hibernate MBean when
it is time to generate any custom listeners. |
injectListeners
void injectListeners(javax.management.ObjectName objectName,
org.hibernate.cfg.Configuration configuration)
throws org.jboss.deployment.DeploymentException
- Called by the
Hibernate
MBean when
it is time to generate any custom listeners.
Implementors should use the Configuration.setListener(String, Object)
method to inject the appropriate listener instance(s).
Note that the SessionFactory
is not yet available;
it has not even beeen built at this time.
Note that it is possible to actually set some properties on the incoming
configuration instance. It is not advisable to do this with any
Hibernate-specific settings as the MBean will have final say after execution
of this method regarding any settings it manages (potentially over-writing a
setting done during this execution). Maybe useful for the listeners,
themselves, being able to read custom settings later from the
SessionFactory
.
- Parameters:
configuration
- The configuration into which the customer listeners
should be injected.objectName
- The MBean object name.
- Throws:
org.jboss.deployment.DeploymentException
- If any problems occur which should lead to a
deployment failure (i.e. do not build the SessionFactory
).
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.