1 Reply Latest reply on Feb 19, 2009 9:22 AM by jaikiran

    Service bean initialized twice

    egiva

      I have "bad" feeling that @Service bean is instantiated two time... I am lookuping it from the two places: one is from the client site via remote interface and another - using local interface for itnernal use.
      Could someone confirm or deny this or point to some specification material? And perhaps there is workaroud?

      Thanks, a lot!

      @Service
      @Stateless
      @RemoteBinding(jndiBinding = "SessionManager")
      @LocalBinding(jndiBinding = "SessionManagerInternal")
      @RunAs("licensed")
      public class SessionManagerBean implements SessionManager, InternalSessionManager
      {
      ...
      }
      


        • 1. Re: Service bean initialized twice
          jaikiran

          You seem to be marking it as @Service as well as @Stateless

          @Service
          @Stateless
          public class SessionManagerBean implements SessionManager, InternalSessionManager
          


          Instead, mark it just as a @Service

          @Service
          public class SessionManagerBean implements SessionManager, InternalSessionManager