1 Reply Latest reply on May 5, 2002 10:05 AM by jchildress

    Client Connection

    jchildress

      I'm having difficulty connection from a client app (Swing) to a JBoss 3.0 RC2 Topic. The client app is on a diff machine that JBoss.

      I'm using the following code for my connection setup:

      hash = new Hashtable();
      hash.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");

      hash.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
      hash.put(Context.PROVIDER_URL, "jnp://192.168.1.11:1099");
      context = new InitialContext(hash);
      conFactory = (TopicConnectionFactory)context.lookup("java:/ConnectionFactory");
      conn = conFactory.createTopicConnection();
      topic = (Topic)context.lookup("nepoolTopic");
      session = conn.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
      subscriber = session.createSubscriber(topic);
      subscriber.setMessageListener(this);
      conn.start();

      The error I continue to receive is a null pointer? Has anyone sucessfully setup a connection between a client and a topic on sep machines?

      Thanks

      John

        • 1. Re: Client Connection
          jchildress

          Sorry,

          I just realized that I'm working this weekend at home and I moved my JBoss server over to my XP machine. I believe that I have seen some posts with regard to using port 1099 on XP.

          Disregard my previous post until I can make sure the same problem happens on a non-XP box.

          Thanks,

          John