站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 1.2.9 API 文档英文版

LocalOjbConfigurer (Spring Framework) - Spring Framework 1.2.9 API 文档英文版


org.springframework.orm.ojb.support
Class LocalOjbConfigurer

java.lang.Object
  extended by 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

Constructor Summary
LocalOjbConfigurer()
           
 
Method Summary
 void setBeanFactory(BeanFactory beanFactory)
          Callback that supplies the owning factory to a bean instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalOjbConfigurer

public LocalOjbConfigurer()
Method Detail

setBeanFactory

public void setBeanFactory(BeanFactory beanFactory)
Description copied from interface: BeanFactoryAware
Callback that supplies the owning factory to a bean instance.

Invoked after the population of normal bean properties but before an initialization callback such as InitializingBean.afterPropertiesSet() or a custom init-method.

Specified by:
setBeanFactory in interface BeanFactoryAware
Parameters:
beanFactory - owning BeanFactory (never null). The bean can immediately call methods on the factory.
See Also:
BeanInitializationException


Copyright (c) 2002-2007 The Spring Framework Project.