[ 
https://issues.jboss.org/browse/SEAMMAIL-27?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636121#comment-12636121
 ] 

hantsy bai commented on SEAMMAIL-27:
------------------------------------

@Stateful
@ConversationScoped
@Named("forwardingCaseEdit")
public class ForwardingCaseEditAction {
//inject related object
        @Inject
        private Instance<MailMessage> mailMessage;

        @Inject
        private Instance<CDIVelocityContext> velocityContext;

        @Inject
        private ResourceProvider resourceProvider;

        @Inject
        private Instance<Session> session;

// invoke mailmessage send method...
mailMessage
                                .get()
                                .to(_to)
                                .subject(
                                                "Instrcution -- "
                                                                + 
this.getCurrentForwardingCase()
                                                                                
.getForwardingCaseSubject())
                                .bodyText(
                                                new VelocityTemplate(
                                                                resourceProvider
                                                                                
.loadResourceStream("/mails/fowarding_forwarder.text.vm"),
                                                                
velocityContext.get())).put(values)
                                .send(session.get());




}
                
> Exception when injected mail session in a converstion scoped statful session 
> bean
> ---------------------------------------------------------------------------------
>
>                 Key: SEAMMAIL-27
>                 URL: https://issues.jboss.org/browse/SEAMMAIL-27
>             Project: Seam Mail
>          Issue Type: Bug
>            Reporter: hantsy bai
>             Fix For: 3.1.0.CR1
>
>
> I tried to inject mail session instance in my stateful session 
> bean(conversion scoped), and got the exception, please refer the info in 
> forum post.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
seam-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/seam-issues

Reply via email to