Hi,
I am having trouble with resource injection.I have defined a Mail Session
thus,
<!-- Binds a javax.mail.Session object to JNDI name java:/LeadloaderMail --> <mbean code="org.jboss.mail.MailService" name="leadloading:service=LeadloaderMail,name=LeadloaderMail"> <attribute name="JNDIName">LeadloaderMail</attribute> <attribute name="User">devcon2</attribute> <attribute name="Password">xxxxx</attribute> <attribute name="Configuration"> <configuration> <property name="mail.store.protocol" value="imap"/> <property name="mail.transport.protocol" value="smtp"/> <property name="mail.user" value="devcon2"/> <property name="mail.imap.host" value="seth"/> <property name="mail.smtp.host" value="seth"/> <property name="mail.from" value="someone@somewhere.com"/> <property name="mail.debug" value="false"/> </configuration> </attribute> </mbean>
@Resource (mappedName="LeadloaderMail") Session session;