4 Replies Latest reply on Nov 11, 2002 11:30 AM by Dmitry Mozheyko

    MultiThread MBean

    Dmitry Mozheyko Novice

      When I call method of LocalHome interface of my bean from the my multy thread Mbean there is an exception Authetication exception: principal=null though i call LoginContext's login() method before.

      If i make this from external java program all normally works.

      WHY ????????

        • 1. Re: MultiThread MBean
          Adrian Brock Master

          NOT LOAD ENOUGH! :-)

          On a client, login() is for the whole VM by default.
          On the server you have to do it for every thread.

          Regards,
          Adrian

          • 2. Re: MultiThread MBean
            Dmitry Mozheyko Novice

            I do this for EVERY thread !!!

            • 3. Re: MultiThread MBean
              Adrian Brock Master

              YES.

              The server has to deal with different principals
              on different threads.

              Regards,
              Adrian

              • 4. Re: MultiThread MBean
                Dmitry Mozheyko Novice

                Has made in each thread with different - has not helped:

                18:35:16,108 ERROR [SecurityInterceptor] Authentication exception, principal=null
                18:35:16,120 ERROR [LogInterceptor] EJBException, causedBy:
                java.lang.SecurityException: Authentication exception, principal=null
                at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:173)
                at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:94)
                at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
                at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
                at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLocalContainerInvoker.java:230)
                at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
                at $Proxy52.findLoginChoosed(Unknown Source)
                at org.mycompany.server.ServerHelper.getEJB(Unknown Source)
                at org.mycompany.server.ServerHelper.(Unknown Source)
                at org.mycompany.server.ServerAccepter.run(Unknown Source)
                18:35:16,130 ERROR [STDERR] javax.ejb.EJBException: checkSecurityAssociation; CausedByException is:
                Authentication exception, principal=null