This is somthing really simple that I just can’t get to work. I’m sure I’ve done it before but I can’t figure out what I’m doing wrong!
I’m trying to send an email from an EJB using the java:\Mail context that jboss 4 sets up. I have configured the mail-service.xml file and when jboss starts I get
[MailService] Mail Service bound to java:/Mail
when I access it in the ejb like this:
Context ctx = new InitialContext();
Session ses =(Session)ctx.lookup("Mail");
I get the following exception in the jboss logs
javax.naming.NameNotFoundException: Mail not bound
has anyone got any ideas?
Its got to be something simple I’m missing but googling about hasn’t turned up anything useful.