Java Mail error

I am getting the following error message.

javax.naming.NameNotFoundException: No object bound to name java:comp/env/mail/Notification

I set up a java mail Session resouce with a JNDI name mail/Notification.

In my code I am getting the Session using:

Context ic = new InitialContext();

mailSession = (Session)ic.lookup("java:comp/env/mail/Notification");

I have also tried to just use mail/Notification but then it gives the error com.sun.enterprise.deployment.MailConfiguration cannot be cast to Session.

Can anyone assist. I can't see where I am going wrong.

[609 byte] By [patmugaa] at [2007-11-27 3:47:29]
# 1
What app server, and how are you setting up mail/Notification?
bshannona at 2007-7-12 8:51:15 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...