Hi seam users,
I am using the seam (2.1.2) unwrapping functionality to unwrap an entity with a manager class, like the example above :
@Name("blog")
@Scope(ScopeType.STATELESS)
@AutoCreate
public class BlogService
{
@In EntityManager entityManager;
@Unwrap
public Blog getBlog()
{
// treatement and return of a blog instance (or null reference)
}
}
this example is from the seam reference, but I have the same situation.
when the object returned is not null, than seam puts it in the context with name = "blog"
but when the method returns a null reference, then, I expected that seam puts null reference in the context, with "blog" as name, but instead of this, it creates an instance of "BlogService" (the manager class) and puts it in the context with name = "blog" !!!!!!!!!!!
Is it a normal and expected behaviour, or a bug ?