Hey Jothi,
You are quite right there.
@Resource can inject a resource as well as a bean.
The resource can not be an 'unregistered' POJO.
You can inject registered POJOs. for eg, JSF managed beans.
You would be able to inject 'any' POJOs in the future release(most probably). Thats really gonna help a lot.
Anything registered in the JNDI and managed by the container can be injected. ( Container needs to create it )
@EJB can only inject local and remote beans.
@Resource can be used anywhere for eg. web tier to inject resources.
Interestingly, EJBs can also be injected into Application clients in ACC 'static' ally.
@Inject is also for DI. Its getting amusing now, isnt it?
OK, @Inject is like generic and takes only the jndiName whereas @Resource and @EJB are more specific and more configurable with attributes like sharable, resourceType , authenticationType etc.
@Resource can be used at class level whereas @Inject and @EJB are method and field level.
Hope this helps you.
Wish you a happy and successful New Year.
- Paul