well the problem seems to be in bounding the mbean. Here is the code for my 
RegisterMessage


  |         @Resource(mappedName="java:/Mail")
  |     Session mailSession;
  |     
  |     
  |     
  |     public Message UAIMessage(User user) {
  |             
  |             try {                   
  |                     
  |             Message message = new MimeMessage(getMailSession());
  | 
  |             InternetAddress to[] = new InternetAddress[1];
  |             to[0] = new InternetAddress(user.getEmail());
  |             message.setRecipients(Message.RecipientType.TO, to);
  |             message.setSubject("UAI_sys Registration information");
  |             message.setContent(RegisterContent(user), "text/plain");
  |             //person.get
  |             return message;
  |             }catch(Exception e) { return null; }
  |             
  |     }
  | 

By debuging this I get that mailSession is always null. When jboss starts I get 
that mail service is bound to java:/Mail so I can't understand why it's null

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968529#3968529

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968529
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to