org.springframework.orm.ojb.support
Class LocalOjbConfigurer
java.lang.Object
org.springframework.orm.ojb.support.LocalOjbConfigurer
- All Implemented Interfaces:
- BeanFactoryAware
public class LocalOjbConfigurer
- extends Object
- implements BeanFactoryAware
This configurer needs to be defined as Spring bean when using
LocalDataSourceConnectionFactory, to expose the Spring BeanFactory
to the corresponding static field of the connection factory.
See LocalDataSourceConnectionFactory's javadoc for usage details.
It is clearly not ideal to use a static field here, but unfortunately
OJB creates an instance of the configured ConnectionFactory at broker
creation time. OJB 1.0 does not have an explicit instance-based
configuration model, therefore we have to resort to such workarounds.
- Since:
- 1.1
- Author:
- Juergen Hoeller
- See Also:
LocalDataSourceConnectionFactory
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalOjbConfigurer
public LocalOjbConfigurer()
setBeanFactory
public void setBeanFactory(BeanFactory beanFactory)
- Description copied from interface:
BeanFactoryAware
- Callback that supplies the owning factory to a bean instance.
Invoked after population of normal bean properties but before an init
callback like InitializingBean's afterPropertiesSet or a custom init-method.
- Specified by:
setBeanFactory
in interface BeanFactoryAware
- Parameters:
beanFactory
- owning BeanFactory (may not be null
).
The bean can immediately call methods on the factory.- See Also:
BeanInitializationException
Copyright (c) 2002-2005 The Spring Framework Project.