Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Apache CXF API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cxf.service.invoker.spring
Class SpringBeanFactory

    java.lang.Object
      org.apache.cxf.service.invoker.spring.SpringBeanFactory

All Implemented Interfaces:
  Factory, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    public class SpringBeanFactory

extends Object
implements Factory, org.springframework.context.ApplicationContextAware

Factory that will query the Spring ApplicationContext for the appropriate bean for each request. This can be expensive. If the bean is "prototype" or similar such that a new instance is created each time, this could slow things down. In that case, it's recommended to use this in conjunction with the PooledFactory to pool the beans or the SessionFactory or similar.

Constructor Summary
`SpringBeanFactory(Class<?> c, String[] args)`
`SpringBeanFactory(String name)`

Method Summary
`Object` | `create(Exchange e)` Creates the object that will be used for the invoke
`void` | `release(Exchange e, Object o)` Post invoke, this is called to allow the factory to release the object, store it, etc...
`void` | `setApplicationContext(org.springframework.context.ApplicationContext arg0)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SpringBeanFactory

    public SpringBeanFactory(String name)

### SpringBeanFactory

    public SpringBeanFactory(Class<?> c,
                             String[] args)

Method Detail

### create

    public Object create(Exchange e)
                  throws Throwable

  Creates the object that will be used for the invoke

  Specified by:
    `create` in interface `Factory`
  Throws:
    `Throwable`

### release

    public void release(Exchange e,
                        Object o)

  Post invoke, this is called to allow the factory to release the object, store it, etc...

  Specified by:
    `release` in interface `Factory`
    `o` - object created from the create method

### setApplicationContext

    public void setApplicationContext(org.springframework.context.ApplicationContext arg0)
                               throws org.springframework.beans.BeansException

  Specified by:
    `setApplicationContext` in interface `org.springframework.context.ApplicationContextAware`
  Throws:
    `org.springframework.beans.BeansException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Apache CXF API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Apache CXF