0 Replies Latest reply on Nov 25, 2007 6:52 PM by David Radunz

    Accessing entities outside of injection

    David Radunz Newbie

      Hey,

      I have a web application that does not use persistence (hibernate) as we have a non-database data source and a custom mediation layer between that and Seam. I have a need to get a new (or existing) instance of a named entity (or what ever: action/controller as well) by code. The reason I am posting a request to the mailing list is because we are using the @Install annotation and as such I cannot instantiate the class directly because I of course want the "installed" version.

      Something like the following would be great..


      package test.product;
      
      @Name("person")
      @Install(1)
      public class Person {
      
      }


      package test.site;
      
      @Name("person")
      @Install(2)
      public class Person extends test.product.Person {
      
      }



      And then in code somewhere use "person" to obtain a new or existing instance of "test.site.Person" (being the installed version). Perhaps some sort of EL resolving code?


      Any ideas?

      David