when we look up using ctx.lookUp("java:env/comp/CustomerBean")

Posted on 2004-11-24
Last Modified: 2008-02-01

In our application we look up beans using

    home = (EJBHome)PortableRemoteObject.narrow(ctx.lookup(jndiName), homeClass)

i have seen some where that we can look up beans using ctx.lookUp("java:env/comp/CustomerBean");

i know that when we go for PortableRemoteObject.but i dont know when we go for later one;

Question by:chaitu chaitu
    LVL 37

    Expert Comment

    And the question is?
    LVL 13

    Accepted Solution

    u use:

    when u have ub ur web.xml or ejb-jar.xml Resource reference like this:

        <ejb-local-ref >
    if local interface is used
      <ejb-ref >
    if u r using Remote interface

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
    Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
    Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
    Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now