Why JNDI is called an Interface?

Why JNDI is called as Java Naming and Directory Interface, question is why
interface ? when it is not a interface ?

It is an interface because it is defined as an abstract set of APIs, not actually implementation. The actually implementation is done by service providers.
Defining an abstract set of APIs without actually implementation can isolate the implemenation of service provide and client application code, thus make them more independently from each other. i.e, a client application would not need to know what changes made by any particular vendor.
Hope this helps.

Similar Messages

  • Calling Remote interface from client

    Hi there!
    I am working on a BMP (using weblogic 6.1)
    My problem is - How do I contact remote interface from client. In my jndi tree I have mentioned only Home interface. Right now I am calling my remote interface like this:
    //contact home interface
    Object obj = ctx.lookup("APIHome");
    APIHome home = (APIHome) javax.rmi.PortableRemoteObject.narrow(obj, APIHome.class);
    //creating remote somehow - I got this clue from a website
    rem = home.findByPrimaryKey(new EntityPK("test1","test2"));
    //calling getter & setter methods
    rem.setWidth()
    rem.getId();
    This works...but doesn't make any sense to me. Why should we initialize remote interface as above. Or is there any other option. Can somebody please explain me more clearly about this concept.
    Thanks very much
    regards
    -Manasvi

    The HomeInterface contains two types of methods - create and find. The create methods create an instance of the entity bean(i.e., a record in the database) and the finder methods finds an existing record in the database, constructs an entity bean representing this row and returns the remote interface of this bean to the client for further manipulations.

  • Idoc Processing Error - Communication error calling XI interface

    Hi All, We in the middle of our upgrade from IS-PS-CA 472 to ECC6 and are facing issues processing old Idoc's with status 64 via BD87 the error message says that "Communication error calling XI interface". We have not implemented XI at this point in time.
    Can anyone please advice why this is happen is this something to do the SAP version.
    Please help.
    Rgds
    Saj

    Can you provide the message number.
    Reddy

  • Why java is called pure object oriented.

    i know that java is called as pure object oriented language.
    why it is called so even though it has primitive datatypes and also it doesnot support multiple inheritance completely. it only supports in the case of interfaces but not in the case of classes. then why it is called pure object oriented.

    Its because you cannot write an executable java program without creating an object. Well, you can:
    public class a
      public static void main( String a[] )
    }In contrary to C++, there can be no variables or functions in the wild (outside a class).
    You can not create an executable java program without creating a class (but not forcibly its instance, an object.)
    The "pure object oriented" wording in this sense has not really much importance, it is rather a marketing ploy.

  • Why does EJB needs two interface???

    Hi All,
    This has been asked by many ppl and many of you might be having
    the correct answer for it. Please tell me....
    Why does EJB needs two interface (Home and Remote Interface)?. Why not one?
    Thanx to all...
    Regards
    GoodieGuy

    Hi Goodie ,
    Its good question and its a very valid one , one has to have doubt
    why two , why not one ..
    Here the answer goes ..
    First of all you need to understand that its a distributed computing technique ie I mean lot of people will be accessing the bean at the same time , right ? OK , you cann't access the bean directly.
    and lastly the stateless and entity beans do instance pooling.
    The very purpose of having two interfaces is
    1) To differnentiate the bussiness logic and life cycle methods .
    2) The home interface inititates life cycle methods like creation , destruction etc .
    3) There are lot of beans in the container , and through home you are
    creating the instance or accessing one of them .
    4) Once you have home object using it we get the remote object ie the instance of the bean that you want to access if stateless any bean can be called , if statefull depending upon the parameter in create method that respective bean is created and invoked .
    In ejb 1.0 and 1.1 even though the bean and the client are in same jvm its assumed that they are remote and in 2.0 Ver we have local this is to avoid network traffic .
    Hope you have got the answer , but if u still need clarification
    read EBRoman book first and second chapters thoroughly and then proceed
    a head.
    Bye
    Mahesh L.
    ============

  • Report Generation Toolkit producing error -2147417842, "The application called an interface that was marshalled for a different thread."

    Hi everybody,
    I've got an application that logs data to an Excel spreadsheet using the Report Generation Toolkit.  My VI's have worked fine in the past using Excel XP, but since I've upgraded to Excel 2007, I am getting COM errors like this one:
    "Error -2147417842 occurred at The application called an interface that was marshalled for a different thread. in Excel_Insert_Text.vi"  That is the exact wording, even with the weird punctuation and capitalization.
    The first occurrence of the error is not determinate.  Sometimes, up to 10 logging sessions, involving a new .xls file, can occur before this error pops up.  Once this error occurs, I must quit LabVIEW to resolve it.  If I try to do anything with Excel, I always get this error, although sometimes it comes out of different source VIs.  Excel_Open.vi is another.
    These logging VIs have worked just fine until upgrading to Excel 2007.  I checked, and I was using a really old version of the Report Generation Toolkit, v1.0.1.  I read the documentation and had a big sigh of relief when I realized I needed to upgraded to v1.1.2 to get Excel 2007 support.  However, even after upgrading, I'm still getting the same errors.  I'm using LabVIEW 8.0.1, and I'm also building these VIs into an application.   The error occurs both in the LabVIEW IDE and in the built application.  Does anybody out there have any idea what I can do to fix this?  I googled a little, and discovered this is a COM error, but I can't find any references to the Report Generation Toolkit specifically.
    Thanks,
    Phil
    Solved!
    Go to Solution.

    Hi Christian,
    I do not see that exact option listed, do you mean "user interface"?  I recognize the "Run in UI Thread" option, it's on the Call Library Function Node.
    I checked, and my top-level VI has "same as caller" set, and I believe all my VIs are set to "same as caller".  Are you suggesting I change my top-level VI preferred execution environment to "user interface", or just the logging sub-VIs that use the Report Generation Toolkit?
    Thanks,
    Phil
    Attachments:
    VI_properties.png ‏15 KB

  • Why cant I call a getResultSet method more than 1

    Why cant I call the getRSS method more than 1 time from my page?
    I have a class called methods class, here is the code:
    public class methodsClass {
        public java.sql.Connection objConn = null;
        public String query = null;
        public java.sql.PreparedStatement statement = null;
        public java.sql.ResultSet objRS = null;
        /** Creates a new instance of methodsClass */
        public methodsClass() {}
         public ResultSet getRSS(String sql)
            String strSQL = sql;
            try
                Class.forName("oracle.jdbc.driver.OracleDriver");
                objConn = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:CCD","system", "Abcd1234");
                statement = objConn.prepareStatement(strSQL,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
                objRS = statement.executeQuery();
            catch (Exception e)
                System.err.println("Error in getRSS method");
                e.printStackTrace();
            return objRS;
        public void killConn()
            try
                    objRS.close();
                    System.out.println("Resultset is closed");
                    statement.close();
                    System.out.println("Statement is closed");
                    objConn.close();
                    System.out.println("Connection is closed");
                catch(Exception e)
                System.err.print("Unable to kill all objects");
                e.printStackTrace();
    //END OF CLASS***************************************** I call the method from the following jsp:
    <%
    String eqCat = "Tracked Vehicle";
    String strSQL = "SELECT DISTINCT * FROM robert WHERE eqcategory = '"+eqCat+"'";
    methodsClass mc = new methodsClass();
    ResultSet objRS = mc.getRSS(strSQL);
    java.lang.System.out.println(strSQL);
    %>
         <select name="selectBox">
         <% while(objRS.next()){
             out.println("<option value='"+objRS.getString("eqtype")+"'>"+objRS.getString("eqtype")+"</option>");
               mc.killConn();
    %> The above works fine.
    If I try to call the getRSS function again on this page I get the following error:javax.servlet.ServletException: Exhausted Resultset
    I tried to call it like so:
    newNameSQL = "Select * from robert where eqtypes = 'someVariable'";
    newNameRS = mc.getRSS(strSQL);
    <%=newNameRSS.getString("something");%>I cant understand why I get this error, I am closing the rs,conn and statement in the killConn method.
    TIA!

    I did that but still the same error. The problem is when I attempt to open up another resultset on the same page I get the Exhausted ResultSet error. I have even eliminated the class file altogether by doing this:
      String eqCat = "Tracked Vehicle";
      String strSQL = "SELECT DISTINCT eqtype FROM robert WHERE eqcategory = '"+eqCat+"'";
      Class.forName("oracle.jdbc.driver.OracleDriver");
      Connection objConn = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:CCD","system", "Abcd1234");
      PreparedStatement statement = objConn.prepareStatement(strSQL,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
      ResultSet objRS = statement.executeQuery();
      System.out.println(strSQL);
    //The above works fine and then below I add this and the error comes back
         <select name="cs_popup_name_1" onchange="CSURLPopupShow(/*CMP*/'cs_form_name_1', /*CMP*/'cs_popup_name_1', 'Main');">
         <% while(objRS.next()){
            String eq = objRS.getString("eqtype");
             out.println("<option value='"+eq+"'>"+eq+"</option>");
    objRS.close();
    objConn.close();
    statement = null;
    strSQL = null;
    strSQL = "SELECT * FROM robert";
      Class.forName("oracle.jdbc.driver.OracleDriver");
      objConn = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:CCD","system", "Abcd1234");
      statement = objConn.prepareStatement(strSQL,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
      ResultSet rs = statement.executeQuery();
      System.out.println(strSQL);
    //If I leave the field below commented out I get no errors, but if I comment it out I get the error
    <a href="#" onmouseover="showImg('<%=rs.getString("img1")%>')">                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Calling an interface METHOD of another abap web dynpro application

    Hi Experts,
    Can u plz tell how we can Call an interface METHOD of another abap web dynpro application in main WD Component.
    Thanks
    Mahesh

    Hi ,,
       Example ALV interface method calling   GET_MODEL interface method
       View attribute   declaration   :    M_WD_ALV  type      IWCI_SALV_WD_TABLE
         DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
          wd_this->M_WD_ALV =   wd_this->wd_cpifc_alv( ).   "ALV is the usage name
         DATA lv_value TYPE ref to cl_salv_wd_config_table.
          lv_value = wd_this->M_WD_ALV->get_model(  ).   " interface method calling in ALV component usage.....
    Regards,
    Devi

  • Why java is called java2

    why java is called java2 and another thing that i would like to know is why it was renamed to java from its previous name OAK
    Thanx
    Manish

    why java is called java2Not to sure about this one, but I think it was a marketing decision - I guess 'Welcome to the Java 2 platform' sounds better than saying 'Welcome to the JDK 1.2.1 platform' :=)
    and another thing that i
    would like to know is why it was renamed to java from
    its previous name OAKThere was already a patented product named 'OAK', so they had to rename it to something else to avoid the law.
    >
    Thanx
    ManishA brief history of Java:
    http://java.sun.com/features/1998/05/birthday.html
    http://www.ils.unc.edu/blaze/java/javahist.html

  • Why doesn't calls to my iPhone ring through to my Mac?

    Why doesn't calls to my iPhone ring through to my Mac?

    The following have the requirements and settings and some troubleshooting information:
    Connect your iPhone, iPad, iPod touch, and Mac using Continuity - Apple Support
    Get help using Continuity with iOS 8 and OS X Yosemite - Apple Support

  • HT1245 Why does my caller I.D. photos show as a small thumbnail in the upper right corner and not full screen? I have used both photos I have synced and photos I have taken, yet others have full screen photo I.D.'s.

    Why does my caller I.D. photos show as a small thumbnail in the upper right corner and not full screen? I have used both photos I have synced and photos I have taken, yet others have full screen photo I.D.'s. I have looked onlime at several threads and there are no real answers as to what I need to do or am doing wrong.

    I am also having this issue.
    I've just spoken to someone in the Apple Support Centre who advised me that since the product is in beta, he is unable to assist. I wanted to find out whether someone was able to delete the data for me, or 'reset' the photos app somehow. This apparently cannot be done. He suggested I provide feedback via the feedback page, which I will do, but to be honest doesn't fill me with a lot of confidence in the issue being fixed.
    I also deactivated the service and waited the 30 days for the pictures to be deleted - this should have been completed in mid-January. Instead, my iCloud.com Photos page is now showing the photos that should have been deleted as grey squares, just as you described. I am also unable to delete these photos; every time I try, I get the same message about a server error.
    I am also unable to disable the service by enabling and then disabling it on my iPhone. Each time I have tried this it hangs on uploading for several hours, with the progress bar not moving at all. When I disable it on my iPhone, the web app remains unchanged.
    If anyone has had this issue and has managed to fix it, PLEASE share your wisdom. I am out of patience!

  • Why do we call Enterprise Manger 10.2.0.3 "EM 10g R3" ?

    Why do we call Enterprise Manger 10.2.0.3 "EM 10g R3" ?
    I think it is ok "EM 10g R2" is Enterprise Manager 10.2.0.x. and
    "EM 10g R3" is Enterprise Manager 10.3.0.x.
    Your opinion?

    If it is a mistake/typo, then it will be Oracle's fault.
    There was Enterprise Manager 10g Grid Control Release 2 (v10.2.x). Which to me is 10g R2
    Now they are referring EMGC 10.2.0.3 as Enterprise Manager 10g Grid Control Release 3 (10.2.0.3). So that to me is 10g R3 because of the Release 3.
    If you remember, there were Oracle products named Oracle xxx 10g Release x(9.x.x). So, I think we are seing the same here.
    So, do not be surprised if you see 11g Release 1 (10.2.x.x).

  • Why do we call an ABAP Runtime error a "Short Dump"

    Hi All,
    I was just working on one of the ABAP runtime errors with my technical counterpart and a question came to my mind "Why do we call an ABAP Runtime error a "Short Dump"?".
    I tried asking a few friends of mine working in the technical space in SAP and they were not able to answer.
    So, some one of you experts help me getting answer to this question.
    Thanks in Advance.
    Nitin.

    ABAP Runtime error is a generalized term .......... meaning the error occured while runtime.
    wheare as short dump.
    Short -  means brief.
    dump - error information from the memory
    Short dumps (also called ABAP memory dumps). Short dumps occur when an ABAP program fails.
    Short dumps provide basic information about which program failed and what the error was.
    hope this helps.

  • Why only public methods in interfaces?

    Howdy all,
    I'm wondering if someone can shed some light on why Java doesn't allow interfaces to declare non-public methods.
    Ideally, I'd like to do something like this:
    public Interface Foo {
      protected void setFooProperty(int);
      public int getFooProperty();
    public Interface Goo {
      protected void makeGooey(boolean);
      public boolean isGooey();
    public class A implements Foo
    public class B implements Goo
    public class C implements Foo, GooI don't see any technical reason why interfaces must be restricted to declaring public methods only, but it seems too arbitrary to have been done without reason. Any ideas?

    I don't think that is a good idea to put non-public methods in public interfaces. But I beleive that's a good idea to have protected (or friendly) interfaces to be used only in package scope. It could help a lot some projets defining a second level of data exposure of an object so that developers of that package could have more information that others users from outside the package have that are interesting to develop better algorithm that work with that data. In this way, we can defien thre levels of that access: The lower is the package user, that can see the minimum that's possible, above him we have the package developer that don't work directly with the data, but needs some deep access to it to do cool stuff, and finally we have the guy that is doing the object that deals directly with the data (and encapsulate it).
    In this way we can decouple a little the data from the algorithms that work on it, put between them an interface that standarize the access to the data in an intermediate level.
    Hope you are able to understand what I wrote (my english isn't so good!).
    RGB

  • Why is the Hulu Plus interface so bad?

    Why is the Hulu Plus interface so bad? The Hulu Plus interface that is presented on my Sony Blue Ray player (BDPS1500) is very difficult to access my Queue to play the shows I always watch. When you access Hulu Plus it should immediately display “Your Queue” as the highlighted default selection – that way I can click the SELECT button once and then see the list of programs in my queue with the most recent program that I watched highlighted – so I can then click SELECT a 2nd time and now I am looking at the episodes of the program series I watched last with the next episode highlighted so if I press SELECT a 3rd time I will be watching the next episode in the series. The way it is now I have to click all over the place trying to locate My Queue – as it is NOT visible when Hulu Plus initializes. And when I do finally find my queue and select it, the last program I watched is not the default highlighted item. After probably 15 or more clicks up, down, left, and right I finally get to the next episode. This should be an easy change and one that would greatly improve the user experience.

    The trick is to go do this:
    1) go to http://www.adobe.com
    2) At the top in the menu bar look for: Products (this is the first item in the Menu bar;
    3) When you click on it, you will get a list of "Top Destination"
    4) In this list, Photoshop is listed as a special item because of its popularity;
    5) Click on it and you will get this:
    http://www.adobe.com/products/photoshopfamily.html?promoid=JOLIW
    Hope this helps.

Maybe you are looking for

  • Why can't I run the latest Java on Firefox to operate my network camera? It does not find Java. Please Help!!

    I just installed a network camera in my home correctly and signed in to view what was on the camera. But after logging in , info comes up with" cannot find Java" with an install button. I have the latest update of Java and the Firefox browser. There

  • Trouble starting iBook G4

    Hi. I went to use my iBook G4 (running 10.3.x) this morning and when I started it up, it was making a strange buzzing sound. Later it became a squeeling noise. I got the grey screen but the circle under the apple never appeared. The noise only got lo

  • Dumb question- how to install program?

    i've had this computer for awhile and never really had to do it. I think I've done it wrong a few time actually. It's a .dmg file, and when I click on it it opens a folder with a link to the program, some read me files, plug ins, accessories folder.

  • Downloaden lukt niet

    Hallo, ik probeer een muziekdownloadprogramma te downloaden met google maar ik krijg de melding "safari kan uw bestand niet downloaden". Wie kan mij helpen? groetjes tycoon

  • Purchasing- Receipt / transactions

    Hi, In oracle Purchasing i want to receipt department wise against recorded PO. But at the Receving Transactions screen i didt find any standard field for capturing department wise receipt. same process will be followed during issuance of inventory i