4 Replies Latest reply on Jul 11, 2012 8:04 AM by Anderson Vasconcelos

    Remote lookup without user authentication

    Anderson Vasconcelos Newbie

      Hi

       

      It's possible to lookup remote EJB  withou username and login configuration in jboss-ejb-client.properties?

       

      I use this properties:

       

      remote.connections=default

      endpoint.name=client-endpoint

      remote.connection.default.port=4447

      remote.connection.default.host=10.16.73.152

      remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false

      remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

      remote.connection.default.username=remote

      remote.connection.default.password=123mudar

       

       

      And this Java code:

       

      String JBOSS_CONTEXT = "org.jboss.naming.remote.client.InitialContextFactory";

      Properties props = new Properties();

      props.put(Context.INITIAL_CONTEXT_FACTORY, JBOSS_CONTEXT);

      props.put(Context.PROVIDER_URL, "remote://10.16.73.152:4447");

      props.put(Context.SECURITY_PRINCIPAL, "remote");

      props.put(Context.SECURITY_CREDENTIALS, "123mudar");

      InitialContext context = new InitialContext(props);

       

      RemoteEjb remoteEjb = (RemoteEjb) context.lookup(jndiName);

      remoteEjb.callMethod();

       

      If i remove the username and password configurations, i can't call the method in remote ejb. I give the error: "No EJB receiver available for handling"

      Thanks