Yes, it is a bug.
But actually it looks like the bug is in HEM, not in Seam (I assume you are using Hibernate):
So why not report this in Hibernate JIRA, and I will put a temporary workaround in Seam.
Thanks again! it works!
And, yes! I am using JBoss 4.0.5/EJB3 R9 (Hibernate on base).
I am not conviced that this is HEM bug. By specs, an entity bean may be any POJO (including XML-only mapped one) that can be associated with a certain Persistence Unit. This way, "contains" should not evaluate any Object (instance) that is not in it own configuration (mapping).
Of cource, annotated pojos is very simple to test for entity nature but there is many other ways to define that it is an entity on any other persistence unit.
I think this is a lake of good statement of spec. I think the exception should be "IllegalArgumentException - if not an entity for this persistence unit" or something like that.
Do you think this is resoneable?