The first is necessary if you are using a protocol other than JRMP on the
wire.  JRMP is the default with JBoss, so the second form will work for you.
However, if you may be switching to another protocol (eg RMI-IIOP), you
should use the first.

Hanna Khamis


                -----Original Message-----
                From:   Toby Hede [mailto:[EMAIL PROTECTED]]
                Sent:   Friday, July 27, 2001 07:59
                To:     [EMAIL PROTECTED]
                Subject:        [JBoss-user] using
PortableRemoteObject.narrow

                I keep seeing code samples that use the followng syntaxt:

                  Object ref = ctx.lookup(EJBHome.JNDI_NAME);   
                  EJBHome home = (EJBHome) PortableRemoteObject.narrow(ref,
EJBHome.class);

                I also see other samples that use the following:

                  EJBHome home Object ref = (EJBHome)
ctx.lookup(EJBHome.JNDI_NAME);   

                What is the correct format in JBoss (I have used the latter)

                /t
                Toby Hede













                _______________________________________________
                JBoss-user mailing list
                [EMAIL PROTECTED]
                http://lists.sourceforge.net/lists/listinfo/jboss-user

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to