0 Replies Latest reply on Jan 28, 2003 11:33 AM by xnagynorbi

    Foreign EJB InitialContext

    xnagynorbi

      Hi,

      I have a problem with the InitialContext of my EJBs:

      I have two CMP Entity Beans A and B. Entity A gots a local interface of B in his ejbCreate and ejbPostCreate. In the ejbPostCreate he uses it like parameter by passing it to a third entity bean C.
      At this moment the container calls setEntityContext of B.
      In this method, B looks up for local homes of other entities using the new InitialContext().lookup(...).
      The lookup fails with NameNotBoundException, because the new InitialContext returns the context of entity A and not B.

      When I create instances of entity B from a session bean everything works.

      My question is whether this is the normal behaviour or it is a bug.

      I am using JBoss 3.0.3, but it seems that other versions have the same behaviour.

      Thanks for your help.

      Norbi