1 Reply Latest reply on Jul 26, 2012 9:36 AM by Veit Guna

    EJB authentication via JNDI and remote-naming behave differently?

    Veit Guna Newbie

      Hi.

       

      I'm using JBoss 7.1.1 final and I came across some inconsistent behavior when invoking an EJB from a remote client.

      AFAIK there're a least two ways to do it:

       

      Way A:

      • use jndi.properties with
        java.naming.factory.url.pkgs=org.jboss.ejb.client.naming
      • using jboss-ejb-client.properties on classpath
      • using new InitialContext()

       

      Way B:

      • use jndi.properties with

             java.naming.factory.initial=org.jboss.naming.remote.client.InitialContextFactory

             java.naming.provider.url=remote://127.0.0.1:4447

      • using new InitialContext()

       

      The strage thing is, a) works WITHOUT specifying any credentials. b) fails with "Authentication failed: all available authentication mechanisms failed" when no credentials are given.

       

      Why is that?