PDA

View Full Version : Inject Dependencies to a Stateless Session Bean.



maramonar
Sep 9th, 2004, 09:10 AM
Hello to all.
I am quite new in the use of Spring and wanted to know if is possible to inject dependencies to a Stateless Session Bean. Our application has a structure so that the Web layer invokes to a SSB that are responsible to invoke to POJOS to complete a UC. These POJOS would have to be injected to the SSB. I hope to have been clear and excuse me by my english.

immanuel
Sep 9th, 2004, 09:13 AM
http://www.springframework.org/docs/reference/ejb.html#ejb-implementation

Rod Johnson
Sep 14th, 2004, 09:10 AM
You could use the autowire methods on AutowireCapableBeanFactory to configure your SLSB instance. However, a better approach is normally for the EJB to delegate to a POJO, as the Spring EJB support superclasses facilitate. By doing this, you get your business logic in a POJO that's easy to test outside a container.