And with Spring2.5, EJB-style classpath scanning and EJB annotations are 
supported too, if you prefer annotation over configuration. Annotation is 
certainly quicker, but possibly harder to avoid name conflicts etc in larger 
projects...

// automatically declare a managed bean named "myBackingBean"
@Controller  
class MyBackingBean {
  // inject the bean named "otherBean"
  @Resource
  private SomeOtherBean otherBean;

  // inject the bean named "thing"
  @Resource("thing")
  private Object theThing;

  @PersistenceContext
  private EntityManager em;

  @PostConstruct
  public void init() {...}

  ..
}



---- Cagatay Civici <[EMAIL PROTECTED]> schrieb:
> Using spring to manage JSF beans is just great, blogged about it lately to
> show how to implement it.
> 
> http://cagataycivici.wordpress.com/2007/09/10/using-spring-to-manage-jsf-beans/
> 
> Cagatay

Reply via email to