@Entity annotation question

HI,

I have a number of EJB Entity Pojo's indicated by the @Entity annotation.

I want to pass these Entities to business logic and to API's, such

doBusinessLogic(Entity entity1, Entity entity2).

When I try to enforce type safety by typing the methods variable as Entity instances, I get a Java "cannot be applied to" compilation error, which is fair enough. My entities do not implement the javax.persistence.Entity interface, they simply are marked with the @Entity annotation.

What is the solution to this? Is it to make my Entities implement the Entity interface and override the name() method?

[635 byte] By [beginner2a] at [2007-10-3 3:47:58]
# 1
The @Entity annotation isn't intended to be used that way. It is not a super-type for all entities -- it's just one way to specify the meta-data that a class is an entity.Just like @Stateless is not a super-type for all stateless session beans. --ken
ksaksa at 2007-7-14 21:44:57 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...