Can I use `@Component` instead of `@ManagedBean` in managed bean Java class.
When I use `@ManagedBean` and use `@Autowired` annotation for a object in the ManagedBean, I get null value in the object. If I use `@Controller` I dont face this problem

```
@Component
@Scope("session")
public class OwnerListBean implements Serializable{

    private static final long serialVersionUID = 3237148505293593526L;

    OwnerService ownerService;

    public OwnerService getOwnerService() {
        return ownerService;
    }

    @Autowired
    public void setOwnerService(OwnerService ownerService) {
        this.ownerService = ownerService;
    }
}

```

The above code works.

```
@ViewScoped
@ManagedBean
public class OwnerListBean implements Serializable{

    private static final long serialVersionUID = 3237148505293593526L;

    OwnerService ownerService;

    public OwnerService getOwnerService() {
        return ownerService;
    }

    @Autowired
    public void setOwnerService(OwnerService ownerService) {
        this.ownerService = ownerService;
    }

}

```

In the above code the object `ownerService` is `null`.