It's the
EJB container which implements resources injection for Session beans and MDB.
Everything else is simply ignored: an annotation has no logic at all. The ejb container looks at the annotations on ejbs and injects resources.
If you use annotations in a class of yours which is not explicitly managed by the container, it is simply ignored: for example, nothing prevents you from creating your own annotation class (there's a cool example on O'Reilly book)