What is the difference between the two approaches of looking up

Discussions

EJB programming & troubleshooting: What is the difference between the two approaches of looking up

  1. What is the difference between the two approaches of looking up in JNDI environment?

    ctx.lookup("ejb/Account");

    ctx.lookup("java:comp/env/ejb/Account");

    Thanks
  2. Nothing.

    One is an absolute path and another one is relative.

    Regards
    Amit
  3. remote and local[ Go to top ]

    the global lookup will be only used for the remote lookup. The reference lookup (java:comp/env) can be used for remote and local lookup. But it is still depending on the vendor. Please speak out if i am wrong. Thanks!
  4. Thanks a lot.