[jboss-as7-dev] validate-address warning
Brian Stansberry
brian.stansberry at redhat.com
Mon Jul 18 10:32:15 EDT 2011
On 7/18/11 6:40 AM, Alexey Loubyansky wrote:
> I just noticed that if validate-address has a negative result there is a
> WARN in the server's log. Do we really need that?
No.
> I just realized that CLI may cause quite a lot of those.
>
> [Host Controller] 13:34:50,256 WARN [org.jboss.as.controller]
> (pool-3-thread-6) Operation ("validate-address") failed - address:
> ([("subsystem" => "messaging")])
>
I wonder why it's happening? That message gets logged if the step
handler throws OperationFailedException, and this handler doesn't.
The intent is a handler throws an OFE if there is an error in the user
request, and we WARN log it instead of ERROR because it's not an error
condition on the server. This handler shouldn't throw an OFE though
because it's not an error condition. But it doesn't!
Oh, I bet I know why; the theory of the handler is somewhat off. If you
invoke /interface=bogusname:validate-address, it will work, because the
handler is (indirectly) registered under /interface=*. But if you do
/bogustype=public:validate-address, it doesn't work as expected as
nothing is registered under /bogustype=*. So you are seeing the standard
"unknown address" handling.
Probably the right way to implement this is to have validate-address
only on the root resource and then pass the address as a param.
> Thanks,
> Alexey
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat
More information about the jboss-as7-dev
mailing list