1 Reply Latest reply on Oct 18, 2001 5:54 AM by axel

    ctx.lookup() hang up! (ecperf)

    axel Newbie

      Hi all,
      can someone help me please?
      I run the ECperf EJB-Benchmark from sun on my mashine with jboss and db2.
      The applikation runs fine but the driver (it simulate clients for the benchmark) got results without generate new Orders.

      I have looked into the driver source and found that the OrderEntry hang-up at the "ctx.lookup(ohome)" statement.
      I cant't understand why no Exception is thrown.
      The following Coding shows the Source and my debugging-outputs.

      OrderEntry.java:
      try {

      ...

      System.out.println("axel: #1 before lookup");
      OrderSesHome orderSesHome =
      (OrderSesHome) PortableRemoteObject.narrow
      (ctx.lookup(ohome), OrderSesHome.class);
      System.out.println("axel: #2 after lookup");
      orders = orderSesHome.create();
      System.out.println("axel: #3 bean created");
      OrderCustomerSesHome customerHome =
      (OrderCustomerSesHome) PortableRemoteObject.narrow
      (ctx.lookup(chome), OrderCustomerSesHome.class);
      customerSession = customerHome.create();
      cartSesHome =
      (CartSesHome) PortableRemoteObject.narrow
      (ctx.lookup(cartHome), CartSesHome.class);
      } catch (NamingException e) {
      System.out.println("axel:exception1");
      errp.println(ident + "Failure looking up home " + e);
      start = false;
      } catch (Exception ex) {
      System.out.println("axel:exception2");
      errp.println(ident + "Failure in creating beans " + ex);
      start = false;
      } catch (Throwable exT) { // axel debug-statement
      System.out.println("axel:ERrror:");
      exT.printStackTrace();
      }

      This ist the output (5 threads are started):

      axel: got Controller://nhh287/Controller
      O1 started ...
      axel:odersagent:configure->numThreads =5
      axel:odersagent:configure->in for-loop to add orderentry
      axel:OrderEntry:Constructor
      Context not null:
      OrdersAgent O1, Thread 0 started
      axel: #1 before lookup
      axel:odersagent:configure->in for-loop to add orderentry
      axel:OrderEntry:Constructor
      Context not null:
      OrdersAgent O1, Thread 1 started
      axel: #1 before lookup
      axel:odersagent:configure->in for-loop to add orderentry
      axel:OrderEntry:Constructor
      Context not null:
      OrdersAgent O1, Thread 2 started
      axel: #1 before lookup
      axel:odersagent:configure->in for-loop to add orderentry
      axel:OrderEntry:Constructor
      Context not null:
      OrdersAgent O1, Thread 3 started
      axel: #1 before lookup
      axel:odersagent:configure->in for-loop to add orderentry
      axel:OrderEntry:Constructor
      Context not null:
      OrdersAgent O1, Thread 4 started
      axel: #1 before lookup


      I don't understand why no Exception where thrown. The Statements after
      OrderSesHome orderSesHome =
      (OrderSesHome) PortableRemoteObject.narrow
      (ctx.lookup(ohome), OrderSesHome.class);
      will not excecute. Is this an jndi-problem?
      Many thanks,
      axel