This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

There's no out of the box support for this yet, although we're considering it for 1.2. (It's arguably a bit of an antipattern, as you are normally better to refactor your business logic wholly out of EJBs into POJOs behind them.)

It shouldn't be hard to do. You can customize your onEjbCreate() method to get the BF, cast it to AutowireCapableBeanFactory, and "autowire" your EJB instance (this) by type.

Look at DependencyInjectionAspectSupport in the sandbox if you need an example of this approach.

Rgds
Rod

Comment

There's no out of the box support for this yet, although we're considering it for 1.2. (It's arguably a bit of an antipattern, as you are normally better to refactor your business logic wholly out of EJBs into POJOs behind them.)

It shouldn't be hard to do. You can customize your onEjbCreate() method to get the BF, cast it to AutowireCapableBeanFactory, and "autowire" your EJB instance (this) by type.

Look at DependencyInjectionAspectSupport in the sandbox if you need an example of this approach.