topic = (Topic) initialContext.lookup("topic/topicBrowseCategories");
topic = (Topic) initialContext.lookup(Config.PrefixTopicName+"topicBrowseCategories");
  public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException  {    String  region=null;    String  username=null, password=null;    Context initialContext = null;    sp = new ServletPrinter(response, "BrowseCategories");    sp.printHTMLheader("RUBiS available categories");    sp.printHTML("<h2>Currently available categories</h2><br>");    try    {      initialContext = new InitialContext();    }     catch (Exception e)     {      printError("Cannot get initial context for JNDI: " +e+"<br>");      return ;    }    region = request.getParameter("region");    username = request.getParameter("nickname");    password = request.getParameter("password");    TopicConnectionFactory topicFactory = null;    TopicConnection connection = null;    TopicSession session  = null;    Topic topic = null;    String html;    try     {      // lookup the connection factory      topicFactory = (TopicConnectionFactory)initialContext.lookup(Config.TopicConnectionFactoryName);      // create a connection to the JMS provider      connection = topicFactory.createTopicConnection();      // lookup the destination      topic = (Topic) initialContext.lookup("topic/topicBrowseCategories");      // create a session      session  = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); // no transaction and auto ack    }     catch (Exception e)    {      sp.printHTML("Cannot connect to message bean MDB_BrowseCategories : " +e+"<br>");      return ;    }    try     {      // create a requestor to receive the reply      TopicRequestor requestor = new TopicRequestor(session, topic);      // create a message      MapMessage message = session.createMapMessage();      // set parameters      if (region != null)        message.setString("region", region);      if (username != null)        message.setString("nickname", username);       if (password != null)        message.setString("password", password);      message.setJMSCorrelationID("category");      // send the message and receive the reply      connection.start(); // allows message to be delivered (default is connection stopped)      TextMessage reply = (TextMessage)requestor.request(message);      connection.stop();      // read the reply      html = reply.getText();      // close connection and session      requestor.close(); // also close the session      connection.close();    }     catch (Exception e)    {      sp.printHTML("Cannot get the list of categories: " +e+"<br>");      return ;    }    sp.printHTML(html); 	    sp.printHTMLfooter();  }