0 Replies Latest reply on Jul 3, 2008 11:10 PM by bouba331

    Automatic creation of Seam components for Hibernate or JPA entities

    bouba331

      Hi,


      I already have multiple Hibernate/JPA entities in my application. I want each entity to be a Seam component and don't want to insert @Name annotation in the code. As I have a lot of entities I don't want to create my Seam components via component.xml either.


      What I want to do is to find a solution to automatically create a Seam component for each entity.


      For example, if I have a User entity:


      @Entity
      public class User {
       ...
      }



      I wish to create a Seam component named user. And if I add a new entity XX I want it to be automatically associated to a Seam component xx without adding anything.


      So is it possible to scan all classes marked with the @Entity annotation and automatically create a seam component for each class ?


      Thanks.