2 Replies Latest reply on Dec 6, 2001 11:07 AM by JEANNE

    How to call  an EJB from an other without  <ejb-ref> tags ?

    JEANNE Newbie


      We've got the following problematic :

      We want to load and call an EJB dynamically from an other without declaring ejb reference. We want to do this "a la" hot deploy.
      We don't know the EJB/service name we will access at deployment time.

      Let's assume that EJB "A" receives a message with the name of an EJB "B" at run-time. How to call services of "B" ?

      We have done this for a a simple java client with JNDI+ simple reflection code
      to obtain a homeInterface and call the business methods from the remote interface.

      Now the problem is that when an EJB wants to obtain the
      home interface of an other EJB we'll have to use the <ejb-ref> tag in ejb-jar.xml which is rather not dynamic.

      How could we do our stuffs whitout having to declare all the external references at deployment time ?

      Thank you,

      Fred J.