[jboss-jira] [JBoss JIRA] (WFLY-5079) Removing non existent mail server with standard name (via CLI) doesn't fail even though it should

Tomaz Cerar (JIRA) issues at jboss.org
Mon Oct 5 12:34:00 EDT 2015


     [ https://issues.jboss.org/browse/WFLY-5079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tomaz Cerar closed WFLY-5079.
-----------------------------
    Resolution: Rejected


Subsystem works as expected, but by default services don't get restarted unless you tell server they should be.

to make long story short. you need to provide extra header(allow-resource-service-restart=true) to cli command that tells server services can be restarted.

you need to use special syntax for header which is: 
{noformat}{allow-resource-service-restart=true} {noformat}

so your last command should look like:

{noformat}
/subsystem=mail/mail-session=Mail/server=smtp:add(outbound-socket-binding-ref=mail-smtp2,ssl=false,username="...",password="..."){allow-resource-service-restart=true}
{noformat}

other option is to start server in admin mode and add all configuration to it, than run reload to runtime (default mode)

> Removing non existent mail server with standard name (via CLI) doesn't fail even though it should
> -------------------------------------------------------------------------------------------------
>
>                 Key: WFLY-5079
>                 URL: https://issues.jboss.org/browse/WFLY-5079
>             Project: WildFly
>          Issue Type: Bug
>          Components: Mail
>    Affects Versions: 10.0.0.Beta1
>            Reporter: Radim Hatlapatka
>            Assignee: Tomaz Cerar
>
> Removing non-existent mail server (which is named smtp or pop3 or imap) via CLI operation doesn't fail even though it should.
> {noformat}
> /subsystem=mail/mail-session=java\:jboss\/mail\/test1439373303651:add(jndi-name=java\:jboss\/mail\/test1439373303651)
> {"outcome" => "success"}
>  /subsystem=mail/mail-session=java\:jboss\/mail\/test1439373303651:read-children-names(child-type=server)
> {
>     "outcome" => "success",
>     "result" => []
> }
> [standalone at localhost:9990 /] /subsystem=mail/mail-session=java\:jboss\/mail\/test1439373303651/server=smtp:remove
> {
>     "outcome" => "success",
>     "response-headers" => {
>         "operation-requires-reload" => true,
>         "process-state" => "reload-required"
>     }
> }
> {noformat}
> Note: trying to remove non-existent server named e.g. {{xxx}} correctly fails see
> {noformat}
> /subsystem=mail/mail-session=java\:jboss\/mail\/test1439373303651/server=xxx:remove
> {
>     "outcome" => "failed",
>     "failure-description" => "WFLYCTL0030: No resource definition is registered for address [
>     (\"subsystem\" => \"mail\"),
>     (\"mail-session\" => \"java:jboss/mail/test1439373303651\"),
>     (\"server\" => \"xxx\")
> ]",
>     "rolled-back" => true,
>     "response-headers" => {"process-state" => "reload-required"}
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list