]
Radim Hatlapatka commented on WFLY-5079:
----------------------------------------
The issue seems to be caused by
{{org.jboss.as.mail.extension.MailSessionDefinition#getChildren}}, which returns list of
the standard mail servers. These children are always registered on reload even when the
mail server was removed in previous step.
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@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}