This discussion is archived
13 Replies Latest reply: Jun 20, 2011 4:51 PM by EJP RSS

why narrow concept ?

838458 Newbie
Currently Being Moderated
why narrow concept is used even though we know the return type of the remote object to which we need to down cast?Is there anything to deal with the protocols?Some thing like rmi and iip etc?
  • 1. Re: why narrow concept ?
    EJP Guru
    Currently Being Moderated
    It is a requirement of the CORBA IIOP protocol.
  • 2. Re: why narrow concept ?
    838458 Newbie
    Currently Being Moderated
    there would be a particular reason for making it ? i want the reason.


    thanks for your time.
  • 3. Re: why narrow concept ?
    Kayaman Guru
    Currently Being Moderated
    user8483670 wrote:
    there would be a particular reason for making it ? i want the reason.
    Read the specification for CORBA then.
  • 4. Re: why narrow concept ?
    gimbal2 Guru
    Currently Being Moderated
    user8483670 wrote:
    there would be a particular reason for making it ? i want the reason.


    thanks for your time.
    You'll need to ask one of the original specification designers then.
  • 5. Re: why narrow concept ?
    EJP Guru
    Currently Being Moderated
    there would be a particular reason for making it?
    Yes.
    i want the reason.
    That's nice. So do I actually. It has something to do with the Repository. All I know about it is what it says in the Javadoc and the tutorial.

    Good luck. It's actually a CORBA question, not a Java question at all.
  • 6. Re: why narrow concept ?
    838458 Newbie
    Currently Being Moderated
    As per my knowledge the thing is . In java remote invocation we need not have to use this narrow concept(i.e in case of ejb) ,But there might be the situations where the java implementation code use this rmi but the internal implementation (underlying) of the ApplicationServer is corba i.e following the IIOP protocol . Inorder to have portability between the rmi and IIOP protocol we use this concept.

    I am not that sure is the above one is 100% true so i want to find it out .

    Edited by: user8483670 on Mar 10, 2011 4:13 AM
  • 7. Re: why narrow concept ?
    EJP Guru
    Currently Being Moderated
    As per my knowledge the thing is in java remote invocation we need have to use this narrow concept
    No. Only in RMI/IIOP. You don't have to use it at all if you are using RMI/JRMP, the default protocol. In fact you can't use it, it will fail.
    there might be the situations where the java implementation code use this rmi but the internal implementation (underlying) of the application is corba
    Yes, that's the RMI/IIOP case.
    i.e following the IIOP protocol inorder to have portability between the rmi and IIOP protocol we use this concept.
    No we don't. We only use it in the RMI/IIOP case.
    I am not that sure is the above one is 100% true
    It is 100% untrue.
  • 8. Re: why narrow concept ?
    838458 Newbie
    Currently Being Moderated
    As per my knowledge the thing is in java remote invocation we need have to use this narrow concept
    No. Only in RMI/IIOP. You don't have to use it at all if you are using RMI/JRMP, the default protocol. In fact you can't use it, it will fail.

    why it fails?

    I tried an example in ejb using narrow it never failed and it gave me no error.

    there might be the situations where the java implementation code use this rmi but the internal implementation (underlying) of the application is corba
    Yes, that's the RMI/IIOP case.

    where this RMI/IIOP case comes if not the above situation?


    i.e following the IIOP protocol inorder to have portability between the rmi and IIOP protocol we use this concept.
    No we don't. We only use it in the RMI/IIOP case.


    where this case comes

    Edited by: user8483670 on Mar 10, 2011 4:31 AM
  • 9. Re: why narrow concept ?
    EJP Guru
    Currently Being Moderated
    I tried an example in ejb using narrow it never failed and it gave me no error.
    EJBs use RMI/IIOP.
  • 10. Re: why narrow concept ?
    838458 Newbie
    Currently Being Moderated
    you told when we use RMI\IIOP we need to use narrow concept but the thing i am saying is i got the reference without using narrow as well as without narrow(). It works fine in both the case.If the Ejb uses RMI\IIOP protocol it should give error if i dont use the narrow().
  • 11. Re: why narrow concept ?
    EJP Guru
    Currently Being Moderated
    the thing i am saying is i got the reference without using narrow as well as without narrow()
    No, you haven't been saying that at all. Now that you have said it ...
    If the Ejb uses RMI\IIOP protocol it should give error if i dont use the narrow().
    Well evidently it doesn't, so I was wrong in saying that it did. However as all the documentation I have ever seen says you do have to use it, use it.
  • 12. Re: why narrow concept ?
    838458 Newbie
    Currently Being Moderated
    Thanks for your time . I am trying to get the very excat reason so i frisked you .
  • 13. Re: why narrow concept ?
    EJP Guru
    Currently Being Moderated
    Frisked?

    And you didn't get the exact reason, because I carefully didn't give it.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points