[jboss-jira] [JBoss JIRA] (WFLY-1469) Mail Service does not honor remote socket binding without config reload

Tomaz Cerar (JIRA) jira-events at lists.jboss.org
Wed Nov 13 03:54:07 EST 2013


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

Tomaz Cerar commented on WFLY-1469:
-----------------------------------

Issue is not remote socket binding but fact that mail session is started when you call :add for mail session and as you later add smtp configuation it is not applied to running session.

I will fix that adding of server config under mail session will reload session but to have code portable from 7.1.0 all way up to WildFly 8 you would need to run it in a batch / composite operation.
at least looking at 
https://github.com/arquillian/continuous-enterprise-development/blob/master/code/application/service/smtp/src/test/java/org/cedj/geekseek/service/smtp/test/integration/SMTPMailServiceTestCase.java
                
> Mail Service does not honor remote socket binding without config reload
> -----------------------------------------------------------------------
>
>                 Key: WFLY-1469
>                 URL: https://issues.jboss.org/browse/WFLY-1469
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Mail
>    Affects Versions: 8.0.0.Alpha1
>            Reporter: Andrew Rubinger
>            Assignee: Tomaz Cerar
>
> I'm finding that the mail service is not honoring the association with a specific outbound socket binding.
> Configuration of Mail Session and Socket Binding:
> {code}[standalone at localhost:9990 /] /subsystem=mail/mail-session=java\:jboss\/mail\/ALR/server=smtp:read-resource
> {
>     "outcome" => "success",
>     "result" => {
>         "outbound-socket-binding-ref" => "mail-smtp-25000",
>         "password" => undefined,
>         "ssl" => false,
>         "tls" => false,
>         "username" => undefined
>     }
> }
> [standalone at localhost:9990 /] /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mail-smtp-25000:read-resource(recursive="true")
> {
>     "outcome" => "success",
>     "result" => {
>         "fixed-source-port" => false,
>         "host" => "localhost",
>         "port" => 25000,
>         "source-interface" => undefined,
>         "source-port" => undefined
>     }
> }{code}
> Code to inject the Mail Session:
> {code}@Resource(lookup = "java:jboss/mail/ALR")
>     private Session mailSession;{code}
> This injection succeeds, as I'd expect based on the tests: 
> https://github.com/wildfly/wildfly/blob/master/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/mail/annotation/StatelessMail.java#L46
> However, when using this to send mail, getting the default port of "25", not "25000" as I've specified in the config:
> {code}23:54:17,102 INFO  [stdout] (default task-1) DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]
> 23:54:17,103 INFO  [stdout] (default task-1) DEBUG SMTP: useEhlo true, useAuth false
> 23:54:17,103 INFO  [stdout] (default task-1) DEBUG SMTP: trying to connect to host "localhost", port 25, isSSL false{code}
> I don't see anything in the testsuite attempting to broker mail through a non-default configuration.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the jboss-jira mailing list