Daniel Branco [
https://community.jboss.org/people/daniel.branco] created the discussion
"JBoss 5 Avoid printing some exception thrown."
To view the discussion, visit:
https://community.jboss.org/message/648850#648850
--------------------------------------------------------------
Hello @ll,
First I must say that I'm beginner, and I'm not in charge of the JBoss
configuration so maybe I'm looking for something that can be done but I'm using
the wrong words.
This is my situation: We are using JBoss 5, we have a Bean which is trying to query a
record and in case of not return a record, an exception is thrown with a message and not
treated inside jboss, this cause at the very end of the workflow that the JBoss caught
that exception and print it in the server.log. This bean is being called from other
application outside JBoss; and in this application if an exception, that we are expecting,
is thrown then we will catch it and treat it.
What we want is to avoid printing that exception in the server.log, because whilst is true
that is not being treated inside the JBoss it is expected and treated outside it.
*NOTE:* The policy of the project is that if there is nothing found then thrown a
<Record>NotFoundException, where Record is the name of the table we are trying to
read e.g. EmployeeNotFoundException, and not returned a null value or other value. This
has been working always like this, so I won't change the policy.
Thanks in advance and kind regards,
Daniel Branco.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/648850#648850]
Start a new discussion in JBoss AS Documentation at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]