1 Reply Latest reply on Aug 7, 2009 8:00 PM by Arbi Sookazian

    Name annotation for package-protected classes

    Tomás Pollak Newbie

      Hello,


      I have a use case where I want to install a Seam component that is not a public class. We have decided in our project that we didn't want to expose some implementation details so we have an interface and the corresponding implementing class that is package-protected.


      However if I use @Name for a non-public class Seam doesn't pick it up. Have you come across such a use case? Is there a recommended practice for this that I am not aware of?


      Should I enter a request in JIRA for this?


      Thanks,
      Tomás

        • 1. Re: Name annotation for package-protected classes
          Arbi Sookazian Master

          So something like this?


          @Name("foo")
          class Foo implements IBar {...}



          IIRC Seam creates proxies for all the Seam component classes, and I'm not sure if that's the root cause of the limitation or not.  Are you using bijection in that class or some other functionality which requires Seam interceptors?


          I have not seen anyone else request this on this forum but you can try creating a JIRA for it if you can support the use case requirement...


          from SiA:



          Since components are requested through the Seam container, Seam has an opportunity
          to manage the instances throughout their life cycle. Seam wires the object with
          interceptors, wrapping it in a shell known as an object proxy, before handing down
          the newly created instance. This allows Seam to act as the object’s puppeteer, pulling
          on its strings during each method call to add behavior