title: Inject EJB 3.0 in WebLogic Server v10.3
body: <p>I am having some issues trying to inject a stateless EJB into an Application Client Project. Both the App Client and the EJB are in the same EAR. Using JNDI, I am able to retrieve an instance of the EJB, but I'm not sure how should I do it with the @EJB annotation. I've tried using @EJB(name="something"), @EJB(mappedName="something"), but all I get is a null. Here is my code:</p>
  
  <pre><code>@Remote
  public interface TimerEjbTestService {
      public void testMethod();
  }
  
  @Stateless(mappedName="TimerEjbTestService")
  public class TimerEjbTestBean implements TimerEjbTestService{
  
      public void testMethod() {
          System.out.println("Inside EJB.");
      }
  }
  </code></pre>
  
  <p>With JNDI I'm able to get the instance as follows:</p>
  
  <pre><code>Context ctx = new InitialContext();
  TimerEjbTestService timerEjbTestService = (TimerEjbTestService) ctx.lookup("TimerEjbTestService#myejb.timerejbtestservice.services.TimerEjbTestService");
  </code></pre>
  
  <p>Any ideas on how can I do this?</p>