0 Replies Latest reply on Feb 16, 2004 5:05 AM by aquila125

    Can't run several clients simultaniously

    aquila125

      Hi there,


      I wrote a small application that uses some EJB's and a client that reads them through some queries.
      All works well if I test it with one client, but if a run a second one simultaniously, one of the two doesn't start until the other one has stoppen. It seems that I can't get do a second lookup on the same jndi name.

      Here's some code:


      InitialContext initial = new InitialContext();
      System.out.println("context lookup");
      Object objref = initial.lookup("CommercialProduct");
      System.out.println("Object casting");
      CommercialProductHome cp = (CommercialProductHome) PortableRemoteObject.narrow(objref, CommercialProductHome.class);

      On both screens I get the "context lookup" String, but one of them won't do the lookup until the other one is finished..

      What am I doing wrong?