off hand I would say the second line is a narrowing from
javax.rmi.PortableRemoteObject

it should say session =
(Session)PortableRemoteObject.narrow(InitialContext().lookup(("java:comp/env
/mail/MyMail"), Session.class);

Al

----- Original Message -----
From: Hunter Hillegas <[EMAIL PROTECTED]>
To: JBoss 2 <[EMAIL PROTECTED]>
Sent: Saturday, June 23, 2001 6:37 PM
Subject: [JBoss-user] More Newbie Questions


> I've got another newbie question. I perused the Javadoc and couldn't find
an
> answer...
>
> In the JBoss docs, in the JavaMail section there is some sample code...
>
> One part is like this:
>
> try {
> session = (Session)new
InitialContext().lookup("java:comp/env/mail/MyMail");
> InitialContext().lookup(("java:comp/env/mail/MyMail"), Session.class);
> }
>
> The second line won't compile. What does it do? I tried to figure it out
> based on the JNDI docs but I'm at a loss.
>
> Thanks,
> Hunter
>
>
> _______________________________________________
> 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