2 Replies Latest reply on Jul 22, 2002 10:47 PM by eric138

    Can't authenticate user exception

    eric138

      Hello,

      I am now using JBoss3.0 standard version.

      I use a SessionBean to send message to JMS.

      Everything is smoothy if I run them in a local pc.

      But, If I use a modem to dialup to the Internet. My Win2k will retrieve a dynamic IP from ISP.


      At this moment, JBoss3 also work fine when I send a message to JMS from a SessionBean. But, If I disconnect to the Internet and re-connect to the Internet, it failed to send message to JMS again from the SessionBean.


      I use the Local interface as the SessionBean.
      I deploy my application in an EAR(including a WAR, ejb-jar). Each time I will send messages to the JBoss-MQ in the WEB by calling the SessionBean.


      How can I solve this?
      Is it possible to force the SessionBean to connect to the MQ to LOCALHOST or a specific IP ?


      My platform: Win2k
      JVM: JDK1.4
      JBoss3.0(Jetty)



      Best regards,
      Eric

        • 1. Re: Can't authenticate user exception
          joelvogt

          Yep. I assume you are using your initial context to get a reference to your queue and queue session etc.

          What you will need to do is set up a context manually, such as

          java.util.Hashtable props = new java.util.Hashtable();
          props.put(Context.INITIAL_CONTEXT_FACTORY,
          "org.jnp.interfaces.NamingContextFactory");
          props.put(Context.PROVIDER_URL, YOUR_URL/IP);
          props.put("java.naming.rmi.security.manager", "yes");
          props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming");

          // Get the initial context with given properties
          Context context = new InitialContext(props);

          Where YOUR_URL/IP is localhost or 127.0.0.1 etc.

          • 2. Re: Can't authenticate user exception
            eric138

            If I set this, is it means to use RMI but not use Local Interface?

            Is it good for performance(network transmission) issue if I deploy all in an EAR?

            Eric