Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7541929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:01:29+00:00 2026-05-30T08:01:29+00:00

I have a basic EJB 3.0 (Java EE 5) project in IBM RAD (aka

  • 0

I have a basic EJB 3.0 (Java EE 5) project in IBM RAD (aka Eclipse 3.4) and WebSphere 7.0

I created an EAR project, an EJB project (for the EJBs), a JPA project (for the domain objects), and a Dynamic Web project (for my JAX-RS web service).

The EJB project contains an EJB like so:

@Stateless
public TestBean implements TestBeanLocal { 
/* ... */

@Local
public TestBeanLocal {
/* ... */

The Web project contains a JAX-RS web service like so:

@Path(value="/mywebservice")
public MyWebService implements Application {
  @EJB
  private TestBeanLocal myBean;

  @GET
  @Produces({"text/plain"})
  public String getList() {
    return myBean.getList();
    /* ... */

My problem is the “myBean” attribute in MyWebService is never injected. It’s always null.

Any ideas what I missed?

Thanks,
Rob

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T08:01:30+00:00Added an answer on May 30, 2026 at 8:01 am

    The Java EE container will only perform @EJB injection on components it manages. For Java EE 5, this would include servlets, Web services and EJBs. In your case the component is managed by Wink, so the question is whether Wink is expected to interpret @EJB (I guess not). With Java EE 6 injection works because JAX-RS is part of that Java EE version and the component is managed by the container, not by a 3rd party framework.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using IBM RAD 7 (aka Eclipse 3.4) and WebSphere 7. I have a
I currently have basic knowledge of C++ and VB.Net. For our college project i
In JPA the Entities are nice annotated Plain Old Java Objects. But I have
I want to create an EAR project that consists of an EJB 3.1 module
I have working app1.ear , containing: JPA entity, MyObjectImpl , implementing interface MyObject from
I am trying to run this basic JPA/EJB code: public static void main(String[] args){
I have basic knowledge of Java and some experience with MVC pattern. I have
I have basic knowledge of Java's reflection API - therefore, this is not only
I have been struggling trying to test a super simple EJB project in netbeans.
I have basic idea on Kilo Virtual Machine on Mobiles , I have clear

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.