I know the EJB container takes care of the injection when I'm using @EJB to inject a session bean (i.e. a seam component is not created).
i.e. a seam component is not created
not true - SessionBeanInterceptor creates a Seam component if session bean was obtained by @EJB.
But I still asking myself 'what is the advantage of using @In instead of @EJB?'
Here is what Seam Reference guide says :
In all dependency injection implementations that
we have seen, injection occurs when the component is constructed, and the reference does not subsequently
change for the lifetime of the component instance. For stateless components, this is reasonable. From the point
of view of a client, all instances of a particular stateless component are interchangeable. On the other hand,
Seam emphasizes the use of stateful components. So traditional dependency injection is no longer a very useful
construct (more on chapter 3.3 of the Seam Reference guide.)
Also, @In provide any kind of Seam component, EJB, JavaBean, EntityManager, .... not only @EJB