2 Replies Latest reply on Apr 1, 2009 8:36 AM by zzuli

    Help: how to look up ejb3 deployed in ear using jndi

      Hi,everyone:
      I'm trying to use jndi to look up ejb3 depoyed in ear-file. The structure of ear file is like: taas.ear\app.jar , the "app.jar" is where the ejbs are deployed.
      If i write code:

      jndiContext.lookup("ServiceProviderDaoImpl/local");


      There will be exception:
      javax.naming.NameNotFoundException: ServiceProviderDaoImpl not bound


      However, if i deploy the ejbs directly in a app.jar which is not in a ear-file, then same same code will work fine.

      I cannot figure out how to write the correct code to look up the ejbs.
      I use jboss 5.0.1GA.
      Could anyone help me? Thanks a lot.