Adding a dependency to an EJB

Question!

I want to add a dependency to an EJB. How do I do this using Spring? The dependent object is a general service object. Based on code below I want to wire myDependency without having to use 'new'. The EJB runs in weblogic.

@Stateless(mappedName = "MyBean")
public class MyBean implements MyBeanRemote, MyBeanLocal {

    @EJB(name = "MyOtherBean")
    private MyOtherBean myOtherBean;


    private MyDependency myDependency;
    ...

}
By : striker77


Answers

This is well described in the By : JB Nizet



This video can help you solving your question :)
By: admin