2 Replies Latest reply on Aug 12, 2005 12:38 PM by khalidhajsaleh

    How to initiate a specific instance?

    khalidhajsaleh

      I have a interface "A". Two different sslb beans classes "B" and "C" both implement interface "A".

      How can I get either B or C using an initial context lookup? When doing an initial context, I have to use the interface A.

      InitialContext ctx = new InitialContext();
      A a = (A) ctx.lookup(A.class.getName());
      I can not cast A to either. I would appreciate any help.