3 Replies Latest reply on Jun 8, 2005 10:34 AM by Scott Stark

    Running a standalone program to access JBoss application

    Paul Carroll Newbie

      I have a standalone class that I use to test new funciotnality that I add to our product. Our product runs JBoss 3.2.0. I have a custom login module defined for our product. The following is a snippet of my main method of the test class:

      System.setProperty( Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory" );
      System.setProperty( Context.PROVIDER_URL, "jnp://localhost:1099" );
      System.setProperty( Context.SECURITY_PRINCIPAL, "username" );
      System.setProperty( Context.SECURITY_CREDENTIALS, "password" );
      System.setProperty( Context.SECURITY_PROTOCOL, "my.custom.login.module.classname" );

      When I run the program it always tries to authenticate me as the unauthenticatedIdentity that I have specified in my custom login module. How do I get the login module to recognize SECURITY_PRINCIPAL and SECURITY_CREDENTIALS that I thought I was passing in. Thanks.