Problem with Remote Lookup in JBoss


EJB design: Problem with Remote Lookup in JBoss

  1. Problem with Remote Lookup in JBoss (3 messages)

    I am trying to lookup JBoss ports through this client Program

    Context ctx = new InitialContext(env);
    NamingEnumeration bl=(NamingEnumeration)ctx.listBindings("");
    Binding b=(Binding);
    System.out.println(b.getName() + " Object is -> " + b.getObject());

    On Executing this i am getting Exception:::::

    javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1199 and discovery failed with error: access denied ( connect,accept,resolve) [Root exception is javax.naming.CommunicationExcepti
    on: Failed to connect to server localhost:1199 [Root exception is access denied ( connect,resolve)]]

    if anyone knows the answer then do let me no please

    Threaded Messages (3)

  2. url and policy file[ Go to top ]

    i think you should do two things:

    1. check for service running at the URL
    2. modify the policy file. by default this file gives full pemission but in your case it may have been changed.

  3. Info Required[ Go to top ]

    Hi Srini
    thanks for your feedback
    Can you please tell me which is the policy file for JBoss and where it is located

    thanks and regards
    Deep Singh
  4. use installed JRE policy file.[ Go to top ]

    Hi Deep,

    Well JBoss need not have its own policy file. It can use the default file of installed JRE which is found at %JRE_HOME%\jre\lib\security\java.policy.

    If you want to override it, you can define your own policy file. Please refer java giude for that purpose.