users@glassfish.java.net

Re: Glassfish and JavaMail

From: <glassfish_at_javadesktop.org>
Date: Thu, 27 Dec 2007 03:40:16 PST

Hello,

I have createad a Java Mail Session from glassfish admin console named seg.

As in the example I execute:

        String snName = "java:comp/env/mail/seg";
        Object ref = ic.lookup(snName);

But everytime it will not find the object. I will get:
javax.naming.NameNotFoundException: No object bound to name java:comp/env/mail/seg

however if I only lookup for seg, it will find, but not a javax.mail.Session object but rather: com.sun.enterprise.deployment.MailConfiguration

Could someone explain the proper way? Is there a bug or misconfiguration?

Best,
[Message sent by forum member 'segfault2007' (segfault2007)]

http://forums.java.net/jive/thread.jspa?messageID=251516